Commit Graph

5438 Commits

Author SHA1 Message Date
baldurk 390e3c1bf4 Don't try to relink programs created by glCreateShaderProgramv
* When creating a program with glCreateShaderProgramv it implicitly acts
  as if the shaders are detached and deleted after linking. This means
  it cannot be relinked again.
* However the only time we need to relink a program is when we are
  copying across fragdata and vertex attrib bindings in case they were
  changed from creation - but for the same reason that we can't relink
  a program to apply them, the application can't either - which means
  the data must be unchanged from creation, and so the copy is not
  needed.
2017-05-03 20:00:10 +01:00
baldurk 9876b6e5cb Emulate EXT_dsa functions in-place and catch promoted-to-DSA functions
* Originally when I added the EXT_dsa emuluation, I targeted it
  specifically to only those functions that I call outside of the replay
  loop, for internal analysis purposes. For that reason the emulation
  was only applied to a separate hookset, and only during replay (not
  during capture).
* However this doesn't account for some of the streamlined serialisation
  of functions like glBufferStorage, glBufferData, etc. To simplify
  code paths, I 'promote' all variants of these types of functions to
  the EXT_dsa variant (except ARB_dsa for texture functions which is
  actually different by not requiring the texture target parameter).
* Note: most of these functions were emulated already (except three -
  glNamedBufferStorageEXT, glTextureBufferEXT and
  glTextureBufferRangeEXT) but on replay we didn't use the internal
  hookset, just the normal one, which was not emulated.
* Rather than try to decide when these should use the internal hookset
  and when the regular one, or switch them all over to the internal
  hookset, instead re-evaluate the reason for a separate hookset in the
  first place: Emulating functions separately means the original func
  pointers are returned during capture time, for unsupported extensions.
* However mesa has proven that unsupported extensions don't have to
  return NULL, as it's undefined what they return - they should not be
  called if the extension isn't available. So in actual fact there's
  little harm to be done by emulating in-place and returning some
  different pointers to the application. In the worst case, they get a
  bit of EXT_dsa emulation themselves.
2017-05-03 20:00:10 +01:00
baldurk 576edd6104 Fix handling of indices for PostVS data and draw index offset 2017-05-03 20:00:10 +01:00
baldurk ba59a28eba Fix shader label click handler - lambdas have QObject::sender() == NULL 2017-05-03 20:00:10 +01:00
baldurk a744316838 Rename overlay from 'Clipping' to 'Histogram Clipping' to clarify 2017-05-03 20:00:09 +01:00
baldurk 0e9c8127b0 Default m_TimeUnit to invalid so that UpdateDurationColumn runs 1st time 2017-05-03 20:00:09 +01:00
Michael Rennie 980f3fd004 Fix unaligned read ARM crash in Serialise_glProgramUniformVector/Matrix 2017-05-03 11:44:39 -07:00
baldurk 9b45ed217b Update GL enums from official headers 2017-05-03 09:24:57 +01:00
baldurk eebdf84d4f Add OpenGL ES extension header to fetch enums from.
* There's a minor conflict over GL_ACTIVE_PROGRAM_EXT being defined to
  different values in GLES and GL extension headers. Since in the GL
  extension header it's defined to the value that eventually became
  GL_CURRENT_PROGRAM we remove that define.
2017-05-03 09:24:28 +01:00
baldurk 8b3c06ac67 QStringLiteral compile fix for static qrenderdoc code 2017-05-03 08:53:56 +01:00
baldurk 6bcd293a3f Don't mutate VAO binding when replaying glEnable/DisableVertexAttrib
* These calls need to go through DSA access like all the other VAO
  functions.
2017-05-02 22:58:12 +01:00
baldurk e4a5b80bdd Don't depend swig targets on renderdoc target, just interface headers
* This avoids rebuilding swig every time if some internal cpp in the
  renderdoc target changes, but will still rebuild it if the interface
  headers change.
2017-05-02 22:58:12 +01:00
baldurk 78ea82315c Add a super extra hack on the vendor checks to avoid checking on intel
* It seems like even running the simple check to see if we need our
  workarounds can completely break intel's driver and lead to infinite
  hangs later. So instead we just assume these hacks are always on for
  intel drivers.
2017-05-02 22:58:12 +01:00
baldurk 0ecc6ca877 Enable QT_NO_CAST_FROM_ASCII & QT_NO_CAST_TO_ASCII
* Added a couple of utility macros to help with the conversion. lit() is
  paired with tr() for untranslated text.
* QFormatStr is more explicitly for non-textual formatting strings.
* Both are just #define'd to QStringLiteral()
2017-05-02 22:58:12 +01:00
baldurk 474ba91d8b Make qprocessinfo.cpp compatible with no QString <-> const char* convs 2017-05-02 22:58:11 +01:00
baldurk 0b410e9879 Make Qt scintilla code compatible with no-const-char conversions 2017-05-02 22:58:11 +01:00
baldurk ce53be8511 Use QStringLiteral in ToolWindowManager to convert at compile-time 2017-05-02 22:58:11 +01:00
baldurk 22c5b7863d Get some VS null changes to the vcxproj's xml out of the way 2017-05-02 22:58:11 +01:00
baldurk da4813afbd Move functions in statistics viewer into class and operate on members
* This means we can translate strings in the functions via QObject::tr()
  as well as being a bit tidier
