Fix python examples not being up to date with latest API changes

This commit is contained in:
baldurk
2020-07-20 10:52:59 +01:00
parent 8299fb5039
commit 6a8e7cbbe5
3 changed files with 3 additions and 5 deletions
@@ -46,7 +46,6 @@ def unpackData(fmt, data):
formatChars[rd.CompType.UScaled] = formatChars[rd.CompType.UInt]
formatChars[rd.CompType.SNorm] = formatChars[rd.CompType.SInt]
formatChars[rd.CompType.SScaled] = formatChars[rd.CompType.SInt]
formatChars[rd.CompType.Double] = formatChars[rd.CompType.Float]
# We need to fetch compCount components
vertexFormat = str(fmt.compCount) + formatChars[fmt.compType][fmt.compByteWidth]
@@ -164,7 +163,7 @@ def getMeshOutputs(controller, postvs):
# while others will tightly pack
fmt = meshOutputs[i].format
accumOffset += (8 if fmt.compType == rd.CompType.Double else 4) * fmt.compCount
accumOffset += (8 if fmt.compByteWidth > 4 else 4) * fmt.compCount
return meshOutputs
@@ -105,7 +105,6 @@ For normalised formats - :py:attr:`~renderdoc.CompType.UNorm` and :py:attr:`~ren
formatChars[rd.CompType.UScaled] = formatChars[rd.CompType.UInt]
formatChars[rd.CompType.SNorm] = formatChars[rd.CompType.SInt]
formatChars[rd.CompType.SScaled] = formatChars[rd.CompType.SInt]
formatChars[rd.CompType.Double] = formatChars[rd.CompType.Float]
# We need to fetch compCount components
vertexFormat = str(fmt.compCount) + formatChars[fmt.compType][fmt.compByteWidth]
@@ -220,7 +219,7 @@ The position output is also treated specially - it always appears first, regardl
# while others will tightly pack
fmt = meshOutputs[i].format
accumOffset += (8 if fmt.compType == rd.CompType.Double else 4) * fmt.compCount
accumOffset += (8 if fmt.compByteWidth > 4 else 4) * fmt.compCount
Example Source
--------------
@@ -71,7 +71,7 @@ Sample output:
Counter 1 (GPU Duration):
Time taken for this event on the GPU, as measured by delta between two GPU timestamps.
Returns 8 byte CompType.Double, representing CounterUnit.Seconds
Returns 8 byte CompType.Float, representing CounterUnit.Seconds
Counter 2 (Input Vertices Read):
Number of vertices read by input assembler.
Returns 8 byte CompType.UInt, representing CounterUnit.Absolute