Commit Graph

13094 Commits

Author SHA1 Message Date
baldurk ac886728ca Don't use docking UI for raw buffer viewer mode 2022-05-20 13:37:26 +01:00
baldurk 788b408bc2 Add test for GL reflection & reconstruction of runtime arrays 2022-05-20 13:37:26 +01:00
baldurk d2bbf76479 Fix struct declaration order when multiple structs use a common struct 2022-05-20 13:37:26 +01:00
baldurk 97a3943cdd Use packing rules when generating format strings for structs
* This allows the calling code to pass a hint of what packing is known or likely
  to be used, meaning less generated manual offsetting/padding when the implicit
  rules cover it.
2022-05-20 13:37:26 +01:00
baldurk 4dc7b3f8b7 Process packing rules when parsing formatting strings
* Instead of having a global tight/non-tight we now let the format string
  specify the packing rules (defaulting to scalar - i.e. tight packing as
  before), and use the resulting properties to calculate packing.
2022-05-20 13:37:26 +01:00
baldurk 7abe72be6b Add a function to estimate packing rules based on members
* This is primarily for GL/VK where the packing rules are not pre-defined and
  are also not explicitly reflected, so we instead see what rules are broken
  along the way to get the most conservative ruleset we can (that way minimising
  the need for manual offset decorations)
2022-05-20 13:37:26 +01:00
baldurk 43fda618f3 Add a packing rules struct to contain important packing rules
* There are several different API packing rulesets - GL has std140 and std430
  (and packed/shared, which is implementation defined but is likely to be
  similar to one of these or more conservative), VK effectively has rules for
  those both, as well as scalar packing which is close to C packing. D3D has one
  ruleset for cbuffer packing similar to std140, and effectively scalar for
  structured resources.
* These rulesets are quite similar and only differ by the properties here. There
  is one exception in the handling of empty structs - but in GLSL these are
  illegal so we will take the HLSL interpretation and always treat them as 0
  bytes.
2022-05-20 13:37:26 +01:00
baldurk cee4b25b28 Allow specifying offsets and struct strides manually with offsets
* Use these when generating buffer formatter strings instead of declaring manual
  padding variables.
2022-05-20 13:37:26 +01:00
baldurk 91f530f039 Parse out annotation name and parameter explicitly 2022-05-20 13:37:26 +01:00
baldurk a42f9edc3a Add annotation for binary view 2022-05-20 13:37:26 +01:00
baldurk 0890afd70e Specify rgb, hex, unorm/snorm and format packing as annotations 2022-05-20 13:37:26 +01:00
baldurk 01d9c6698b Add flags for format-intepreted packed types 2022-05-20 13:37:26 +01:00
baldurk cb49f21f2a Support enums in buffer formatter 2022-05-20 13:37:26 +01:00
baldurk 2399c9d136 Add support for bitfield packing in the buffer viewer formatting 2022-05-20 13:37:25 +01:00
baldurk 4e5e01e739 Improve consistency in shader constant reflection
* This reports the struct vartype now, ensures that struct sizes are always
  reported and alignments are respected, along with some other fixes to more
  accurately report memory layouts of structs.
2022-05-20 13:37:25 +01:00
baldurk cef00a102b Add struct VarType and combine flags into single field
* This is not a space saving right now, but allows more flags to be added
  without adding more storage.
2022-05-20 13:37:25 +01:00
Jake Turner 5a722b0efa Apple: cache debugger detection
Also added check if sysctl succeeded
2022-05-20 13:36:23 +01:00
Jake Turner 1d9be38380 Apple: support for Output_DebugMon log channel 2022-05-20 13:36:23 +01:00
Jake Turner 39cdfeb138 Set s_hookObjcMethods true in MTLHookObjcMethods
PR Feedback
2022-05-18 10:17:16 +01:00
Jake Turner 814ad814cd Adopt g_* naming convention for class static's
WrappedMTLDevice
real_CAMetalLayer_nextDrawable -> g_real_CAMetalLayer_nextDrawable
nextDrawableTLSSlot -> g_nextDrawableTLSSlot
2022-05-18 10:17:16 +01:00
Jake Turner 8d7d060e63 Set nextDrawable TLS data before creating hook 2022-05-18 10:17:16 +01:00
Jake Turner 259205fdc9 Remove extra rdDescriptor variable
PR Feedback.
2022-05-18 10:17:16 +01:00
Jake Turner 00fdb79d68 Hook CAMetalLayer nextDrawable message
PR Feedback.
Replace the brittle callstack string comparison
2022-05-18 10:17:16 +01:00
Jake Turner cef722a3d8 Simplify GetObjcArray implementation
PR Feedback.
Remove optimisation of the array of pointers on the stack
resize the to array when adding a valid object
2022-05-18 10:17:16 +01:00
Jake Turner ddf56d7b0d Move DoSerialise* methods to metal_serialise.cpp
PR Feedback.
Moved from metal_types.cpp -> metal_stringise.cpp
2022-05-18 10:17:16 +01:00
Jake Turner 7f19df6a2b Refactored WrappedMTLDevice texture helper methods
PR Feedback.
Replaced NewTexture & NewIOSurfaceTextureWithDescriptor with a single combined method Common_NewTexture
2022-05-18 10:17:16 +01:00
Jake Turner 8a85d15386 Added wrapped MTLRenderPipelineState & MTLTexture
Implemented capture serialisation for APIs:
MTLDevice::newRenderPipelineStateWithDescriptor
MTLDevice::newTextureWithDescriptor

