mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Update fetch_shader python example to latest API
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user