File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed
examples/jsm/renderers/webgpu Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ class WebGPUAttributes {
8181 if ( gpuReadBuffer === null ) {
8282
8383 gpuReadBuffer = device . createBuffer ( {
84+ label : attribute . name ,
8485 size,
8586 usage : GPUBufferUsage . COPY_DST | GPUBufferUsage . MAP_READ
8687 } ) ;
@@ -120,6 +121,7 @@ class WebGPUAttributes {
120121 const size = array . byteLength + ( ( 4 - ( array . byteLength % 4 ) ) % 4 ) ; // ensure 4 byte alignment, see #20441
121122
122123 const buffer = this . device . createBuffer ( {
124+ label : attribute . name ,
123125 size,
124126 usage : usage | GPUBufferUsage . COPY_SRC | GPUBufferUsage . COPY_DST ,
125127 mappedAtCreation : true
Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ class WebGPUBindings {
192192 const byteLength = binding . getByteLength ( ) ;
193193
194194 binding . bufferGPU = this . device . createBuffer ( {
195+ label : 'bindingBuffer' ,
195196 size : byteLength ,
196197 usage : binding . usage
197198 } ) ;
Original file line number Diff line number Diff line change @@ -988,6 +988,7 @@ class WebGPURenderer {
988988 if ( this . _colorBuffer ) this . _colorBuffer . destroy ( ) ;
989989
990990 this . _colorBuffer = this . _device . createTexture ( {
991+ label : 'colorBuffer' ,
991992 size : {
992993 width : Math . floor ( this . _width * this . _pixelRatio ) ,
993994 height : Math . floor ( this . _height * this . _pixelRatio ) ,
@@ -1011,6 +1012,7 @@ class WebGPURenderer {
10111012 if ( this . _depthBuffer ) this . _depthBuffer . destroy ( ) ;
10121013
10131014 this . _depthBuffer = this . _device . createTexture ( {
1015+ label : 'depthBuffer' ,
10141016 size : {
10151017 width : Math . floor ( this . _width * this . _pixelRatio ) ,
10161018 height : Math . floor ( this . _height * this . _pixelRatio ) ,
You can’t perform that action at this time.
0 commit comments