Commit Graph
12816 Commits
Author SHA1 Message Date
baldurk 68401caea3 Generate larger staging buffer for vulkan discard patterns
* The pattern buffer is 64x8 but doing copies to each target location can cause
  issues on very large textures. Instead we generate a 256x256 buffer with
  repetitions on load (which is still only ~256-512kB), and copy from that. We
  can still do truncated copies so we don't need a smaller buffer, and this
  greatly reduces the number of buffer copies issued.
2022-02-04 16:45:14 +00:00
Steve Karolewics f082d53c92 Fix D3D12 shader debugging with root sig deny flags
The root signature can specify deny flags for shader types. If this
is the case for a shader we're debugging, we need to ensure that
the flags are cleared to allow sample/gather instructions to work.
2022-02-04 12:38:27 +00:00
Leonard Tsai f7c34cdb0c Support VK_KHR_depth_stencil_resolve attachment in pipeline state view
Depth stencil resolve attachments were not being serialized and exposed in the pipeline state view. This change serializes the attachment id for the depth-stencil resolve attachment so that it can show up in the pipeline state view.

Update name of depth/stencil in pipeline viewer

Fix clang formatting

Update struct type
2022-02-03 18:49:10 +00:00
baldurk 76e273cbd4 Fix another clang warning 2022-02-03 11:13:16 +00:00
baldurk 4e8895983b Fix clang warning about unused break 2022-02-02 17:00:26 +00:00
baldurk e06a01d03d Fix compilation on linux 2022-02-02 16:13:25 +00:00
baldurk fdda8be9c6 Allow watch variables to specify a color-swatch with ,c. Closes #2475 2022-02-02 15:00:44 +00:00
baldurk d844d3af39 Fix missing stencil store op in discard zoo test 2022-02-02 15:00:44 +00:00
baldurk e4fd52c367 Fix generation of NaNs in vulkan shader debug zoo test 2022-02-02 15:00:44 +00:00
baldurk e42b0ff2ca Refactor ShaderVariable use and non-32-bit precision. Closes #2466 2022-02-02 15:00:43 +00:00
Remi Palandri 4b748c6368 fixing valid issues 2022-02-02 11:04:42 +00:00
baldurk 4bf2e00ba5 Switch custom prefixes from defines to static constants 2022-02-01 01:07:25 +00:00
baldurk f40e1fe951 Fix docstring references to ShaderSourcePrefix 2022-02-01 00:09:35 +00:00
baldurk 7320aa27a1 Add ShaderSourcePrefix to docs index 2022-01-31 20:38:06 +00:00
baldurk 3d49524da4 Don't enable functionality not supported by the current physical device 2022-01-31 19:28:08 +00:00
baldurk 3ac4bd0ebd Refactor custom shaders to abstract binding differences. Closes #2458
* Newly written shaders and any updated shaders can now use pre-defined macros
  to abstract away binding differences between APIs, so custom shaders will be
  more portable in particular shaders written in HLSL for D3D or GLSL on OpenGL
  won't break on vulkan because they refer to incorrect binds.
2022-01-31 19:14:08 +00:00
baldurk 0d7dcabdac Clamp version for vulkan 1.3 drivers that don't support BDA cap/replay 2022-01-31 17:25:23 +00:00
baldurk 6ca3d00f25 Print an error message for process creation failures on windows 2022-01-31 12:02:26 +00:00
baldurk 4f6d6d9c7f Fatal errors should always print to stderr 2022-01-31 10:34:34 +00:00
baldurk 66e377f4cb Destroy framebuffer before recreating it, and don't leak loadRP/loadFBs 2022-01-28 17:21:56 +00:00
baldurk 54fa3a7802 Recalculate scrollbar limits after switching textures. Closes #2470 2022-01-28 13:49:48 +00:00
baldurk 9d0511bf44 Ignore typecast for pixel context view, on custom shaders. Closes #2459
* When we've applied a custom shader we're now displaying from our internal
  custom shader output texture which means we need to ignore some display
  properties. These are already ignored in RenderTexture where the custom shader
  is applied, but we also need to ignore it in the context display.
2022-01-28 13:09:31 +00:00
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