2017-05-02 22:58:11 +01:00
baldurk ddc555fd31 Hook LoadLibrary/GetProcAddress variants in 'libraryloader' API sets 2017-05-02 22:58:11 +01:00
baldurk 478f22559c Add FileIO::exists() function 2017-05-02 22:58:11 +01:00
David McFarland f22d38bc63 Don't resume threads created with CREATE_SUSPENDED
This fixes errors in Unity 5.6 when it creates baking processes.
2017-05-01 12:48:19 -07:00
baldurk e5ec2c7280 Fix warning about struct initialisation 2017-04-28 19:46:17 +01:00
baldurk 829e1aa77e Fix handling of 'slots' Qt keyword clashing with python
* On linux without any PCH we have a slightly different case to windows
  with the PCH, so we need to be careful not to redefine the macro.
2017-04-28 19:36:09 +01:00
baldurk c05bea4563 Hook up compute thread debugging in qrenderdoc's D3D11 pipe viewer 2017-04-28 18:36:56 +01:00
baldurk 18d3eae1c8 Ensure that constant buffer views are grouped together in docking 2017-04-28 18:36:56 +01:00
baldurk e0191ccba4 Close transient log-specific windows when a log closes
* Shader viewers already close themselves, but the pixel history view,
  non-mesh buffer viewers, and constant buffer views also close.
2017-04-28 18:36:56 +01:00
baldurk f3508f57b1 Don't completely reset a constant buffer view if the vars are the same
* It's annoying to have the constant buffer view reset and collapse
  everything, especially if moving between draws where the variables are
  the same because the shader hasn't changed.
* We can just compare the previous set of variables to the new set and
  if the types and structures (member variables etc) are the same, then
  just update the values in-place.
2017-04-28 18:36:56 +01:00
baldurk f62777459b Fix index used for constant buffer slots in D3D11 pipeline viewer 2017-04-28 18:36:55 +01:00
baldurk 58050e89ef Remove hardcoded version numbers from vulkan layer json, set in build
* In CMake this is easy as we're already passing it through sed, but
  in msbuild it's a little more complex as we need to write a little
  in-line C# code to read out the version number and replace the
* We also update the JSON generation for layer registration on linux.
2017-04-28 18:36:55 +01:00
baldurk 8580b7b2c7 Hand-edit vcxproj files to remove duplicated properties
* By default VS creates a huge section of properties copy-pasted for
  every Configuration|Platform combination, which is almost all the
  same for each one.
* We instead create a common section with most of the properties that
  are fixed, and then override/add to them for the few that vary (e.g.
  optimisation settings for release, preprocessor macros).
2017-04-28 18:36:55 +01:00
baldurk 1f8a93c37a Add precompiled header file use to qrenderdoc on VS 2017-04-28 18:36:55 +01:00
baldurk 07a73d53ce Tidy up qrenderdoc warning settings a bit 2017-04-28 18:36:55 +01:00
baldurk 628df6d9c8 Fix some warnings in ToolWindowManager so we can keep level 4 globally
* Nested foreach() hiding a local variable in the macro definition.
* Declarations of 'data' parameters that hide a class member variable.
2017-04-28 18:36:55 +01:00
baldurk 8e32da581e Add qrenderdoc 3rdparty libraries to .gitignore 2017-04-28 18:36:55 +01:00
baldurk 5fa195ded8 Switch to using precompiled header files on renderdoc VS projects 2017-04-28 18:36:55 +01:00
baldurk 27035d19d8 #define NOMINMAX and WIN32_LEAN_AND_MEAN before including windows.h 2017-04-28 18:36:54 +01:00
baldurk 993aee449d Use std::min/std::max instead of windows min/max macros 2017-04-28 18:36:54 +01:00
baldurk 5ef7d76d21 Change default warning level to 3 in SPIR-V project
* Since most of the project is glslang, we instead increase the level
  per-file for our own files. It means fewer exceptions in the build
  file.
2017-04-28 18:36:54 +01:00
baldurk 6e83f27c9e Remove glslang warning disable as override is fully supported on VS2015 2017-04-28 18:36:54 +01:00
baldurk 95f366344a Rename parameters near/far to avoid conflicts with macros from windows.h 2017-04-28 18:36:54 +01:00
baldurk 199d5266ad Move disable of warning 4100 from command line to property, remove 4512
* We used to ignore C4512 but we no longer need to.
  C4100: 'identifier' : unreferenced formal parameter
  C4512: 'class' : assignment operator could not be generated
2017-04-28 18:36:54 +01:00
baldurk 4caa05c2b9 Remove reference to removed GetCommitHash function in the docs 2017-04-28 18:36:54 +01:00
Peter Gal 6fde3cbb6a Query allowed extensions when the GL driver knows which mode is it in
Previously the allowed extension list was set when the
WrappedOpenGL driver was created. However at that point it is not always
clear if we are in GL or GL ES mode.
2017-04-28 10:35:43 -07:00
Elizabeth Baumel 8f69735780 Serialisation definitions/preliminary support for D3D12 tiled resources. 2017-04-27 14:16:40 -07:00
baldurk 9e5736f03e Add context menu popup for disassembly in shader debugging 2017-04-27 19:47:50 +01:00
baldurk a7e58ae5f6 Fix a broken loop condition 2017-04-27 19:47:50 +01:00
baldurk ae50fa99ee Revamp version tagging, remove ugly suffix on git hash. Refs #571
* Tacking -official onto the git hash was a hack only needed on windows,
  and since we want more information it doesn't scale.
* Instead we track anything we need to know about the version in
  separate variables, like whether it's a stable build or a nightly/
  local build. Or if it's built by a downstream distribution then the
  version number for the downstream build.
2017-04-27 19:47:50 +01:00
baldurk 4199a857f5 Add right-click context menu to event browser with expand/collapse all 2017-04-27 19:47:50 +01:00
baldurk c2690b8211 Remove some cases where resources were being loaded and parsed @ runtime 2017-04-27 19:47:49 +01:00