Commit Graph

13009 Commits

Author SHA1 Message Date
Jake Turner 6931c4d93b PR Feedback for WrappedMTLCommandBuffer
Moved small inline methods to be inside the class declaration instead of outside
2022-04-13 11:33:03 +01:00
Jake Turner 12d9d347c2 PR feedback for CmdBufferRecordingInfo
Removed namespace MetalResources scope
Rename it to MetalCmdBufferRecordingInfo to remove conflict with Vulkan struct of the same name.
Mark MetalCmdBufferRecordingInfo default constructor as deleted
Added MetalCmdBufferRecordingInfo constructor which takes WrappedMTLCommandQueue* and initializes member variables to sensible defaults.
Removed "WrappedMTLDevice *device;" member variable.
2022-04-13 11:33:03 +01:00
Jake Turner 9271e44e23 De-serialise ResourceId default resource to NULL
Used during structured exporting
2022-04-13 11:33:03 +01:00
Jake Turner ecb75feddb Added wrapped MTLCommandBuffer
Implemented capture serialisation for 
MTLCommandQueue::commandBuffer
MTLCommandBuffer::presentDrawable
MTLCommandBuffer::commit
2022-04-13 11:33:03 +01:00
Le Philousophe c3ed881b9f Delete render buffer only after finish using it 2022-04-11 13:23:53 +01:00
Le Philousophe 3b8ac99a40 Unbind textures before deleting them
Without this valgrind complains about use-after-free
2022-04-11 13:23:53 +01:00
baldurk 4c7d59c008 Update toolwindowmanager to 299471d 2022-04-11 13:13:21 +01:00
baldurk be38f45171 Fix handling of split-register matrix source variables. Closes #2536 2022-04-11 12:57:10 +01:00
baldurk 8c57a14bed Serialise encoded color in obfuscated-style D3D12 markers. Closes #2537 2022-04-08 17:45:25 +01:00
baldurk 9ceff0a91b Fix handling of sub-page-sized mip tails with D3D-style wrapped set 2022-04-08 17:45:24 +01:00
baldurk 3e5d912767 Ensure injected DLL doesn't run out of stack space
* GL hooks registration was using an obscene amount of stack because MSVC
  doesn't share stack for mutually exclusive locals (all the temporary
  FunctionHooks) so an executable that reduces the default thread stack size
  enough would fail to start.
* We also explicitly allocate 1MB of stack for injecting our DLL in future to
  avoid this issue.
2022-04-08 17:45:24 +01:00
Shahbaz Youssefi 74178e8aeb Support VK_QCOM_render_pass_store_ops
This extension is the origin of STORE_OP_NONE, which found its way to
VK_EXT_load_store_op_none and VK_KHR_dynamic_rendering.  RenderDoc
supports STORE_OP_NONE just fine, this change simply adds this extension
to RenderDoc's allowlist.
2022-04-08 13:09:46 +01:00
Tatsuyuki Ishi b215fbe306 vk_shader_feedback: Fix crash with dynamic rendering
RenderPass can be null handle when dynamic rendering is used. Retrieve the
respective information from pipeline info instead.
2022-04-08 13:04:21 +01:00
baldurk 4a43325693 Bump version to 1.20 2022-03-31 17:48:39 +01:00
baldurk eb1e625b96 Add better documentation for how to specify separate shader debug info v1.19 2022-03-30 14:53:20 +01:00
baldurk cd10efb693 Fix some abstraction defines for custom shaders 2022-03-30 13:05:46 +01:00
baldurk 9c1eeed29b Fix copy-paste error with GLSL unsigned integer texture declarations 2022-03-30 12:51:36 +01:00
baldurk 378cad24bd Fix some missing comments in custom shader snippet generation 2022-03-30 12:48:38 +01:00
baldurk 4dcdd6dbd6 Register hooks for unsupported functions
* This is necessary on e.g. Windows where some legacy functions are only
  exported via the dll and need to be 'properly' hooked and not just intercepted
  via GL's GetProcAddr
2022-03-30 11:49:35 +01:00
baldurk 1c265bd1df Fix calculation of temp memory for pRenderingInfo 2022-03-25 18:17:24 +00:00
baldurk 2d518a5d90 Re-fetch device after fatal error check 2022-03-25 17:50:50 +00:00
baldurk b9d18690bb Treat surfaces with no capabilities as swap failure
* This can sometimes happen when shutting down
2022-03-25 17:50:44 +00:00
baldurk e660fc85dd Ensure custom shader output is updated before fetching histogram
* The custom shader output is updated when displaying, but this can lag by a
  call or two (a 'frame' if you like) when the display is only triggered by a
  window repaint and the histogram can be fetched first. Since the custom shader
  apply is only expensive when we need to recreate the output texture, we can do
  it on-demand similar to what we do with the overlay texture.
2022-03-25 12:12:39 +00:00
Jake Turner 0173671fde Fix compile error when building on SDK 11.1
SDK 11.1 and SDK 12 have different declaration for MTLDevice::supportsBCTextureCompression. 
On SDK 11.1 it is marked as API_AVAILABLE for ios and on SDK 12 is marked as API_UNAVAILABLE ios. 
Guard the API_UNAVAILABLE(ios) declaration to only be included when compiling for SDK 12.0 or above.

