if 'pSwapChainDesc' in function.argNames():
print r' createWindow(pSwapChainDesc);'
- # Compensate for the fact we don't trace the software renderer
- # module LoadLibrary call
- if 'Software' in function.argNames():
- print r' if (Software) {'
- print r' retrace::warning(call) << "using WARP for software device\n";'
- print r' Software = LoadLibraryA("d3d10warp");'
- print r' }'
-
# Compensate for the fact we don't trace DXGI object creation
if function.name.startswith('D3D11CreateDevice'):
print r' if (DriverType == D3D_DRIVER_TYPE_UNKNOWN && !pAdapter) {'
print ' _maps[_this] = 0;'
print ' }'
+ # Attach shader byte code for lookup
+ if 'pShaderBytecode' in method.argNames():
+ ppShader = method.args[-1]
+ assert ppShader.output
+ print r' if (retrace::dumpingState && SUCCEEDED(_result)) {'
+ print r' (*%s)->SetPrivateData(d3dstate::GUID_D3DSTATE, BytecodeLength, pShaderBytecode);' % ppShader.name
+ print r' }'
+
def main():
print r'#include <string.h>'