Commit Graph

12794 Commits

Author SHA1 Message Date
Jordan Justen 387d12db42 glsl_shaders: Update setEnvInput() call for non-SPIR-V GL shaders
Ref: https://github.com/KhronosGroup/glslang/issues/2872
Ref: https://github.com/KhronosGroup/glslang/commit/81cc10a498b25a90147cccd6e8939493c1e9e20e

After discussions with the glslang developers, it appears that the
parameters in glslang's setEnvInput() function are a bit more geared
towards SPIRV that the documentation implied.

After the glslang commit above, and discussions with the developer, it
seems that the 3rd parameter to setEnvInput() should only be set to
EShClientOpenGL if you want to enable the ARB_gl_spirv extension.

The 4th parameter to setEnvInput() is version, but it is used to
indicate the version of either the KHR_vulkan_glsl extention for
vulkan, or the ARB_gl_spirv extension for OpenGL with SPIR-V.

So, if the shader type is neither ShaderType::Vulkan, nor
ShaderType::GLSPIRV, we should specify glslang::EShClientNone for the
3rd parameter and 0 for the 4th parameter of setEnvInput().

This doesn't actually impact renderdoc with the currently bundled
glslang 8.13.3743, because they failed to pass the environment through
during pre-processing.

But, this changed in this glslang commit in 11.2.0:

 * 6274ec5c ("Pass environment through PreprocessDeferred")
 * https://github.com/KhronosGroup/glslang/commit/6274ec5c

After this change, renderdoc passes the environment through to the
pre-processor, and with the current parameters to setEnvInput(),
glslang will start to define GL_SPIRV in the shaders during
pre-processing.

Then, in renderdoc's glsl_globals.h, GL_SPIRV causes the pre-processor
to set:

 * #define IO_LOCATION(l) layout(location = l)

which then causes Mesa to produce this error when compiling the shader:

 * GL_VERTEX_SHADER compile error: 0:239(2): error: shader output
   explicit location requires GL_ARB_separate_shader_objects extension
   or GLSL 4.20

Signed-off-by: Jordan Justen <jljusten@gmail.com>
2022-01-27 11:59:25 +00:00
Remi Palandri c86261e776 add gl_ViewIndex to PS-debugprintf 2022-01-25 19:49:34 +00:00
baldurk ec5c5d98e8 Handle failed maps as fatal errors on vulkan. Refs #2460
* We manually check for NULL returned map pointers and treat this as a fatal
  error, even if the map itself returns VK_SUCCESS
2022-01-25 15:19:44 +00:00
baldurk e607e45a92 Handle multiple switch statements in DXBC shaders
* Without this when a default statement is hit we would never properly process
  the matching endswitch
2022-01-25 15:19:41 +00:00
baldurk a8b6981b14 Fix backwards check in vulkan fatal error detection. Refs #2460 2022-01-25 15:19:39 +00:00
baldurk 2691b63891 Bump version to 1.19 2022-01-25 15:19:21 +00:00
baldurk 3996d037b9 Add support for Vulkan 1.3 and Roadmap 2022 profile v1.18 2022-01-25 13:10:37 +00:00
baldurk e0ed64d655 Update to SPIR-V 1.6 2022-01-25 13:10:37 +00:00
Remi Palandri b63033c5e6 add serialization for shader messages in VKPipe 2022-01-25 09:07:08 +00:00
Remi Palandri 3f71e1739c add nonsemantic to list of replay exts 2022-01-21 23:57:58 +00:00
baldurk 35c6ba8335 Ignore device layers on vulkan for better compatibility
* Device layers are deprecated and should not be enabled, if the application
  does so then we may think different extensions are available. Instead just
  explicitly use the list of layers from the instance.
2022-01-21 10:35:12 +00:00
baldurk 53b09724a1 Fix issues trying to patch simple/tiny DXIL shaders 2022-01-21 10:34:40 +00:00
baldurk e0b4a2771f Don't use existance of renderpass to determine graphics vs compute pipe
* When using dynamic rendering there is no renderpass object even for graphics
  pipelines
2022-01-21 10:34:40 +00:00
Remi Palandri 62bbbbdcf7 remove modified resources from m_LiveIDs
when a resource is replaced, its liveID needs to be replaced as well instead of cached in m_LiveID.
2022-01-21 10:23:52 +00:00
baldurk 348fb914cb Protect against write-after-write hazards when applying initial states 2022-01-13 14:30:59 +00:00
baldurk cc9fab3659 Handle a NULL device passed into IDXGIOutput::FindClosestMatchingMode 2022-01-13 14:14:07 +00:00
baldurk 8435a1ab72 Allow debugging SPIR-V 1.6 modules 2022-01-12 15:08:47 +00:00
baldurk 4a339a4369 Add support for VK_EXT_texture_compression_astc_hdr 2022-01-12 15:08:36 +00:00
baldurk c6ee124ef0 Add support for VK_EXT_4444_formats 2022-01-12 14:52:49 +00:00
baldurk cb89263096 Fix vkBindBufferMemory2 querying for BDA details before memory bind 2022-01-12 13:59:27 +00:00
baldurk 6245639537 Respect the returned shader model support from D3D12 driver
* If the application supports >= SM6.6 then we would previously unconditionally
  just clamp to SM6.6. However we also need to let the driver clamp in case it
  only supports SM6.5 or older