Workaround to prevent Metal capture library assert triggering on the bridge MTLTexture object, add protocol "MTLTextureImplementation" to class "ObjCBridgeMTLTexture"

Serialisation for helper types:
MTL::TextureDescriptor
MTL::RenderPipelineDescriptor
MTL::RenderPipelineColorAttachmentDescriptor
MTL::PixelFormat
MTL::TextureType
MTL::PrimitiveTopologyClass
MTL::ResourceOptions
MTL::CPUCacheMode
MTL::StorageMode
MTL::HazardTrackingMode
MTL::TextureUsage
MTL::TextureSwizzleChannels
MTL::TextureSwizzle
MTL::ColorWriteMask
MTL::BlendOperation
MTL::BlendFactor
MTL::Winding
MTL::TessellationFactorFormat
MTL::TessellationControlPointIndexType
MTL::TessellationFactorStepFunction
MTL::TessellationPartitionMode
2022-05-18 10:17:16 +01:00
Jake Turner 1fdf8fc776 Fix MTL::LinkedFunctions bug in metal-cpp.h
MTLLinkedFunctions groups is an NS::Dictionary* not an NS::Array*
ie.
@property(readwrite, nonatomic, copy, nullable) NSDictionary<NSString *,NSArray<id<MTLFunction>> *> *groups;
2022-05-18 10:17:16 +01:00
baldurk 6dfca8bc87 Ensure vkCmdSetEvent2 struct chain is properly unwrapped. Closes #2582 2022-05-11 11:31:11 +01:00
baldurk ee3e77a5a7 Only update backing store if it has been allocated. Closes #2583 2022-05-11 00:52:42 +01:00
Jake Turner f3fe008d73 Store ObjC bridge class in Wrapped C++ classes
Stored as first member data in Wrapped C++ classes (m_ObjcBridge)
Can cast WrappedMTL* C++ pointer to ObjCBridgeMTL* type to use as the ObjC bridge class
Can cast ObjCBridgeMTL* pointer to WrappedMTL* C++ type to use as the Wrapped C++ class

Removed use of term ObjCBridge except on the ObjC bridge declarations

WrappedMTLObject member initialization
Prefer member initialization instead of constructor initialization list
2022-05-10 11:36:02 +01:00
baldurk 797fbcc181 Fix friendly name of registers in cbuffer declarations in dxbc 2022-05-09 11:32:25 +01:00
baldurk 2fc0866c9f Fix display of register names for matrix source variables 2022-05-09 11:32:11 +01:00
baldurk 8d34ea577d Add some missing tooltips for event browser location buttons 2022-05-06 13:17:09 +01:00
baldurk e5000ff91b Handle source variables that map to non-existant debug variables 2022-05-04 15:47:04 +01:00
baldurk 09519c802f Add usage from trailing events in command buffers 2022-05-04 15:47:04 +01:00
kkhalid 7d68116f5d Update dxbc_debug.cpp
fix clang-CL errors : call to constructor of 'ShaderVariable' is ambiguous
2022-05-04 10:01:13 +01:00
kkhalid 229d80b439 Update win32_threading.cpp
fixing compilation errors with clang-cl:  "template specialization requires 'template<>"
2022-05-04 10:01:13 +01:00
baldurk 4953adde03 Add a test of KHR_Dynamic_Rendering
* Not all possible interactions are currently tested, but at least the ones that
  have been broken in the past.
2022-05-03 18:47:27 +01:00
baldurk cfdbc3da57 Remove outdated experimental feature check 2022-05-03 15:30:47 +01:00
baldurk a9562c87f5 Test that discard patterns don't disturb bound state on vulkan 2022-05-03 15:30:20 +01:00
baldurk 96a7639c2e Add test of flow control constructs in D3D11 shader debugging 2022-05-03 14:06:07 +01:00
Remi Palandri acde46de57 move ms/compute shader system to single descriptorset 2022-05-03 12:33:46 +01:00
kmchan 85789e6209 Update HWCPipe to support performance counters of Dimensity 9000 SoC
Base HWCPipe commit: https://github.com/ARM-software/HWCPipe/commit/8cc02065b4ef249127aa0164dc0d62d65c0d4203
2022-05-03 12:26:32 +01:00
Yuxin Hu f54d28c2cd Support VK_GOOGLE_surfaceless_query
This change adds the VK_GOOGLE_surfaceless_query extension
to RenderDoc's allowlist.
2022-05-03 12:03:42 +01:00
baldurk d9c98f44f6 Fix stepping backwards working incorrectly with multiple location maps 2022-04-28 16:34:44 +01:00
baldurk 04c62f9595 Add a test debugging shaders on D3D12 with banned flags in the root sig 2022-04-28 14:19:38 +01:00
baldurk c1240effe3 Test alternative functions for binding contexts on GL 2022-04-28 14:05:38 +01:00
baldurk 7066692262 Test that sampler heaps are represented in structured data properly
* This is a test of a specific case of lazy serialisation, but in particular
  D3D12 descriptors do some aliasing tricks for types to compress the data, so
  repeated serialisation needs to be safe.
2022-04-28 13:39:37 +01:00
baldurk 4103f6a545 Properly zero initialise DDS return structure 2022-04-28 11:39:11 +01:00