Commit Graph

10477 Commits

Author SHA1 Message Date
baldurk 27bd045ea3 Remove undefined behaviour tests (divide/modulo by zero) 2020-04-08 18:39:02 +01:00
baldurk 0be0e02ebe Fix missing/wrong int-to-float conversions 2020-04-08 18:39:02 +01:00
Steve Karolewics 1137c4694c Make D3D12Pipe root element centric instead of shader centric
D3D12Pipe now stores an array of root elements, each one corresponding
to a root element or range in the root signature. Migrated usage in the
D3D12 pipeline state viewer and PipeState retrieval of resources.
Restricted number of resource array textures displayed in the texture
viewer to prevent app hangs.
2020-04-08 18:38:38 +01:00
baldurk 1d64fffd42 Add tests of new operations in SPIR-V ASM 2020-04-07 23:21:17 +01:00
baldurk d874c32275 Implement modulo/remainder operations 2020-04-07 23:21:07 +01:00
baldurk 6d8a972133 Implement OpBitcast 2020-04-07 23:20:51 +01:00
baldurk 565faf25fc Fix disassembly of SPIR-V subtract operations 2020-04-07 21:18:26 +01:00
baldurk 109fad12ac Fix reading of negative constants 2020-04-07 21:16:55 +01:00
baldurk d8fa0b624d Implement derivatives 2020-04-07 18:37:13 +01:00
baldurk 1690d30621 Fix handling of w in Vec4 operators 2020-04-07 18:34:15 +01:00
baldurk 38abf04909 Set up python script to run VK shader debug tests
* Since we expect many more tests it also runs the test texture in a 2D grid
  with N drawcalls
2020-04-07 17:43:30 +01:00
baldurk 1b6cc3a70e Implement OpVectorShuffle 2020-04-07 17:43:30 +01:00
baldurk ebe53d2be1 Don't return NULL on error, we must always return a valid trace 2020-04-07 17:14:01 +01:00
baldurk ad79bf7cc5 Support applying derivatives on builtins 2020-04-07 17:13:49 +01:00
baldurk bcb795e3b6 Save state nextInstruction after processing any flow control construct 2020-04-07 15:48:22 +01:00
baldurk 38866323bc Strip WSI-only extensions on vulkan replay 2020-04-07 14:41:45 +01:00
baldurk 5e2de7dd34 Fix issues switching between mips with overlays on vulkan 2020-04-07 14:05:43 +01:00
baldurk 6c3bf313a4 Fill out copy subresource in DrawcallDescription for OpenGL 2020-04-07 10:45:42 +01:00
baldurk dd4009c588 Remove undoc-members attributes from autoclass docs builds 2020-04-07 09:55:17 +01:00
baldurk b94aa074b5 Remove duplicate data reference in docstring 2020-04-07 09:47:54 +01:00
baldurk 569fb0ef47 Add fixes for sphinx 3.0 2020-04-06 23:20:38 +01:00
baldurk 5ec480dffe Don't consider a destination file modified until we've seen a #line
* If we have a merged file with #lines in it, then we want to split those #lines
  into separate files as expected. However the original merged file should be
  left alone. Previously this happened if the first thing we saw was a #line but
  that was only by coincidence. If there was some preamble before the first
  #line we'd start copying that and then stop once we started emitting lines
  into other files.
2020-04-06 20:13:36 +01:00
baldurk eb552d8172 Allow NULL for object name in vulkan debug functions 2020-04-06 20:13:36 +01:00
baldurk 2dd2ebd53f Save format and type used by captured glTexImage2D to fill missing mips
* If the application uses internal format GL_RGBA but format GL_BGRA when
  uploading with e.g. glTexImage2D, we store an internal format of GL_RGBA and
  allocate any needed mips for initial states with an autocalculated format of
  GL_RGBA. It's unclear if this is valid or not but it seems to fail on some
  drivers, so save the format used (GL_BGRA) and use that.
2020-04-06 20:13:36 +01:00
Daniel Craig fc63964335 Show correct clear/CopyDst/CopySrc subresource in texture viewer
This is implemented and tested on vulkan/d3d12/d3d11.
2020-04-06 20:12:05 +01:00
baldurk 5f925ee3a2 Fix check for push constant ranges in postvs fetch on vulkan 2020-04-04 01:22:31 +01:00
baldurk fd36ec0bc1 Add shader debug zoo test
* This includes SPIR-V tests to test specific opcodes.
2020-04-03 18:43:58 +01:00
baldurk fc2181d625 Fetch and apply pixel inputs and derivatives to quad 2020-04-03 17:17:46 +01:00
baldurk 21f869192c D3D12 created initial states don't need to be copied
* This would require proper barriers and special handling for e.g. readback
  resources, and the only time we create initial states is when the resource was
  created mid-frame (since all pre-frame resources are dirty, so would have
  initial states prepared). That means it's zero initialised, so our zero-
  initialised created state is fine.
