Commit Graph

14759 Commits

Author SHA1 Message Date
baldurk a7e9a60280 When patching mesh shaders only consider globals for its entry point
* For shaders with multiple entry points we can't process outputs for other
  entry points that may not be arrayed.
2024-06-04 10:08:08 +01:00
baldurk af67b951de Ensure descriptor sizes are properly initialised in default pipe state 2024-06-04 10:08:08 +01:00
baldurk aecaa7e208 Calculate texture byte sizes as 64-bit on GL and Vulkan. Closes #3338 2024-06-04 10:08:08 +01:00
baldurk 44f9f24ace Add correct support for GL_EXT_clip_control on GLES. Closes #3336 2024-06-04 10:08:08 +01:00
Jake Turner 70d93f14db DXIL Disassembly small tweaks
Change some RDCASSERT(a == b); to RDCASSERTEQUAL(a,b); now that the stringise exists for the data types
2024-06-03 17:31:08 +01:00
Jake Turner f4e361eba8 Fix spelling mistake "preceeded" in DXIL Disassembly output 2024-06-03 13:55:38 +01:00
Jake Turner dcaba505cd DXIL Disassembly Refactoring to use GetArgId instead of ArgToString 2024-06-03 13:48:12 +01:00
Jake Turner 38340e3cb1 DXIL Debugger foundation refactoring
Removed "rdcstr Program::GetResourceReferenceName(ResourceClass resClass, const BindingSlot &slot) const"
Moved "DXIL::BindingSlot" to "DXILDebug::BindingSlot"
2024-06-03 13:06:54 +01:00
Jake Turner ccde0a261f DXIL Disassembly use switch...case for handling DXOp Opcodes
Simplifies code compared to the previous if...else if's
2024-06-03 13:01:09 +01:00
Jake Turner ce3477d7ab Added stringise for DXIL::Type::TypeKind 2024-06-03 12:48:13 +01:00
Jake Turner 133a1d6a40 Added DXIL::Program helper methods
static void MakeResultId(const Instruction &inst, rdcstr &resultId);
Id GetArgId(const Instruction &inst, uint32_t arg) const;

Used const reference on ResourceReference constructor
2024-06-03 12:39:44 +01:00
Jake Turner c731589bd0 Added DXIL support to DXBCContainer::FillTraceLineInfo
The DXBC container adds output to the disassembly view, need to include that output when computing the per instruction lineInfo "disassemblyLine" value

Removed "void Program::ProcessFunctions(std::function<bool(const Function *)> callback) const;"
2024-06-03 12:32:21 +01:00
Jake Turner 701220cc63 RD DXIL Disassembly fix getival to work with Literal
Inlined getival to get around template instantiation outside of the compilation unit
2024-06-03 12:26:09 +01:00
Jake Turner a6b018b44b Added size_t DXIL::Program:::GetInstructionCount() const; 2024-06-03 12:24:32 +01:00
Jake Turner 8c23b861d8 Change DXBC::BasicDemangle() to pass by reference instead of value 2024-06-03 12:21:57 +01:00
Jake Turner ebbea348bc Added dxil_stringise.cpp
Moved DoStringise() methods from dxil_reflect.cpp and dxil_disassemble.cpp to dxil_stringise.cpp
2024-06-03 12:12:44 +01:00
Jasmine Hansen 71b8a7d600 Update postvs and overlay helpers for shader object 2024-06-03 09:58:41 +01:00
baldurk 205b627dd4 Bump version to v1.34 2024-05-31 20:23:54 +01:00
baldurk cae2893238 Fix CI checking commit messages not checking latest
* Also ignore (temporarily?) a commit that fails the check
v1.33
2024-05-31 18:39:06 +01:00
baldurk 341f9a689b Fix shader viewer bookmarks to work with editing and viewing shaders
* Previously it was only applied for debugging shaders.
2024-05-31 15:26:07 +01:00
baldurk 56976ff4a5 Make missing postvs outputs non-fatal 2024-05-31 15:25:47 +01:00
Jake Turner 76f917621b Ignore static bindings which are not present in the descriptor set layout 2024-05-31 11:38:33 +01:00
Jake Turner 171278bfca For descriptor copies don't try to mark the AS as frame referenced 2024-05-31 11:13:40 +01:00
baldurk be905c031d Only apply contrasting foreground colour if there is a background colour 2024-05-30 12:31:51 +01:00
baldurk 62e7ccda1c Update shader fetch example for new APIs 2024-05-29 10:57:37 +01:00
Jake Turner 886d7f6eda RD DXIL Disassembly simplify the getelementr ptr demangle code
Similar to DXBC::BasicDemangle() which can't be used because the pointer string is an escaped string
2024-05-29 07:29:05 +01:00
Jake Turner 44fdde8b3e DXIL Disassembly tweaks to getelementptr, RawBufferLoad, RawBufferStore
Fixed getelementptr showing raw type and converted type
Improved RawBufferLoad, RawBufferStore display when displaying byteOffset
2024-05-29 07:28:33 +01:00
Jake Turner 1a36875bc0 Do not include immutable sampler-only descriptors in initial state 2024-05-29 06:01:28 +01:00
baldurk 45db4fef33 Handle getting descriptor access at EIDs where root params are unbound 2024-05-28 15:09:11 +01:00
baldurk 11463be8a7 Update stale mentions of Vulkan 1.2 2024-05-28 15:09:11 +01:00
Jake Turner 666c248b3a RD DXIL Disassembly : don't show "unknown" cbuffer member data
Fallback to show the cbuffer load i.e.

