(filename)
| 65 | print("EID %d '%s' had no samples pass depth/stencil test!" % (r.eventId, draw.GetName(controller.GetStructuredFile()))) |
| 66 | |
| 67 | def loadCapture(filename): |
| 68 | # Open a capture file handle |
| 69 | cap = rd.OpenCaptureFile() |
| 70 | |
| 71 | # Open a particular file - see also OpenBuffer to load from memory |
| 72 | result = cap.OpenFile(filename, '', None) |
| 73 | |
| 74 | # Make sure the file opened successfully |
| 75 | if result != rd.ResultCode.Succeeded: |
| 76 | raise RuntimeError("Couldn't open file: " + str(result)) |
| 77 | |
| 78 | # Make sure we can replay |
| 79 | if not cap.LocalReplaySupport(): |
| 80 | raise RuntimeError("Capture cannot be replayed") |
| 81 | |
| 82 | # Initialise the replay |
| 83 | result,controller = cap.OpenCapture(rd.ReplayOptions(), None) |
| 84 | |
| 85 | if result != rd.ResultCode.Succeeded: |
| 86 | raise RuntimeError("Couldn't initialise replay: " + str(result)) |
| 87 | |
| 88 | return cap,controller |
| 89 | |
| 90 | if 'pyrenderdoc' in globals(): |
| 91 | pyrenderdoc.Replay().BlockInvoke(sampleCode) |
no test coverage detected