Commit Graph

12978 Commits

Author SHA1 Message Date
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
baldurk 5076ab1b4d Allow easier switching between offline/online reflection for tests 2022-03-17 18:10:06 +00:00
baldurk 345206b2b8 Fix validation error with inline uniform block writes 2022-03-17 18:10:05 +00:00
baldurk f4d9cf2b7e Fix UAV slot matching for D3D11 with merged UAV/RTV bindings 2022-03-17 18:10:05 +00:00
Jake Turner b743580b79 Use new macros for serialising APIs with returns
Use DECLARE_FUNCTION_WITH_RETURN_SERIALISED & INSTANTIATE_FUNCTION_WITH_RETURN_SERIALISED for
MTLDevice::newDefaultLibrary
MTLDevice::newLibraryWithSource
2022-03-17 10:19:21 +00:00
Jake Turner 0c8e41b201 Added wrapped MTLCommandQueue
Implemented capture serialisation for MTLDevice::newCommandQueue
Introduce new helper macros DECLARE_FUNCTION_WITH_RETURN_SERIALISED & INSTANTIATE_FUNCTION_WITH_RETURN_SERIALISED for serialising APIs with return values that need serialising ie. Metal resource creation APIs
2022-03-17 10:19:21 +00:00
Jake Turner f01a4df484 Fix Xcode 13.3 and Clang 13.x compile errors
Disable warnings
-Wunused-but-set-variable
-Wdeprecated-copy
2022-03-17 09:36:44 +00:00
Jake Turner 308456535f Rename ObjC helper GetResId -> GetResID 2022-03-15 19:01:52 +00:00
Jake Turner 6a657bd19f Rename ObjC helper GetId -> GetResId 2022-03-15 19:01:52 +00:00
Jake Turner b92dccc5e9 Add declarations for ObjC helper methods 2022-03-15 19:01:52 +00:00
Jake Turner ca7495a3c8 Remove extra #include "serialise/serialiser.h" 2022-03-15 19:01:52 +00:00
Jake Turner 247e2d7d0b Use bytebuf to serialise default library data 2022-03-15 19:01:52 +00:00
Jake Turner 00e8c31255 Change ObjCWrappedMTL* to ObjCBridgeMTL*
Change:
AllocateObjCWrapper -> AllocateObjCBridge
IsObjCWrapped -> IsObjCBridge
GetObjC -> GetObjCBridge
WrappedMTLObject::objc -> WrappedMTLObject::objcBridge
WrappedMTLObject::GetObjCWrappedMTLDevice -> WrappedMTLObject::GetObjCBridgeMTLDevice

Added GetReal() to C++ Wrapped objects
2022-03-15 19:01:52 +00:00
Jake Turner 5f3203c698 Hooking for MTLDevice basic new Library APIs 2022-03-15 19:01:52 +00:00
Jake Turner 88a2b3d74a Added basic MetalResourceManager implementation
Added MetalResourceManager to WrappedMTLDevice

Added helper macros:
METAL_NOT_IMPLEMENTED
METAL_NOT_IMPLEMENTED_ONCE

Added WrappedMTLDevice InitialState methods to metal_init_state.cpp
Added WrappedMTLDevice Serialiser helper methods to metal_core.cpp
2022-03-15 19:01:52 +00:00
Jake Turner d79617cb46 Added ResourceId GetResID(WrappedMTLObject *obj) 2022-03-15 19:01:52 +00:00
Jake Turner 33d8061555 Add MetalResourceRecord record to WrappedMTLObject 2022-03-15 19:01:52 +00:00
Jake Turner a764744bc0 Added ObjC::Get_defaultLibraryData 2022-03-15 19:01:52 +00:00
Jake Turner 07011138dc Add support for NS::String* serialisation 2022-03-15 19:01:52 +00:00
baldurk 6d5140e5b5 Remove links to deleted wiki pages, and planned/roadmap features doc 2022-03-15 14:34:38 +00:00
baldurk 43091746a4 Promote CmdUpdateBuffer to be an action (similar to CmdFillBuffer)
* This is more consistent with our definition of actions as anything that can or
  does significantly mutate a resource.
2022-03-15 13:47:25 +00:00
baldurk e2bdd618d3 Set default sampler parameters when none is bound. Closes #2520 2022-03-15 11:31:19 +00:00
baldurk efbc17335b Make sure to remove secondary subpass flag on renderpasses
* When replaying draws alone in a primary command buffer we need to revert back
  to normal draws in subpasses.
2022-03-15 10:53:26 +00:00
Jake Turner 036a5c8da0 Added wrapped MTLLibrary & MTLFunction
Not currently created or used
2022-03-12 12:08:23 +00:00
Jake Turner 596e7f0e11 Added a couple of helpers to WrappedMTLObject
Dealloc()
GetObjCWrappedMTLDevice()
2022-03-12 12:08:23 +00:00
Jake Turner ef85b49e91 Add CaptureState& to WrappedMTLObject constructor 2022-03-12 12:08:23 +00:00
Jake Turner 86f4f2f70e Added MetalResourceType enum
Switch to use include of "metal_common.h" instead of "metal_types.h"
2022-03-12 12:08:23 +00:00
Jake Turner 332f3e6143 Added and used new macro METAL_NOT_HOOKED
Replaces "NSLog(@"Not hooked %@", NSStringFromSelector(_cmd));"
Added comments to explain use of methodSignatureForSelector & forwardInvocation methods
2022-03-12 12:08:23 +00:00
Jake Turner 6d24e2b100 Change Metal hooking to use RegisterFunctionHook
Instead of direct function pointer capture at compile time
2022-03-12 12:08:23 +00:00
Jake Turner 91df933215 Updated copyright year to 2022 2022-03-12 12:08:23 +00:00
baldurk ab19941650 Use _NT_SYMBOL_PATH where available as search path for callstacks 2022-03-10 11:13:26 +00:00
Remi Palandri 79aee1df43 full implementation of compute msaa-to-buffer 2022-03-09 12:10:47 +00:00