2020-04-03 15:19:28 +01:00
baldurk 2bb278b9fd Highlight stale/unrecognised settings in the config editor 2020-04-03 15:19:28 +01:00
baldurk 9ce74cbc39 Only warn about customised read-only settings in stable builds 2020-04-03 15:19:28 +01:00
baldurk 8d6615697b Push settings file to android devices
* This allows settings to be used to control debug logging on android as well.
2020-04-03 15:19:28 +01:00
baldurk 445c54f967 Try to prevent android library being unloaded after it was loaded
* Even if the vulkan/GL loader wants to unload us the library should stay
  resident to provide a persistent connection, as if it were preloaded/injected.
2020-04-03 15:19:28 +01:00
baldurk 9ba81634b4 Improve the title of shader edit windows 2020-04-03 15:19:28 +01:00
baldurk 590785c470 Mark edited resources with an (Edited) suffix on their names 2020-04-03 15:19:28 +01:00
baldurk ecd8dd0ade Don't report replaced IDs in pipeline state
* If we return back (accurate) replaced IDs in current pipeline state, the UI
  won't recognise them since the list of resources is cached and fixed at load
  time.
* The replaced ID is still present in the shader reflection info as we return
  the replaced shader's reflection and not the original's.
* We also change how we replace a programshader (glCreateShaderProgramv) on GL.
  Instead of creating a program and a shader - resulting in two objects
  replacing one - we instead replace the shader that got built with a program.
  We can do this safely since we know the shader won't be used as an actual real
  shader (since it was a program in the original capture too).
2020-04-03 15:19:28 +01:00
baldurk dc3ebab80a Ensure replacement IDs are used in pipeline initial states. Closes #1810
* If we use the program name directly it won't be replaced if we edit a shader.
2020-04-03 12:36:06 +01:00
baldurk fcb82ae70c Fix the way d3dcompiler is copied into builds to not fail so often
* Using <Copy> forcibly copied every build which means if the program is running
  a build will fail. Using <Content> will only copy if the file doesn't exist
  (so after the first build, it won't try to copy and fail).
2020-04-02 18:15:44 +01:00
baldurk 33d7971364 Mark integer divide by zero as "generated NaN of Inf" in shader debug 2020-04-02 18:15:44 +01:00
baldurk c5242e574a Fetch inputs and derivatives 2020-04-02 18:15:44 +01:00
baldurk 62c3cec950 Fix reference tracking issue. PartialWrite + Read -> WriteBeforeRead
* Read after PartialWrite should become WriteBeforeRead. Previously it became
  Read which lost the information about the Write completely.
2020-04-02 18:15:44 +01:00
baldurk 9716b407d3 Add helper for generating GLSL450 extinst operations 2020-04-02 18:15:44 +01:00
baldurk 85dedabcf8 Add helpers for building SPIR-V ops incrementally 2020-04-02 18:15:44 +01:00
baldurk ecc0a53dcb Declare inputs in PSInput struct 2020-04-02 18:15:44 +01:00
baldurk feafbde8bc Add GL hack to check for implicit thread switching
* This is a very big blunt hammer for fixing the problem of multithreaded
  submission from GL. Every GL call checks to see if the context changed (which
  would only happen from a thread switch to a different context) and if detected
  it inserts a manual MakeCurrent call equivalent.
* It's slow to capture (when this happens - checking is not particularly slow)
  and slow to replay, but it's functional which is an improvement.
2020-04-02 18:15:44 +01:00
baldurk ea6cc026ae Allow de-activating GL contexts in tests 2020-04-02 18:15:44 +01:00
baldurk d279d6dcd2 Silence D3D debug layer spam by including NULL terminator 2020-04-02 18:15:44 +01:00
Lionel Landwerlin d88026a697 Fix KHR storage counter issue for time units
Renderdoc seems to somewhat require time units to be in float to be
able to present prettyfied results (ms/us/ns).

We were assuming that but a couple of errors slipped in :

   * we were asserting that KHR time units are floats

   * we didn't describe the renderdoc units as double (even though we
     forced the conversion later on)
2020-04-02 18:15:28 +01:00
Jordan Justen d2f7837ecf qrenderdoc: Drop building swig .py.c files
This is an alternative to
https://github.com/baldurk/renderdoc/pull/1768 suggested by baldurk.

I found that for some reason when cross compiling, the qrenderdoc
CMakeLists.txt was failing to see the include-bin executable that
renderdoc should have built.

Apparently the .py.c files were no longer required for qrenderdoc, so
removing it also fixed the issue I was seeing.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2020-04-02 18:15:19 +01:00
baldurk 528a0c5f5e Guard against integer division by zero
* The SPIR-V spec doesn't state what will happen, only that it's undefined. For
  the sake of something sensible (and because it has a good chance of matching
  at least some hardware) we use D3D's behaviour and set the value to 0xFFFFFFFF
2020-04-01 17:38:44 +01:00