Commit Graph

12966 Commits

Author SHA1 Message Date
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
Jake Turner b72bdb2b9a Metal: basic hooking and MTLDevice wrapping 2022-03-09 10:29:03 +00:00
Remi Palandri 9d6526ff6e fix output window vulkan valid/crashes 2022-03-09 10:15:05 +00:00
baldurk ad9a4e854f Fix to bizarre CI failure
* For some reason using != on these QSet<QString> fails in release only on
  github's CI only. I don't know what is broken on their runners but this
  workaround fixes it.
2022-03-09 03:02:13 +00:00
baldurk a265a8363d Compile fixes 2022-03-08 18:32:31 +00:00
baldurk 7b4f535663 Refactor watch variables to support complex types including structs 2022-03-07 18:45:57 +00:00
baldurk b0db52c80b Show variable context menu for constants panel as well 2022-03-07 14:45:44 +00:00
baldurk 26de305e1a Allow adding a watch for any text selection 2022-03-07 14:45:44 +00:00
baldurk 8e76069ecf Switch watch variables control from table to tree widget
* This will allow watching structs or arrays
2022-03-07 14:45:44 +00:00
baldurk 3af7458763 Continue to show last value of a watch variable when it's not available 2022-03-07 14:45:44 +00:00
baldurk 87f2adc829 Improve mapping of source locations to instructions in shader debugging 2022-03-07 14:45:44 +00:00
baldurk b35b744ada Verify captures are still present before showing them in connection
* If the RenderDoc UI connects to a program, opens then deletes the captures,
  then closes and is opened again - we don't want to report those deleted
  captures as if they still exist. This now clears out any captures that no
  longer exist.
2022-03-07 14:45:44 +00:00
baldurk 4d631e2c72 Check for dynamic rendering inheritance if used with secondary cmdbufs 2022-03-07 14:17:29 +00:00