Interface GPUFragmentState
interface GPUFragmentState {
constants?: Record<string, number>;
entryPoint?: string;
module: GPUShaderModule;
targets: Iterable<GPUColorTargetState, any, any>;
}
constants?: Record<string, number>;
entryPoint?: string;
module: GPUShaderModule;
targets: Iterable<GPUColorTargetState, any, any>;
}
Hierarchy
- GPUProgrammableStage
- GPUFragmentState (view full)
Index
Properties
Properties
Optional
constants
Optional
entryPoint
entryPoint ?: string
The name of the function in GPUProgrammableStage#module that this stage will use to perform its work. NOTE: Since the GPUProgrammableStage#entryPoint dictionary member is not required, methods which consume a GPUProgrammableStage must use the "[$get the entry point$]" algorithm to determine which entry point it refers to.
module
The GPUShaderModule containing the code that this programmable stage will execute.
targets
A list of GPUColorTargetState defining the formats and behaviors of the color targets this pipeline writes to.
Specifies the values of pipeline-overridable constants in the shader module GPUProgrammableStage#module. Each such pipeline-overridable constant is uniquely identified by a single pipeline-overridable constant identifier string, representing the pipeline constant ID of the constant if its declaration specifies one, and otherwise the constant's identifier name. The key of each key-value pair must equal the pipeline-overridable constant identifier string|identifier string of one such constant, with the comparison performed according to the rules for WGSL identifier comparison. When the pipeline is executed, that constant will have the specified value. Values are specified as GPUPipelineConstantValue, which is a double. They are converted [$to WGSL type$] of the pipeline-overridable constant (
bool
/i32
/u32
/f32
/f16
). If conversion fails, a validation error is generated.