The compile error message before the fix:

renderdoc/driver/metal/metal_device_bridge.mm:158:64: error: method cannot be unavailable on iOS when the protocol method it implements is available [-Werror,-Wavailability]
69
- (BOOL)supportsBCTextureCompression API_AVAILABLE(macos(11.0))API_UNAVAILABLE(ios)
2022-03-25 12:01:29 +00:00
Jake Turner 58f6061bdb Enable Metal for Mac CI builds 2022-03-25 12:01:29 +00:00
Jake Turner 02d72c038e MetalChunk entries for MTLCommandQueue 2022-03-25 10:24:22 +00:00
Jake Turner 61bac7a3ba MetalChunk entries for MTLDevice 2022-03-25 10:24:22 +00:00
Jake Turner 565e4a711a MetalChunk entries for MTLLibary and MTLFunction 2022-03-25 10:24:22 +00:00
Jake Turner 7de4345426 Serialisation for MTLLibary::newFunctionWithName 2022-03-25 10:24:22 +00:00
Jake Turner 0d58ae8c2e Tweak element name in Serialise_newDefaultLibrary
buffer -> data
2022-03-25 10:24:22 +00:00
Jake Turner 6ec18421bb Add obj-c message forwarding to real object 2022-03-25 10:24:22 +00:00
Jake Turner 260ecd28f6 Add missing dealloc messages to obj-c wrappers 2022-03-25 10:24:22 +00:00
Jake Turner d4cf31689e Serialise Device as part of MTLDevice API capture 2022-03-25 10:24:22 +00:00
baldurk 47f87e95f1 Don't overwrite sampler type when structurising. Closes #2528 2022-03-23 11:17:36 +00:00
baldurk ab228c51b8 Update feedback code to not use ptr-to-function type
* The previous PR that added this code existed before ptr-to-function was
  stripped down to just function for function types, so this change brings it in
  line.
2022-03-21 11:34:00 +00:00
baldurk ef68bb1646 Add sanity check that direct-heap access has a heap bound 2022-03-21 11:34:00 +00:00
baldurk d7dc8a5cd0 Fix code not properly using vulkan dynamic vertex inputs. Closes #2527 2022-03-21 11:34:00 +00:00
Benoit Dumesnil 2ace1fe84d Add test of D3D12 bindless feedback for shadermodel 6.6. 2022-03-21 11:30:47 +00:00
Benoit Dumesnil e47450a43b Fix test of D3D12 bindless feedback.
Fix a typo in a comment in D3D12_Descriptor_Indexing.py.
Fix UAV using a typed buffer view instead of a structured buffer view.
Fix SetDescriptorHeaps being called before ClearUnorderedAccessViewUint
2022-03-21 11:30:47 +00:00
Benoit Dumesnil 29770ef762 Update D3D headers in test project to latest D3D12 headers 2022-03-21 11:30:47 +00:00
Benoit Dumesnil dfd00b1e38 Add support for shader model 6.6 bindless resources. 2022-03-21 11:30:47 +00:00
Benoit Dumesnil c122b41155 Fix possible uint32 overflow when using unbounded resource tables. 2022-03-21 11:30:47 +00:00
Benoit Dumesnil 620d5c1fce Fix dx.op.annotateHandle having changed format. 2022-03-21 11:30:47 +00:00
Jake Turner a4d5bbe801 Use Unwrap() instead of class method GetReal()
Simplify code to get objc bridge from API result to single line instead of using a temporary variable
Fix missing forward declaration for bool IsObjCBridge(MTL::CPPTYPE *objCWrapped);
2022-03-21 11:04:32 +00:00
Jake Turner 065d229607 Added serialisation of WrappedMTL* types via IDs
Simplify code to get objc bridge from API result to single line instead of using a temporary variable.
Fix missing forward declaration for bool IsObjCBridge(MTL::CPPTYPE *objCWrapped);
2022-03-21 11:04:32 +00:00
baldurk 7a29e6a6bb Add a fallback path to manually get git commit on VS2022
* Loading LibGit2Sharp.dll by hand in msbuild no longer works in VS2022 due to
  architecture changes. We can fairly reliably get the same result by manually
  reading (and following the ref in) .git/HEAD
2022-03-18 14:10:28 +00:00
baldurk c161f6942c Test building in VS2022 in CI, drop VS2017 check 2022-03-18 14:10:28 +00:00
baldurk 20744fb1a2 Fix cmake version check to work in older cmake 2022-03-18 14:10:28 +00:00
baldurk 05d31025c0 Test that minimum cmake version works in CI 2022-03-18 14:10:28 +00:00
baldurk 1591ebcb1e Represent function types as plain func, not ptr-to-func
* This is not how LLVM does things, but sometimes DXIL blobs don't have the ptr-
  to-func types present, and we always access the real function type anyway so
  it should be safe to store the direct function type.
2022-03-17 23:49:09 +00:00