You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
514 B
24 lines
514 B
2 years ago
|
import WebGPUBinding from './WebGPUBinding.js';
|
||
|
import { GPUBindingType } from './constants.js';
|
||
|
|
||
|
class WebGPUStorageBuffer extends WebGPUBinding {
|
||
|
|
||
|
constructor( name, attribute ) {
|
||
|
|
||
|
super( name );
|
||
|
|
||
|
this.type = GPUBindingType.StorageBuffer;
|
||
|
|
||
|
this.usage = GPUBufferUsage.VERTEX | GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST;
|
||
|
|
||
|
this.attribute = attribute;
|
||
|
this.bufferGPU = null; // set by the renderer
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
WebGPUStorageBuffer.prototype.isStorageBuffer = true;
|
||
|
|
||
|
export default WebGPUStorageBuffer;
|