_dx.types.CBufRet.i32 _50 = cbuffer1.Load(byte_offset = 80);
2024-05-28 11:49:59 +01:00
Jake Turner 322722feba RD DXIL Disassembly handle non 32-bit cbuffer loads
Use the byte size of the return struct to determine how to iterate over the cbuffer members and choose which ones to display.
Cbuffer members which don't fit into the return struct element size are displayed as "<padding>"
2024-05-27 18:09:05 +01:00
Jake Turner e84eed56ff RD DXIL Disassembly support for "CreateHandleFromBinding" 2024-05-27 17:01:41 +01:00
baldurk 10be601839 Disassemble empty struct definitions as {} to match dxc 2024-05-27 16:21:32 +01:00
baldurk c0b992f643 Don't try to disassemble textures that are declared as struct members
* These are dummy members are not really contained in cbuffers or other structs,
  but dxc emits them anyway.
2024-05-27 16:21:32 +01:00
baldurk b93f23e2fc Process snorm/unorm input or output variables from shaders 2024-05-27 16:21:32 +01:00
baldurk 0df08e20b4 Handle mesh payloads not coming from global variables 2024-05-27 16:21:32 +01:00
Jake Turner 7362f51b58 RD DXIL Disassembly improvements
Handle internal functions which are not in the entry point interfaces i.e. hull shader patch constant helper function

Hand decode SM 6.6 resource handle DX OpCodes: CreateHandleFromHeap, AnnotateHandle
2024-05-27 15:01:28 +01:00
baldurk 12fc6a9835 Use dxc-faithful intrinsic signatures for dxc disassembly 2024-05-27 13:51:56 +01:00
baldurk 170ba62bcf Handle calling GetDevice for a dxgi device on a swapchain 2024-05-27 10:13:58 +01:00
baldurk 8b1d0956a2 Fix vulkan capture/replay physical device names in message 2024-05-27 10:13:58 +01:00
baldurk 0e61e7a307 Revert 19701205 with race condition, use existing identical helper 2024-05-27 10:13:58 +01:00
baldurk a5332bc764 Don't try to patch empty TLAS builds 2024-05-27 10:13:58 +01:00
baldurk c59f46e8dc Don't treat missing BLASs as fatal
* It's possible to create a TLAS referencing a BLAS, destroy the buffer backing
  the BLAS, and we won't know the TLAS is invalid and will try to serialise it.
2024-05-27 10:13:57 +01:00
baldurk 9332bd34f9 Fix handling of AS copies 2024-05-27 10:13:57 +01:00
baldurk 7e8aa58ea1 Fix alignment issues with heap lookup data 2024-05-27 10:13:57 +01:00
baldurk 0497e2d226 Defer creating RT internal resources until after creation
* This will allow us to wrap the resources which can be useful for self-
  introspection
2024-05-27 10:13:57 +01:00
baldurk b715cce04f Report original GPU VA to UI on D3D12
* In theory this was useful for interpreting execute indirect buffers previously
  but it will be more common.
2024-05-27 10:13:57 +01:00
baldurk 176a0909fa Save buffer formats immediately on change 2024-05-27 10:13:57 +01:00
Louis de Carufel 0e64cc5368 Added shader viewer bookmarks and find shortcuts. 2024-05-24 10:35:06 +01:00