Commit Graph

14931 Commits

Author SHA1 Message Date
baldurk 20f5725bbd Add reading and writing of pipeline validation chunk 2024-08-20 14:49:48 +01:00
baldurk 946df28742 Wrap up string buffer and index arrays to be reusable with a tweak
* For some reason in RDAT the strings are deduplicated, but in PSV they are not.
  Similarly in RDAT the index array packing prefixes each array with its length
  but in PSV the index array is entirely loose and deduplication can happen
  effectively anywhere.
2024-08-20 14:49:47 +01:00
baldurk b82ee6ac14 Stub out PSV structures for external access
* We move some commonly used enums to more general spots for ease of use in the
  encoded data.
2024-08-20 14:49:47 +01:00
baldurk 8cb615e217 Fix assert when disassembling unorm or snorm typed resources 2024-08-20 14:49:47 +01:00
baldurk a1dc494fb5 Add decoding and encoding for RDAT
* Only tested so far on round-trip behaviour, not with modifications. By default
  we don't make any changes yet but the DXIL program editor may in future
  automatically decode and encode the RDAT so it can stay in sync if resources
  are added.
2024-08-20 14:49:47 +01:00
baldurk 7adff9faff Add stubbed structures for RDAT decoding/encoding
* We have parallel structures that are mostly the same but are 'flattened' with
  indices for lookups for arrays or strings
2024-08-19 16:15:14 +01:00
baldurk 304e636b4a Only try to fetch embedded implicit root signature from ShaderEntrys 2024-08-19 16:15:14 +01:00
Cam Mannett 647313ae14 Vulkan AS rebuild-on-replay: BDA tracking
In order to unify the input structs between host and device builds, the AS API uses addresses rather than VkBuffer handles, but there's no way of retrieving a handle from an address so we have to track all VkBuffer binds to map their addresses back to the owning handle. This is done is in TrackInputBuffer(..) and UntrackInputBuffer(..), the latter for when the resource is destroyed. A complexity here is that when doing the lookup, users are allowed to manipulate the BDA so we have to find the buffer the address lies in and return the offset too.
2024-08-14 11:09:19 +01:00
baldurk 808a14dede Handle SPIR-V GL shaders with no location on texture binds. Closes #3405
* Since GL doesn't have sets, use the fixedBindSetOrSpace to namespace bindings
  with locations (that need to be queried) from bindings without locations
  (which have a fixed bind). Prior to the descriptor refactor this was indiated
  with negative binds.
2024-08-12 12:42:23 +01:00
baldurk 9607410b94 Strip VK_EXT_hdr_metadata extension on replay
* This is a pure WSI extension
2024-08-12 12:26:48 +01:00
Jasmine Hansen 52a3792dd2 Add support for shader objects in vulkan pixel history
Add shader object helper to debug manager
Add shader objects to shader cache and vulkan pixel history callback
Add shader objects to occlusion, color and stencil, tests failed, per fragment, and discarded fragments callbacks
2024-08-12 10:53:29 +01:00
baldurk 88be65d1c6 Use correct qmake flag in archlinux workaround 2024-08-09 21:50:10 +01:00
baldurk a2872c83d1 Workaround broken qmake on Archlinux 2024-08-09 13:54:51 +01:00
baldurk 109a6a427f Allow executables to launch to be found via PATH. Closes #3403 2024-08-08 13:25:46 +01:00
Connor Abbott 2147b4db75 Fix build errors on GCC 14
Fix errors due to the new template-id-cdtor warning, e.g.:

renderdoc/renderdoc/driver/vulkan/vk_serialise.cpp:201:58: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
  201 |   OptionalResources<Serialiser<SerialiserMode::Writing>>(Serialiser<SerialiserMode::Writing> &ser)
      |
2024-08-08 10:57:56 +01:00
Jake Turner c1afe9e984 Last member in SPIRV structs use baseSize for array stride Closes #3392
Change matches comments in code but wasn't implemented.

Before this change struct A size would be larger than struct B (which is struct with an extra member)

struct Nested
{
  float a;
};

struct A
{
  Nested child[16];
};

struct B
{
  Nested child[16];
  float f;
};
2024-08-06 15:14:28 +01:00
baldurk 8b46a1a8fc Update from toolwindowmanager repository @ 106405739ef8b 2024-08-06 15:14:28 +01:00
Jake Turner 811ec2a5bd Do not crash in OpenCapture if m_RDC is NULL
The NULL case was being handled for setting the return code and then Error() was being called on a NULL m_RDC
2024-08-05 17:50:37 +01:00
baldurk 9ef756d626 Clear orphaned entries from value symtab when editing DXIL 2024-08-05 17:40:31 +01:00
baldurk 90832a18f0 Update from toolwindowmanager repository @ 117c15c1c67a2 2024-08-05 17:40:31 +01:00
Cam Mannett d78adf7e99 Fix Android env var collection
RD uses getprop to emulate geting env vars configured from the host, and it uses Process::LaunchProcess to do this that in turn uses fork/execve to launch getprop.  But execve doesn't use the env's shell lookup mechanism for exes - this resulted in the getprop call failing and the capture options using default values.

