Update fetch_shader python example to latest API

This commit is contained in:
baldurk
2020-09-14 15:58:20 +01:00
parent 8615c5fc14
commit c8fcdbae05
2 changed files with 3 additions and 3 deletions
@@ -29,7 +29,7 @@ def printVar(v, indent = ''):
def sampleCode(controller):
print("Available disassembly formats:")
targets = controller.GetDisassemblyTargets()
targets = controller.GetDisassemblyTargets(True)
for disasm in targets:
print(" - " + disasm)
@@ -3,14 +3,14 @@ Fetch Shader details
In this example we will fetch the disassembly for a shader and a set of constant values.
When disassembling a shader there may be more than one possible representation available, so we first enumerate the formats that are available using :py:meth:`~renderdoc.ReplayController.GetDisassemblyTargets` before selecting a target to disassemble to. The first target is always a reasonable default, and there will be at least one:
When disassembling a shader there may be more than one possible representation available, so we first enumerate the formats that are available using :py:meth:`~renderdoc.ReplayController.GetDisassemblyTargets` before selecting a target to disassemble to. The first target is always a reasonable default, and there will be at least one. :py:meth:`~renderdoc.ReplayController.GetDisassemblyTargets` takes a parameter indicating whether the pipeline state object will be available - some disassembly targets require the full pipeline and are not available when disassembling only a shader in isolation:
.. highlight:: python
.. code:: python
print("Available disassembly formats:")
targets = controller.GetDisassemblyTargets()
targets = controller.GetDisassemblyTargets(True)
for disasm in targets:
print(" - " + disasm)