Commit Graph
63 Commits
Author SHA1 Message Date
Jake Turner 0d1b8f8154 Embed D3D12 Pixel History DXIL compiled shaders as resources
Fallback to use the embedded compiled shader if the source shader fails to compile
Only try to get pixel history DXIL shaders for captures that use DXIL
2024-06-20 14:25:08 +01:00
Amit Prakashandbaldurk 6254393bdf Add serialisation & replay of Acceleration structure build calls
* Add patching of BLAS address in TLAS
* Add a compute shader to patch the BLAS address
* Adds a pipeline, and root signature for patching the BLAS
2024-03-01 12:11:37 +00:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
Jake Turner e1e179bd53 Extend D3D11 Depth Test Overlay
Support shader exported depth by replaying using the capture pixel shader to determine passing pixels

Don't write depth or stencil during the reply of failing pixels
No need to restore depth-stencil after replay of failing pixels
2023-11-09 12:05:57 +00:00
Jake Turner de06321536 Extend GL Depth Test Overlay
Support shader exported depth by replaying using the capture pixel shader to determine passing pixels via a stencil mask
2023-11-06 14:38:04 +00:00
Steve KarolewicsandBaldur Karlsson b3bc0e98bc D3D12 pixel history copy pixel and resource creation
This adds some of the D3D12 pixel history framework, with creation
of resources that will be needed during pixel history, and a helper
function and shader to copy pixels from MSAA resources.
2023-10-10 11:33:34 +01:00
Orson BainesandBaldur Karlsson d7042643ce Address Pixel History PR feedback
- change mscopy compute shader to use same as vulkan
- default to sample 0 when average value is selected
2023-02-14 10:07:07 +00:00
Orson BainesandBaldur Karlsson d87f505a26 OpenGL Pixel History Multisampling support
- Read pixel value from the selected sample
- Support the average value for multisampled textures
- Mark events that fail sample mask
2023-02-14 10:07:07 +00:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00:00
Orson BainesandBaldur Karlsson 5b5d2aa191 Improve GL Pixel History per PR feedback
- Blit fragments and read back results in batch
- Modify per fragment callbacks to reduce number of full replays
- Use defines in the primitiveId shader to toggle between float/int
  output
2023-01-05 14:37:55 +00:00
Bruce HeandBaldur Karlsson c0b931eb15 Improved fragment id shader code
- Deleted WriteClearValues and replace with QueryPostModValues
- Add support for earlier GLSL versions and fix logic for creating primitive id program
- Changed to only run per fragment queries on events with multiple fragments
2023-01-05 14:37:55 +00:00
baldurk 9603f5a925 Pre-compile shaders for math and sampling opcodes during shader debug
* D3D12 math shader was already precompiled, but on D3D11 we now allocate
  everything up front and on D3D12 we also up-front compile sampling.
* The only exception is const offsets which can't be variable, so we cache these
  (likely we'll only see a few variants per shader/capture) and create them on
  demand.
2022-06-30 13:51:27 +01:00
Remi PalandriandBaldur Karlsson 79aee1df43 full implementation of compute msaa-to-buffer 2022-03-09 12:10:47 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk 02a54be6ad When replaying resource discards fill with explicit pattern. Closes #284
* This helps catches cases where a discarded image is accidentally used and in
  many cases may still have valid data. Particularly on Vulkan this is relevant
  for DONT_CARE renderpass load and store ops.
2020-07-13 17:29:11 +01:00
baldurk f0fe801d27 Specify RC include paths instead of using a macro for the output path
* This fixes an issue with builds failing when the path contains some characters
  RC doesn't like for some reason, even if it's quoted.
2020-07-12 10:51:51 +01:00
baldurk 0bd48d3c2c Update overlays to use DXIL as needed
* This is needed because D3D12 requires all shaders in a pipeline to use DXIL if
  any do.
* We try to bake the couple of DXIL shaders that we will mix-and-match with
  application shaders at build time, in case we aren't able to find a working
  dxcompiler at runtime to build them. But this can only happen if we find a
  working dxc.exe in one of the windows 10 SDKs.
2020-06-18 17:22:44 +01:00
baldurk 9f210d5617 Hardcode variants of fixed colour shader needed on D3D12
* We will be adding an offline baked version of the DXIL variant of each of
  these, so we want to make it friendly to build-time generation.
2020-06-18 17:22:44 +01:00
Aliya PazylbekovaandBaldur Karlsson 0fd3d65a6f Vk Pixel History: support other depth formats MSAA
- Separate the pixel history copy pixel shader into two separate
  shaders, one for colour copy and one for depth
- Allocate and update descriptor sets on demand
- Add another compute shader for pixel history depth copy
2020-05-26 21:19:55 +01:00
Aliya PazylbekovaandBaldur Karlsson 41b911d1d0 Vk Pixel History: MSAA depth/stencil copy, shader out
Use a separate compute shader module for MSAA copy, and output
directly into the destination buffer instead of creating
staging resources.

Support case where there is no depth stencil attachment to get post mod
values in per fragment reporting. Previously used the original
framebuffer that might not have had depth/stencil view, so couldn't
count the fragments. Now use the sub image.

To get the post mod color, we need to blend with the premod color, so
we use vkCmdCopyImage to copy from the original image.
2020-05-06 19:35:25 +01:00
baldurk 18713f644e Implement OpImageQueryLod by faking derivatives on sample quad 2020-04-23 19:14:09 +01:00
Aliya PazylbekovaandBaldur Karlsson 8d2ad78f05 Vk Pixel History: refactoring, per fragment depth
- Refactor to use common funcs
- Add per fragment depth data
- Rename pixelhistory.frag to pixelhistory_primid.frag
- Fix how some per fragment pipelines are created

For per fragment data we create 3 pipelines
1) Post modification pipeline
changes the stencil state and scissors around the target pixel
2) Shader output pipeline
in addition to above, disables rasterization discard, depth bounds test,
culling and turns off blending
3) Primitive ID pipe
in addition to above, disables depth test and depth write, and changes
the fragment shader to only output primitive ID
2020-03-20 16:16:12 +00:00
Aliya PazylbekovaandBaldur Karlsson 83623af8d8 Vk Pixel History: per fragment data
- For now only per fragment primitive ID, and colour values, not depth
information.
2020-03-20 16:16:12 +00:00
baldurk df266eb04d Fix some version properties in windows resource files 2020-01-14 18:02:10 +00:00
baldurk edc8fb6bd6 Be more precise with texture remapping to handle integer textures 2019-11-26 17:38:26 +00:00
baldurk 11819ed3be Refactor and clean up internal shaders to be better organised
* Split up old uber-cbuffers used for unrelated shaders into shader-specific
  cbuffers (DebugPixelCBufferData -> TexDisplayPSCBuffer / CheckerboardCBuffer /
  MeshPixelCBuffer).
