mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Set nextDrawable TLS data before creating hook
This commit is contained in:
committed by
Baldur Karlsson
parent
259205fdc9
commit
8d7d060e63
@@ -72,10 +72,12 @@ void WrappedMTLDevice::MTLHookObjcMethods()
|
||||
if(s_hookObjcMethods)
|
||||
return;
|
||||
|
||||
nextDrawableTLSSlot = Threading::AllocateTLSSlot();
|
||||
Threading::SetTLSValue(WrappedMTLDevice::nextDrawableTLSSlot, (void *)(uintptr_t) false);
|
||||
|
||||
Method m =
|
||||
class_getInstanceMethod(objc_lookUpClass("CAMetalLayer"), sel_registerName("nextDrawable"));
|
||||
real_CAMetalLayer_nextDrawable = method_setImplementation(m, (IMP)hooked_CAMetalLayer_nextDrawable);
|
||||
nextDrawableTLSSlot = Threading::AllocateTLSSlot();
|
||||
}
|
||||
|
||||
void WrappedMTLDevice::MTLFixupForMetalDriverAssert()
|
||||
|
||||
Reference in New Issue
Block a user