(controller)
| 27 | printVar(v, indent + ' ') |
| 28 | |
| 29 | def sampleCode(controller): |
| 30 | print("Available disassembly formats:") |
| 31 | |
| 32 | targets = controller.GetDisassemblyTargets(True) |
| 33 | |
| 34 | for disasm in targets: |
| 35 | print(" - " + disasm) |
| 36 | |
| 37 | target = targets[0] |
| 38 | |
| 39 | state = controller.GetPipelineState() |
| 40 | |
| 41 | # For some APIs, it might be relevant to set the PSO id or entry point name |
| 42 | pipe = state.GetGraphicsPipelineObject() |
| 43 | entry = state.GetShaderEntryPoint(rd.ShaderStage.Pixel) |
| 44 | |
| 45 | # Get the pixel shader's reflection object |
| 46 | ps = state.GetShaderReflection(rd.ShaderStage.Pixel) |
| 47 | |
| 48 | cb = state.GetConstantBlock(rd.ShaderStage.Pixel, 0, 0) |
| 49 | |
| 50 | print("Pixel shader:") |
| 51 | print(controller.DisassembleShader(pipe, ps, target)) |
| 52 | |
| 53 | cbufferVars = controller.GetCBufferVariableContents(pipe, ps.resourceId, rd.ShaderStage.Pixel, entry, 0, cb.descriptor.resource, 0, 0) |
| 54 | |
| 55 | for v in cbufferVars: |
| 56 | printVar(v) |
| 57 | |
| 58 | def loadCapture(filename): |
| 59 | # Open a capture file handle |
no test coverage detected