diff --git a/docs/python_api/examples/renderdoc/decode_mesh.py b/docs/python_api/examples/renderdoc/decode_mesh.py index 6f84f5df4..db2005107 100644 --- a/docs/python_api/examples/renderdoc/decode_mesh.py +++ b/docs/python_api/examples/renderdoc/decode_mesh.py @@ -137,9 +137,9 @@ def getMeshOutputs(controller, postvs): # Construct a resource format for this element meshOutput.format = rd.ResourceFormat() - meshOutput.format.compByteWidth = 8 if attr.compType == rd.CompType.Double else 4 + meshOutput.format.compByteWidth = rd.VarTypeByteSize(attr.varType) meshOutput.format.compCount = attr.compCount - meshOutput.format.compType = attr.compType + meshOutput.format.compType = rd.VarTypeCompType(attr.varType) meshOutput.format.type = rd.ResourceFormatType.Regular meshOutput.name = attr.semanticIdxName if attr.varName == '' else attr.varName diff --git a/docs/python_api/examples/renderdoc/decode_mesh.rst b/docs/python_api/examples/renderdoc/decode_mesh.rst index 46fcdf5a0..9bba1e653 100644 --- a/docs/python_api/examples/renderdoc/decode_mesh.rst +++ b/docs/python_api/examples/renderdoc/decode_mesh.rst @@ -193,9 +193,9 @@ The position output is also treated specially - it always appears first, regardl # Construct a resource format for this element meshOutput.format = rd.ResourceFormat() - meshOutput.format.compByteWidth = 8 if attr.compType == rd.CompType.Double else 4 + meshOutput.format.compByteWidth = rd.VarTypeByteSize(attr.varType) meshOutput.format.compCount = attr.compCount - meshOutput.format.compType = attr.compType + meshOutput.format.compType = rd.VarTypeCompType(attr.varType) meshOutput.format.type = rd.ResourceFormatType.Regular meshOutput.name = attr.semanticIdxName if attr.varName == '' else attr.varName diff --git a/docs/python_api/renderdoc/funcs.rst b/docs/python_api/renderdoc/funcs.rst index 56493dd12..df3c0be7e 100644 --- a/docs/python_api/renderdoc/funcs.rst +++ b/docs/python_api/renderdoc/funcs.rst @@ -78,3 +78,5 @@ Maths & Utilities .. autofunction:: renderdoc.MaskForStage .. autofunction:: renderdoc.StartSelfHostCapture .. autofunction:: renderdoc.EndSelfHostCapture +.. autofunction:: renderdoc.VarTypeByteSize +.. autofunction:: renderdoc.VarTypeCompType