All nvapi opcodes are treated as supported

* Some can't be debugged, but we can capture/replay/disassemble all opcodes so
  don't block them.
This commit is contained in:
baldurk
2020-11-04 15:16:07 +00:00
parent c7e1ea08c4
commit 47680e3821
3 changed files with 2 additions and 21 deletions
+2 -10
View File
@@ -168,13 +168,8 @@ private:
// is a COM-breaking backdoor
if(SUCCEEDED(hr))
{
NvAPI_Status ret = nvhooks.NvAPI_D3D11_IsNvShaderExtnOpCodeSupported()(nvapiDev->GetReal(),
opCode, pSupported);
if(pSupported)
*pSupported = (*pSupported && SupportedOpcode((NvShaderOpcode)opCode)) ? TRUE : FALSE;
return ret;
return nvhooks.NvAPI_D3D11_IsNvShaderExtnOpCodeSupported()(nvapiDev->GetReal(), opCode,
pSupported);
}
else
{
@@ -204,9 +199,6 @@ private:
dev->Release();
if(pSupported)
*pSupported = (*pSupported && SupportedOpcode((NvShaderOpcode)opCode)) ? TRUE : FALSE;
return ret;
}
}
-10
View File
@@ -36,9 +36,6 @@ namespace
#include "official/nvapi/nvapi_interface.h"
};
RDOC_CONFIG(bool, NV_nvapi_AllowUnknownShaderOpcodes, false,
"Allow shader opcodes that we don't support in debugging or disassembly.");
typedef void *(*PFN_nvapi_QueryInterface)(NvU32 id);
struct ReplayNVAPID3DDevice : INVAPID3DDevice
@@ -149,13 +146,6 @@ uint32_t getId(const char *name)
return 0;
}
bool SupportedOpcode(NvShaderOpcode opcode)
{
if(NV_nvapi_AllowUnknownShaderOpcodes())
return true;
return opcode == NvShaderOpcode::U64Atomic;
}
// try to initialise nvapi for replay
INVAPID3DDevice *InitialiseNVAPIReplay()
{
-1
View File
@@ -81,4 +81,3 @@ INVAPID3DDevice : public IUnknown
};
INVAPID3DDevice *InitialiseNVAPIReplay();
bool SupportedOpcode(NvShaderOpcode opcode);