Commit Graph

14123 Commits

Author SHA1 Message Date
William Pearson 9cf30b190e Fix crash when descriptor update template uses unreferenced layout
It is possible for the VkDescriptorUpdateTemplateCreateInfo to have its
descriptorSetLayout or pipelineLayout be the only reference to the
corresponding object, as vkCmdPushDescriptorSetWithTemplateKHR and
vkUpdateDescriptorSetWithTemplate only require that the actual layout
matches/is compatible with the one used by the template. Before, there
was no dependency from the update template to the layout, so if it was
the sole use of a layout, the layout would not be saved in the capture,
resulting in a crash during playback.

This change also modifies the vk_parameter_zoo to test this case. With
those modifications, the change to vk_descriptor_funcs is required to
prevent the crash. Note that on my machine, I needed to comment out
other parts of vk_parameter_zoo, or else it would crash (even when
not run under renderdoc) due to driver issues.

For reference:

https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushDescriptorSetWithTemplateKHR.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-layout-07993
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkUpdateDescriptorSetWithTemplate.html#VUID-vkUpdateDescriptorSetWithTemplate-pData-01685
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDescriptorUpdateTemplateCreateInfoKHR.html#_members
2023-11-09 10:15:00 +00:00
Dan Hawson 0ff1c66ca7 Removed demos project reference to '.clang-format' file
This was added by mistake in an earlier commit.
2023-11-08 15:25:36 +00:00
Dan Hawson 910f1dcd7e Add new d3d12_multi_wait_before_signal.py test
It's currently forcibly disabled via 'check_support' because it's known
to fail due to the fact that the commands are always serialised and
replayed in submission order instead of the order that respects queues
blocked on fence waits that get signalled later from other queues.
2023-11-08 15:25:36 +00:00
Cam Mannett ec408e21c0 Android extra flags not applied on initial CMake generation
CMAKE_CXX_FLAGS was overwritten if not already in the cache (i.e. when first built).  Presumably down to toolchain loading order.
2023-11-07 19:01:04 +00:00
baldurk b711a0576c Limit how much we allow D3D12 addresses to go out of bounds 2023-11-06 15:31:27 +00:00
Er2 dcbbcee6a8 Add some fixes. 2023-11-06 14:42:45 +00:00
Er2 86cb3ebf80 Add FreeBSD operating system support. 2023-11-06 14:42:45 +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
Jake Turner b804e99ea3 Set PixelUnpackState to match serialized data for GL Tex APIs
The pixel data has been serialized as pure bytes with no padding or packing.

It was already handled in:
glTexSubImage1D
glTexSubImage2D
glTexSubImage3D

glCompressedTexSubImage1D
glCompressedTexSubImage2D
glCompressedTexSubImage1D

Apply the same handling to:
glTexImage1D
glTexImage2D
glTexImage3D

glCompressedTexImage1D
glCompressedTexImage2D
glCompressedTexImage3D

