WebGPUProgrammableStage constructor

WebGPUProgrammableStage(
  1. dynamic device,
  2. dynamic code,
  3. dynamic type
)

Implementation

WebGPUProgrammableStage(GPUDevice device, code, type) {
  this.id = _id++;

  this.code = code;
  this.type = type;
  this.usedTimes = 0;


  // print("WebGPUProgrammableStage type: ${type} ${type.runtimeType} ===============================");
  // print(code);

  var module =
      device.createShaderModule(GPUShaderModuleDescriptor(code: code));
  this.stage = {"module": module, "entryPoint": 'main'};
}