GPUOpen-Tools / GPU-Reshape

GPU Reshape (GRS) is an API & vendor agnostic instrumentation framework, with instruction level validation.
Other
374 stars 12 forks source link

Native DXBC leads to a crash during instrumentation #30

Closed aurolou closed 1 year ago

aurolou commented 1 year ago

When I instrument the pipelines, my DX12 application crashes. I get the following GPUReshape callstack:

KernelBase.dll!00007ffd6577bdd2() Unknown GRS.Backends.DX12.Layer {5E2507A2-DA03-446F-9F65-7E133DF1276E}.dll!Detail::Break(const char message) Line 52 C++ GRS.Backends.DX12.Layer {5E2507A2-DA03-446F-9F65-7E133DF1276E}.dll!DXBCPhysicalBlockFeatureInfo::Compile() Line 53 C++ GRS.Backends.DX12.Layer {5E2507A2-DA03-446F-9F65-7E133DF1276E}.dll!DXBCPhysicalBlockTable::Compile(const DXCompileJob & job) Line 110 C++ GRS.Backends.DX12.Layer {5E2507A2-DA03-446F-9F65-7E133DF1276E}.dll!DXBCModule::Compile(const DXCompileJob & job, DXStream & out) Line 118 C++ GRS.Backends.DX12.Layer {5E2507A2-DA03-446F-9F65-7E133DF1276E}.dll!ShaderCompiler::CompileShader(const ShaderJob & job) Line 203 C++ GRS.Backends.DX12.Layer {5E2507A2-DA03-446F-9F65-7E133DF1276E}.dll!ShaderCompiler::Worker(void data) Line 103 C++ GRS.Backends.DX12.Layer {5E2507A2-DA03-446F-9F65-7E133DF1276E}.dll!Detail::DelegateCreator<void (cdecl ShaderCompiler::)(void )>::MakeFrameProxy::l2::::operator()(void frame, void ) Line 79 C++ GRS.Backends.DX12.Layer {5E2507A2-DA03-446F-9F65-7E133DF1276E}.dll!_Closure_wrapper_095bea0a_1::(void __p1, void p2) Line 76 C++ GRS.Backends.DX12.Layer {5E2507A2-DA03-446F-9F65-7E133DF1276E}.dll!Delegate<void cdecl(void )>::Invoke(void ) Line 46 C++ GRS.Backends.DX12.Layer {5E2507A2-DA03-446F-9F65-7E133DF1276E}.dll!DispatcherWorker::ThreadEntry() Line 66 C++

It hits the following assert: ASSERT(table.dxilModule, "PSV not supported for native DXBC");

I presume that GPU Reshape does not support this game based on what I see from the assert. Release mode GPU Reshape simply crashes the game with an access violation error. Rather than crashing the game, I would prefer to get an error/warning message in my GPU Reshape UI and let the game continue to run.

miguel-petersen commented 1 year ago

Hi Lou,

This is fixed in mainline, currently native DXBC modules are reported as "failed", but I'll see about hooking it up to something better.

There is a path which converts DXBC to DXIL using the MS provided utilities, but it's a little shaky at the moment, not production ready.

miguel-petersen commented 1 year ago

Closing this as the crash itself was fixed.