These APIs do not handle a non-zero offset with the GL_PIXEL_UNPACK_BUFFER
2023-11-06 12:02:50 +00:00
Jake Turner cf004e8ba5 Basic tests for non-zero UNPACK_ROW_LENGTH and glTexImage?D APIs
Covers:
glTexImage1D
glTexImage2D
glTexImage3D
2023-11-06 12:02:50 +00:00
Steve Karolewics 37fe6e098e Add occlusion and color/stencil callbacks for D3D12 pixel history 2023-11-05 15:15:44 +00:00
Jake Turner b19665212c Fix demos compile error on Linux & Android 2023-11-05 13:10:53 +00:00
Jake Turner c93c265681 Wait for GPU before destroying counter query pools
The get query results uses VK_QUERY_RESULT_WAIT_BIT option which makes destroying the query pool safe (the validation layers must not handle this case or it isn't specified behaviour).

This change adds a GPU sync which removes the following validation error. The GPU has already been waited on by the queries using VK_QUERY_RESULT_WAIT_BIT options.

Validation Error: [ VUID-vkDestroyQueryPool-queryPool-00793 ] | MessageID = 0x5ef3bf2b | Cannot call vkDestroyQueryPool on VkQueryPool 0xf49d4000000029b[] that is currently in use by a command buffer. The Vulkan spec states: All submitted commands that refer to queryPool must have completed execution (https://vulkan.lunarg.com/doc/view/1.3.261.1/windows/1.3-extensions/vkspec.html#VUID-vkDestroyQueryPool-queryPool-00793)
2023-11-04 10:32:31 +00:00
Dan Hawson 7619414b8a Add multi-queue wait-before-signal test
This tests submitting commands, signals, and waits to graphics and
multiple compute queues where the entire frame's submission for each
queue depends on the other queues and the submission order is not the
order in which the GPU (and replay) need to be processed.  This is to
ensure any capture or replaying deserialises adequately.
2023-11-03 10:46:42 +00:00
Dan Hawson fb02202505 New D3D12BufferCreator and D3D12TextureCreator state setters
Added 'D3D12BufferCreator::InitialState(D3D12_RESOURCE_STATES)' to allow
user code to avoid adding unnecessary transition barriers after resource
creation.

Added 'D3D12TextureCreator::ClearVal(const D3D12_CLEAR_VALUE &)' to avoid
a PIX performance warning/tip about clearing resources that haven't had
their clear value set on creation.
2023-11-03 10:46:42 +00:00
baldurk 845a2e5718 Handle limited 64-bit only Android devices that don't support 32-bit
* When we detect a new version of Android and a 64-bit device where the 32-bit
  version of RenderDoc fails to install completely, ignore this and don't warn
  the user about it.
2023-11-02 13:48:41 +00:00
Jake Turner bbd1fe6243 Handle variable sized descriptor sets in FetchShaderFeedback
For variable sized descriptor sets compute feedbackStorageSize using the active descriptor set layout instead of the creation time data.
2023-11-01 14:53:06 +00:00
Jake Turner 3fbf060894 Test for very large variable sized descriptor binding
New Binding 3
Initial size is UINT32_MAX
Updated to be sized DESC_ARRAY3_SIZE
Used in the shader to ensure the binding is referenced

Stress tests the FetchShaderFeedback code when it computes the maximum size of feedbackStorageSize.
2023-11-01 14:53:06 +00:00
baldurk b103d1fcb6 Fix crash disassembling root signature in DXIL metadata 2023-11-01 11:46:42 +00:00
baldurk 8805afd56e Also blacklist 32-bit AMD driver dll to workaround driver quirk 2023-10-30 10:24:30 +00:00
baldurk e16500c97f Only recreate depth on resize for D3D12 if depth was originally used 2023-10-30 10:24:30 +00:00
baldurk 8ba23ccea0 Process member decorations immediately in SPIR-V editor after parse 2023-10-30 10:24:30 +00:00
baldurk 29a2925eef Strip unused reflection of arrayed builtin outputs on vulkan 2023-10-30 10:24:30 +00:00
baldurk 89d482ec36 Handle barycentric shader builtin 2023-10-30 10:24:30 +00:00
baldurk a4da2f1eb2 Add SPIR-V processor accessors for data types and decorations by id 2023-10-30 10:24:30 +00:00
baldurk 84e61014a1 Add a SPIR-V editor helper to insert a sequence of operations at once 2023-10-30 10:24:30 +00:00
baldurk 2b779038af Add a SPIR-V editor helper to add or re-use a builtin input 2023-10-30 10:24:30 +00:00
baldurk f87c50af25 Add a SPIR-V editor helper to register a constant with a pre-given ID 2023-10-30 10:24:30 +00:00
baldurk 3ac150d273 Improve SPIR-V code generation
* Prefer vendor-neutral extension aliases for enums over vendor-specific.
* When disassembling opcodes with optional parameters, only include the
  parameters when present.
2023-10-30 10:24:30 +00:00
baldurk 8b4f04c58f Allow the pipeline flow chart control to change stages dynamically 2023-10-30 10:24:30 +00:00
Cam Mannett aec25cfcaa Add -Wno-deprecated-declarations to demo when NDK >=26 is used
Compiles the demo APK with -Wno-deprecated-declarations when the NDK is v26 or over, otherwise it fails to compile the fmt core header.  In the LLVM version used in the NDK, using std::char_traits with non-std types is marked as deprecated.
2023-10-27 18:12:15 +01:00
Cam Mannett 3746f83039 Minor functional test fixes
* Fixed issue where a previously built demo APK would be added into the APK archive upon next build
* Correct the functional test's --in-process help output
2023-10-26 15:38:48 +01:00
baldurk ecd47ca40c If descriptor heap fails to expand on tier 3 HW, fall back. Closes #3092
* Descriptor heap tier limits are not very useful as even tier 3 might be as
  limited as tier 2. Previously expanding a small amount was safe but newer NV
  drivers or systems seem to have stricter limits than before.
2023-10-25 17:56:39 +01:00
baldurk ea4c03402f Don't apply cast from main texture display into overlay. Closes #3094
* When we're sourcing from our own texture we don't want to bring in any
  typecast to unorm/uint/etc from the original texture's view. This already
  happens for the main display but we also need to do that for the thumbnail
  context.
2023-10-25 17:56:39 +01:00
baldurk dd4e0d44ad Do two-pass processing of pNext chains for strict validity. Closes #3093
* We first need to do a pass to find extension structs that affect validity of
  pointers (whether they're ignored or not), then do a pass to process.
2023-10-25 17:56:38 +01:00
baldurk b6470b03de Add a delay after Compute_Only tests to allow capture to be found 2023-10-25 17:56:38 +01:00
baldurk 92cb968738 Tweak clang-format comment reflow weight
* A weight of 300 seems to cause weird problems like it allowing comments to
  stretch beyond the column limit even if they're the only thing on a line in a
  block. A value of 200 avoids this without reformatting any other code (phew!)
2023-10-25 17:56:38 +01:00
baldurk 47d7f47b5a Fix validation error with dummy pipeline 2023-10-25 17:56:38 +01:00
baldurk de6f4346b7 Fix UInt/SInt bindings being swapped on D3D custom visualisation shaders 2023-10-25 17:56:38 +01:00
Jake Turner 3856017609 Set Vulkan currentPass renderArea if dynamic rendering is active
This is in addition to setting the currentPass renderArea if there is an active render pass
2023-10-25 15:47:25 +01:00
Steve Karolewics 3ca187d725 Add generic D3D12 callback for pixel history
This adds the next step toward D3D12 pixel history, which is mostly
the generic action callback that is used for other replays later
(similar to how Vulkan pixel history operates).
2023-10-18 09:55:22 +01:00
baldurk 4d180b300f Fix missing include for some android SDKs 2023-10-13 10:36:37 +01:00
baldurk b25253a83c Fade android logo every 45 minutes to avoid burn-in 2023-10-12 17:55:18 +01:00
Firestar99 62f9986922 fixed cmake version gate using too low of a version for CMP0135, try 2 2023-10-12 17:55:06 +01:00
Jasmine Hansen de8981134c Add support for Extended Dynamic State 3 2023-10-12 12:36:16 +01:00
Jake Turner 5b8c8e30a4 Changes to Android demos to support RenderDoc capture
Change package name to "renderdoc.org.demos" instead of "org.renderdoc.demos" (RenderDoc filters out packages containing "org.renderdoc.")

Added an <intent-filter> to the Android manifest.
This registers the activity with the android package system which means RenderDoc Launch Application knows the activity name to launch.
Used category CATEGORY_ALTERNATIVE to prevent the activity from appearing on the launcher UI.
2023-10-10 16:12:36 +01:00
Steve Karolewics e1516fa521 Add D3D12 pixel history test
This is a basic test that mirrors the Vulkan pixel history test,
but repeats draws multiple times to verify SM5.1 and SM6.0.
SM6.6 should be tested as well for writes from direct heap access
but is not yet implemented differently than SM6.0.
2023-10-10 11:50:55 +01:00
Steve Karolewics 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
Steve Karolewics 15ba420905 Add function to get planar depth/stencil SRV formats 2023-10-07 13:39:19 +01:00
Steve Karolewics bad922e1f4 Allow providing NULL shaders for D3D12PSOCreator 2023-10-06 11:26:20 +01:00