* Split up HLSL files so not everything is lumped into 'debugdisplay.hlsl' but
  has separate files as appropriate.
* Use #include in GLSL and HLSL to better organise shader code together rather
  than relying on lumping files together on the C++ side.
* Renamed files like 'debugcbuffers.h' to 'hlsl_cbuffers.h'.
* Trimmed out some extensions/cruft that isn't needed in the GLSL side since we
  no longer use separable shaders.
* Combine some shaders like Outline/Checkerboard that were similar into central
  place.
2019-02-13 18:50:53 +00:00
baldurk 296f84fb7e Change GL text rendering to be compatible with a wider set of versions
* In particular this will work with GLES 2.0
2018-07-06 22:44:26 +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
Janos Pantosandbaldurk 46a12525ef Modify shaders to be GLES compatible. 2017-03-09 19:13:21 +00:00
baldurk 3290dd1448 Move version information to public API so that all projects can share it 2016-11-11 20:35:59 +01:00
baldurk 01c0ec36b0 Update URLs to point to https:// 2016-11-10 16:19:16 +01:00
baldurk 65e05a3196 Add support for serialising multisampled images in vulkan. Refs #193
* This also applies to stencil even in non-multisampled images.
* Serialisation applies to both network proxying data, initial frame
  contents at the beginning of a captured frame, and saving images to
  disk.
2016-11-07 18:14:45 +01:00
baldurk 9ee4653a7a Add triangle size overlay, showing heatmap of triangles < 4x4 in area 2016-10-02 20:04:43 +02:00
baldurk 7e5f51cbf8 Rename spv/ folder back to glsl/ (hope this will make better history) 2016-07-22 02:44:37 +02:00
baldurk ed512a48de Remove glsl shader variants (and fix text rendering I forgot about) 2016-07-22 02:40:15 +02:00
baldurk 15d60ef6b9 Convert rest of GL shaders to use spv_ variants 2016-07-22 02:26:37 +02:00
baldurk 88695370fd Implement mesh/vertex picking for Vulkan 2016-06-08 11:04:11 -07:00
baldurk d336d5396d Update a few copyrights that still only said 2015 2016-04-23 12:47:29 +02:00
baldurk db22eb64fb Implement quad overdraw display modes (not quite 100% yet) 2016-02-07 18:49:42 +01:00
baldurk 290b695a6b Linux compile fixes 2016-02-07 18:49:33 +01:00
baldurk 961616428d Add texture sampling code for all types/formats 2016-02-07 18:49:07 +01:00
baldurk dd7e2ee568 Shader uniform block definitions between C++ and GLSL 2016-02-07 18:49:04 +01:00
baldurk 4a2fe2d563 Update debug code to compile, and remove on-disk compiled SPIR-V blobs
* We'll compile in-memory now (and implement a user-side caching system
  like we have with D3D).
2016-02-07 18:48:34 +01:00
baldurk f417cf91ac Draw highlight box with rect clears, remove pipeline, strip VBO, etc 2016-02-07 18:48:06 +01:00
baldurk d77dcf680a Implement viewport/scissor overlay 2016-02-07 18:46:21 +01:00
baldurk d5aa1da377 Implement histogram and min/max fetching via compute 2016-02-07 18:46:17 +01:00
baldurk 5c97b1b802 Creating geometry shaders works better if you pass the right SPIR-V... 2016-02-07 18:46:13 +01:00
baldurk b51b50329f Add mesh shaders to project 2016-02-07 18:46:02 +01:00
baldurk 6ec36d6695 Implement drawcall highlight and wireframe texture overlays 2016-02-07 18:44:15 +01:00
baldurk ac44765bd7 Implement highlight box rendering 2016-02-07 18:42:37 +01:00