| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- /**
- * Reusable descriptor for `GPUDevice.createShaderModule()`.
- *
- * @private
- */
- class GPUShaderModuleDescriptor {
- constructor() {
- /**
- * The label of the shader module.
- *
- * @type {string}
- */
- this.label = '';
- /**
- * The WGSL source code of the shader module.
- *
- * @type {string}
- */
- this.code = '';
- /**
- * Compilation hints that may help the implementation produce optimized code.
- *
- * @type {Array<Object>}
- */
- this.compilationHints = [];
- }
- /**
- * Resets the descriptor to its default state.
- */
- reset() {
- this.label = '';
- this.code = '';
- this.compilationHints.length = 0;
- }
- }
- export default GPUShaderModuleDescriptor;
|