|
|
@@ -201,6 +201,22 @@ void gs_shader::Compile(const char *shaderString, const char *file,
|
|
|
else
|
|
|
throw HRError("Failed to compile shader", hr);
|
|
|
}
|
|
|
+
|
|
|
+#ifdef DISASSEMBLE_SHADERS
|
|
|
+ ComPtr<ID3D10Blob> asmBlob;
|
|
|
+
|
|
|
+ if (!device->d3dDisassemble)
|
|
|
+ return;
|
|
|
+
|
|
|
+ hr = device->d3dDisassemble((*shader)->GetBufferPointer(),
|
|
|
+ (*shader)->GetBufferSize(), 0, nullptr, &asmBlob);
|
|
|
+
|
|
|
+ if (SUCCEEDED(hr) && !!asmBlob && asmBlob->GetBufferSize()) {
|
|
|
+ blog(LOG_INFO, "=============================================");
|
|
|
+ blog(LOG_INFO, "Disassembly output for shader '%s':\n%s",
|
|
|
+ file, asmBlob->GetBufferPointer());
|
|
|
+ }
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
inline void gs_shader::UpdateParam(vector<uint8_t> &constData,
|