This fix is to switch to using execvpe.
2024-08-05 17:21:03 +01:00
Cam Mannett 278aeb1c32 vkGetAccelerationStructureBuildSizesKHR not using unwrapped AS
A copy-pasta error on my behalf.
2024-08-05 14:39:59 +01:00
Cam Mannett fd3fda3905 Softmem flush ID fix
The ResourceId being passed to GetSize_InitialState() to set the chunk size was the ID of the resource triggering the flush NOT the ID of the resource being flushed.
2024-08-05 14:36:16 +01:00
baldurk eebdb5a8bd Bump version to v1.35 2024-08-05 14:35:40 +01:00
baldurk 323726cde8 Ensure we don't use new Android SDKs which are of course broken v1.34 2024-08-02 17:08:29 +01:00
baldurk 26b96b6569 Fix issue handling non-struct return from cbuffer load in DXIL 2024-08-02 12:53:27 +01:00
baldurk 76b2e17c54 Add some bulletproofing to driver file version logging 2024-08-01 11:01:26 +01:00
baldurk 6b42e75bb2 Don't initialise a new ResourceRange while destroying D3D11 objects
* This can cause a recursive call and crash if we are destroying the D3D11
  device at the time
2024-07-31 16:24:47 +01:00
Jake Turner 521a0b5fff Ignore MSAA image FillWithDiscard on non-graphics queues
MSAA fill requires a graphics capable queue
2024-07-31 10:40:22 +01:00
Jake Turner f2f07cbc74 DXIL Disassembly moved global SSA ID to be part of SettleIDs
Removed it from Accumulator::processFunction()
2024-07-29 15:47:20 +01:00
baldurk fe31bdbdf8 Change incorrect -Wno-error to remove warning entirely
* If a warning is valid, it should be fixed, and if it is invalid it should be
  ignored entirely.
2024-07-29 14:28:11 +01:00
baldurk aa09927662 Remove ignored commit in commit message checks 2024-07-29 14:28:11 +01:00
Jake Turner 16e2802930 Make nextSSAId parameter a default pointer parameter
The SSAIds get computed once during SettleIDs() as part of DXIL disassembly (and DXIL debugger)
Pass in local variable for usage in ProgramEditor
2024-07-28 14:12:51 +01:00
baldurk c3331146ff Remove DENY flags when fetching task/mesh shader output on D3D12 2024-07-27 21:21:29 +01:00
baldurk 48564a8e53 Make required nextSSAId parameter reference not pointer 2024-07-27 21:13:29 +01:00
Jake Turner e92a6a6527 For DXIL Disassembly change "." -> "_" in Instruction names
Disabled when DXC_COMPATIBLE_DISASM is enabled
The shader debugger treats "." in a variable name as a field separator
2024-07-27 14:34:29 +01:00
Jake Turner c6ef900f34 DXIL Disassembly added Program::GetArgId(const Value* v)
For use in RD disassembly and DXIL debugger
2024-07-27 14:34:24 +01:00
Jake Turner cce5d94c4a DXIL Disassembly changed Instruction::slot to be global unique SSA Id
Used by DXIL Debugger, new behaviour is disabled when DXC_COMPATIBLE_DISASM is enabled
2024-07-27 14:34:17 +01:00
Jake Turner 1120148a54 Put resource specific data in a union in DXIL::EntryPoint::ResourceBase 2024-07-27 14:20:58 +01:00
Sluggernot 7f1cb948b3 Initialize D3D12_SAMPLER_DESC before modifying value
Small change to initialize D3D12_SAMPLER_DESC2 before it is used.
2024-07-27 14:19:53 +01:00
baldurk ae7f1a4a9a Log GPUs enumerated and driver file versions & timestamps on windows 2024-07-26 17:47:09 +01:00
Jake Turner 89dd99d203 GL Reflection support for shadow Cube Map Array samplers Closes #3391
i.e. "samplerCubeArrayShadow" in GLSL
2024-07-25 14:26:51 +01:00
Jake Turner d0675c75bf D3D12 Mesh Shader Feedback support for non-global payload variable
i.e. payload variable comes from a stack allocation instead of groupshared
2024-07-24 13:21:57 +01:00
Jake Turner 84786aea20 Demos test D3D12_Shader_Mesh 2024-07-24 13:21:57 +01:00
Jake Turner 742886b1b6 Handle OpAccessChain with zero indexes in SPIRV Reflection
It is legal to have zero indexes
2024-07-23 10:32:48 +01:00
baldurk fd0062572b Fix missing iteration with templated push descriptors 2024-07-22 16:17:17 +01:00
baldurk 7db141c77b Implement bindless feedback for samplers on D3D12. Closes #3387 2024-07-22 16:17:10 +01:00
tomjohnstone 97c072fa79 Fix up calls to CheckFeatureSupport 2024-07-22 13:29:57 +01:00
Jake Turner 4957cfd39a D3D12 Pixel History GPU sync all queues not just the active queue
Delete pOcclusionQueryHeap after fetching the results from it instead of at the end of pixel history function
2024-07-16 16:37:13 +01:00
baldurk df32442362 Patch EmitMeshTasksEXT calls that don't use the referenced payload
* Unclear on if this is valid or not but it is likely considered to be a
  degenerate case, where a payload is declared and referenced by the entry point
  then not used in the emit. The contents in the mesh shader are presumably
  undefined but if they're similarly unused that's fine?
2024-07-16 16:12:30 +01:00