MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / createShaderModule

Function createShaderModule

src/renderers/rendererUtils.ts:109–114  ·  view source on GitHub ↗
(device: GPUDevice, code: string, label?: string)

Source from the content-addressed store, hash-verified

107 * Creates a shader module from WGSL source.
108 */
109export function createShaderModule(device: GPUDevice, code: string, label?: string): GPUShaderModule {
110 if (typeof code !== 'string' || code.length === 0) {
111 throw new Error('createShaderModule(code): WGSL code must be a non-empty string.');
112 }
113 return device.createShaderModule({ code, label });
114}
115
116/**
117 * Creates a render pipeline with reduced boilerplate and sensible defaults.

Callers 2

getStageModuleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected