ComputeShaderFile
Inherits: Resource
Description
Compiled compute shader with SPIR-V and reflection information for each shader kernel.
In most cases, this can be used as a drop-in replacement for RDShaderFile.
Properties
|
|
Methods
|
get_spirv(version: |
Array[ |
get_version_list(kernel_index: |
void |
set_bytecode(bytecode: |
Enumerations
enum MatrixLayout: 🔗
MatrixLayout UNKNOWN = 0
Unknown matrix layout.
MatrixLayout ROW_MAJOR = 1
Matrices are stored using row-major order.
MatrixLayout COLUMN_MAJOR = 2
Matrices are stored using column-major order.
Property Descriptions
String base_error 🔗
void set_base_error(value:
String)Stringget_base_error()
The base compilation error message, which indicates errors not related to a specific shader stage if non-empty. If empty, shader compilation is not necessarily successful (check each ComputeShaderKernel's RDShaderSPIRV error message members).
Array[ComputeShaderKernel] kernels 🔗
void set_kernels(value: Array[ComputeShaderKernel])
Array[ComputeShaderKernel] get_kernels()
The kernels declared in this shader file, one for each entry-point.
StructTypeLayoutShape parameters 🔗
void set_parameters(value: StructTypeLayoutShape)
StructTypeLayoutShape get_parameters()
Get the reflection information of the global parameters for this shader. You typically won't need to access this, but it is used under the hood by ComputeShaderTask to bind data to the correct descriptor slots.
Method Descriptions
RDShaderSPIRV get_spirv(version: StringName = &"", kernel_index: int = 0) const 🔗
Returns the SPIR-V intermediate representation of the specified kernel (at kernel_index).
Array[StringName] get_version_list(kernel_index: int = 0) const 🔗
Returns the list of compiled versions for this shader. This is always empty for Slang compute shaders.
void set_bytecode(bytecode: RDShaderSPIRV, version: StringName = &"", kernel_index: int = 0) 🔗
Sets the SPIR-V bytecode that will be compiled for the specified kernel (at kernel_index).