RDShaderSpirV
SPIR-V bytecode and per-stage diagnostics.
RDShaderSpirV contains stage bytes and errors. The object itself does not prove compilation succeeded: inspect the required stage error and bytecode presence. Then create a shader on a specific RenderingDevice.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
RDShaderSpirVConstructor
public RDShaderSpirV();Creates a Resource with empty bytecode and an empty error string for every stage. Empty errors merely mean no recorded message: no stage has been compiled. The object is not a GPU RID.
Properties20
BytecodeAnyHitProperty
public byte[] BytecodeAnyHit { get; set; }SPIR-V bytes for any-hit: intersection-candidate processing, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorAnyHit and emits no Changed. A tessellation/ray field establishes no GPU support.
BytecodeClosestHitProperty
public byte[] BytecodeClosestHit { get; set; }SPIR-V bytes for closest-hit: closest-intersection processing, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorClosestHit and emits no Changed. A tessellation/ray field establishes no GPU support.
BytecodeComputeProperty
public byte[] BytecodeCompute { get; set; }Compute-stage SPIR-V bytes, not GLSL text or a ready pipeline RID. Inspect CompileErrorCompute before creating the GPU shader.
BytecodeFragmentProperty
public byte[] BytecodeFragment { get; set; }SPIR-V bytes for fragment: fragment output, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorFragment and emits no Changed. A tessellation/ray field establishes no GPU support.
BytecodeIntersectionProperty
public byte[] BytecodeIntersection { get; set; }SPIR-V bytes for intersection: custom procedural-geometry intersection, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorIntersection and emits no Changed. A tessellation/ray field establishes no GPU support.
BytecodeMissProperty
public byte[] BytecodeMiss { get; set; }SPIR-V bytes for miss: processing a ray without a hit, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorMiss and emits no Changed. A tessellation/ray field establishes no GPU support.
BytecodeRaygenProperty
public byte[] BytecodeRaygen { get; set; }SPIR-V bytes for ray generation: launching rays, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorRaygen and emits no Changed. A tessellation/ray field establishes no GPU support.
BytecodeTesselationControlProperty
public byte[] BytecodeTesselationControl { get; set; }SPIR-V bytes for tessellation control: patch control, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorTesselationControl and emits no Changed. A tessellation/ray field establishes no GPU support.
BytecodeTesselationEvaluationProperty
public byte[] BytecodeTesselationEvaluation { get; set; }SPIR-V bytes for tessellation evaluation: evaluating a tessellated patch, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorTesselationEvaluation and emits no Changed. A tessellation/ray field establishes no GPU support.
BytecodeVertexProperty
public byte[] BytecodeVertex { get; set; }SPIR-V bytes for vertex: vertex processing, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorVertex and emits no Changed. A tessellation/ray field establishes no GPU support.
CompileErrorAnyHitProperty
public string CompileErrorAnyHit { get; set; }Stored diagnostic for any-hit: intersection-candidate processing, initially empty. Empty does not prove compilation: also inspect BytecodeAnyHit. A manual write changes only the message and emits no Changed; it does not repair the shader.
CompileErrorClosestHitProperty
public string CompileErrorClosestHit { get; set; }Stored diagnostic for closest-hit: closest-intersection processing, initially empty. Empty does not prove compilation: also inspect BytecodeClosestHit. A manual write changes only the message and emits no Changed; it does not repair the shader.
CompileErrorComputeProperty
public string CompileErrorCompute { get; set; }Compute-stage compilation diagnostics. Inspect before ShaderCreateFromSpirV; a nonempty error means this result must not be used to create the shader. An empty string does not replace checking that the required bytecode exists.
CompileErrorFragmentProperty
public string CompileErrorFragment { get; set; }Stored diagnostic for fragment: fragment output, initially empty. Empty does not prove compilation: also inspect BytecodeFragment. A manual write changes only the message and emits no Changed; it does not repair the shader.
CompileErrorIntersectionProperty
public string CompileErrorIntersection { get; set; }Stored diagnostic for intersection: custom procedural-geometry intersection, initially empty. Empty does not prove compilation: also inspect BytecodeIntersection. A manual write changes only the message and emits no Changed; it does not repair the shader.
CompileErrorMissProperty
public string CompileErrorMiss { get; set; }Stored diagnostic for miss: processing a ray without a hit, initially empty. Empty does not prove compilation: also inspect BytecodeMiss. A manual write changes only the message and emits no Changed; it does not repair the shader.
CompileErrorRaygenProperty
public string CompileErrorRaygen { get; set; }Stored diagnostic for ray generation: launching rays, initially empty. Empty does not prove compilation: also inspect BytecodeRaygen. A manual write changes only the message and emits no Changed; it does not repair the shader.
CompileErrorTesselationControlProperty
public string CompileErrorTesselationControl { get; set; }Stored diagnostic for tessellation control: patch control, initially empty. Empty does not prove compilation: also inspect BytecodeTesselationControl. A manual write changes only the message and emits no Changed; it does not repair the shader.
CompileErrorTesselationEvaluationProperty
public string CompileErrorTesselationEvaluation { get; set; }Stored diagnostic for tessellation evaluation: evaluating a tessellated patch, initially empty. Empty does not prove compilation: also inspect BytecodeTesselationEvaluation. A manual write changes only the message and emits no Changed; it does not repair the shader.
CompileErrorVertexProperty
public string CompileErrorVertex { get; set; }Stored diagnostic for vertex: vertex processing, initially empty. Empty does not prove compilation: also inspect BytecodeVertex. A manual write changes only the message and emits no Changed; it does not repair the shader.
Methods5
GetStageBytecodebyte[]
public byte[] GetStageBytecode(RenderingDevice.ShaderStage stage);Returns the selected stage’s byte[], initially empty. A CPU-data copy: editing the returned array changes no resource and is not GPU readback. Bytes alone do not establish valid SPIR-V.
| Name | Type | Default |
|---|---|---|
stage | RenderingDevice.ShaderStage | — |
stageStage index, such as ShaderStage.Compute or ShaderStage.Vertex. Do not pass ComputeBit/VertexBit, a mask or Max: these are not the requested stage index and can select another stage or emit a native error.
byte[]Selected-stage byte[] copy; can be empty or contain manually stored invalid data.
GetStageCompileErrorstring
public string GetStageCompileError(RenderingDevice.ShaderStage stage);Returns the selected stage’s stored diagnostic, initially empty. Runs no compiler. Also check bytecode: an absent or new stage has an empty string too.
| Name | Type | Default |
|---|---|---|
stage | RenderingDevice.ShaderStage | — |
stageStage index, such as ShaderStage.Compute or ShaderStage.Vertex. Do not pass ComputeBit/VertexBit, a mask or Max: these are not the requested stage index and can select another stage or emit a native error.
stringStored message; an empty string alone does not establish successful compilation.
SetStageBytecode2 overloads
public void SetStageBytecode(RenderingDevice.ShaderStage stage, byte[] bytecode);Stores a copy of one stage’s bytes; byte[] and ReadOnlySpan<byte> overloads are available. Validates no SPIR-V, compiles no source, clears no stage error and recreates no GPU shader. Emits no Resource.Changed. Supply a stage index, not a …Bit mask.
| Name | Type | Default |
|---|---|---|
stage | RenderingDevice.ShaderStage | — |
bytecode | byte[] | — |
stageStage index, such as ShaderStage.Compute or ShaderStage.Vertex. Do not pass ComputeBit/VertexBit, a mask or Max: these are not the requested stage index and can select another stage or emit a native error.
bytecodeBytes or a span to copy into the stage slot. The setter validates no SPIR-V and clears no stage error.
public void SetStageBytecode(RenderingDevice.ShaderStage stage, ReadOnlySpan<byte> bytecode);Stores a copy of one stage’s bytes; byte[] and ReadOnlySpan<byte> overloads are available. Validates no SPIR-V, compiles no source, clears no stage error and recreates no GPU shader. Emits no Resource.Changed. Supply a stage index, not a …Bit mask.
| Name | Type | Default |
|---|---|---|
stage | RenderingDevice.ShaderStage | — |
bytecode | ReadOnlySpan<byte> | — |
stageStage index, such as ShaderStage.Compute or ShaderStage.Vertex. Do not pass ComputeBit/VertexBit, a mask or Max: these are not the requested stage index and can select another stage or emit a native error.
bytecodeBytes or a span to copy into the stage slot. The setter validates no SPIR-V and clears no stage error.
SetStageCompileErrorvoid
public void SetStageCompileError(RenderingDevice.ShaderStage stage, string compileError);Stores a stage message independently of its bytes. An empty string clears only the diagnostic: it compiles nothing, restores no bytecode and does not repair invalid SPIR-V. Emits no Resource.Changed.
| Name | Type | Default |
|---|---|---|
stage | RenderingDevice.ShaderStage | — |
compileError | string | — |
stageStage index, such as ShaderStage.Compute or ShaderStage.Vertex. Do not pass ComputeBit/VertexBit, a mask or Max: these are not the requested stage index and can select another stage or emit a native error.
compileErrorDiagnostic string; empty clears only the message and leaves bytecode unchanged.