2022-01-12 13:54:13 +00:00
baldurk ed3a0266d1 We still need to patch store ops away from DONT_CARE on fastest replay
* Fastest replay optimisations mean applying all optimisations but we can't
  break the ability to debug - without patching this, using DONT_CARE on store
  might mean we can't inspect renderpass contents from part-way through. Even
  partially replayed they can be discarded by the driver if the store op is
  still DONT_CARE
2022-01-12 13:47:19 +00:00
baldurk ef5de41140 Never replay semaphore work on vulkan queue submissions 2022-01-12 13:17:02 +00:00
baldurk daf498f704 When forcing buffers to be referenced for BDA purposes, use read ref
* Buffers are always treated as 'read' even if they're written because only
  sparse buffers have initial states and become dirty. The memory behind the
  buffer is instead the thing that is treated as written.
2022-01-12 11:24:22 +00:00
baldurk 4d26628a3c Don't store cap-referenced desc sets as objects directly
* When we see a descriptor copy during a frame capture we force the source
  descriptor set to be included since it may never be bound to a command buffer,
  but it may also be deleted so instead we AddRef the record to keep it alive
  and store the id & record directly.
2022-01-12 11:24:22 +00:00
baldurk cb066ee905 Don't add SSBO variable to interface if it's not used 2022-01-12 11:24:22 +00:00
baldurk 0620a8f114 Allow customising the fixed/monospace font as well. Refs #2443 2022-01-12 11:24:22 +00:00
baldurk 83f4b0bfcc Don't treat OOM in post-vs code as fatal, since we handle it gracefully 2022-01-12 11:24:22 +00:00
baldurk 089126c34b Add a new in-app API function ShowReplayUI to raise the UI window
* This is not guaranteed to work, e.g. on windows where for good reason
  background windows can't necessarily raise themselves.
2022-01-12 11:24:22 +00:00
baldurk 3587f8e448 When closing multiple capture connections apply 'No to All' answer wider
* This means if you're closing multiple connections and click 'no to all' when
  prompting save of instead of discarding just the captures in that connection
  then going on to prompt for the next, it discards all remaining captures.
2022-01-12 11:24:22 +00:00
baldurk 49876a1043 Fix incorrect calculation of alignment for pessimistic external memory 2022-01-10 19:57:31 +00:00
baldurk b89e0712b2 Fix missing case handling S8 in vulkan formats 2022-01-10 18:49:57 +00:00
baldurk 6a7ca28809 Fix compile error 2022-01-10 18:48:19 +00:00
baldurk 755d141840 Don't leak allocated memory when exporting GL structured data 2022-01-10 17:53:39 +00:00
baldurk a0d40073ce Allow customising the font family. Closes #2443 2022-01-10 17:53:18 +00:00
baldurk a16e1e7995 Add a python script to sort .ui files so grid layouts are in order
* This will help in future to keep diffs more readable
2022-01-10 17:30:57 +00:00
baldurk 1c3f30d90d Resave all UI files with Qt Creator 5.15
* This gets rid of anything that might be changed with the latest version when
  updating these files
2022-01-10 16:57:43 +00:00
baldurk b87c22b081 Track command buffer and root debug msgs separately. Closes #2435
* This also prevents messages from being populated after initial load to avoid a
  never-ending increase of messages.
2022-01-10 14:51:24 +00:00
baldurk cc2d49ad1c Fix handling of unused attachments in dynamic rendering. Closes #2432 2022-01-10 14:05:51 +00:00
baldurk 27d26834f5 Struct array stride is only 16-aligned for cbuffers in D3D. Closes #2441 2022-01-10 13:45:13 +00:00
baldurk 657257dbbf Remove fail-on-compile flag for vulkan PSOs on replay 2022-01-10 12:58:50 +00:00
baldurk f1e81f69c5 Fix handling of S8 textures on vulkan. Closes #2428 2022-01-10 12:54:25 +00:00
baldurk 87bd7a4179 Demote error to warning when spec constants are unbound
* This is perfectly legal, the spec constant data provided in the pipeline is
  just ignored. It's only a problem if this indicates some RenderDoc bug
  matching up the constant IDs.
2022-01-10 12:53:37 +00:00
baldurk d0563ebaea Fix array overrun in test 2022-01-10 12:51:37 +00:00
baldurk ea708dd816 Don't apply depth load and store ops to stencil aspect. Closes #2437 2022-01-10 11:49:13 +00:00
baldurk ac457f0def Only process program pipeline being bound if it's non-zero
* Unbinding the pipeline by setting 0 should still be serialised, but there's
  nothing to reference or query for.
2022-01-10 10:53:27 +00:00
baldurk f8476b53b5 Fix generated RP barriers to specify no queue transfer explicitly
* For concurrent images this is required, and for shared images it's still
  valid.
2021-12-02 12:12:55 +00:00
baldurk d6ef7d51ac Bump version to 1.18 2021-11-26 17:39:16 +00:00
baldurk 22d4dc4574 Don't create temporary device if D3D12 is not supported v1.17 2021-11-26 10:59:22 +00:00
baldurk 33751470f2 Fix random new CI failure by setting CMAKE_CXX_STANDARD_REQUIRED 2021-11-25 12:16:45 +00:00