|
@@ -209,6 +209,8 @@ class WebGPUTextures {
|
|
|
usage: GPUTextureUsage.OUTPUT_ATTACHMENT | GPUTextureUsage.SAMPLED
|
|
|
} );
|
|
|
|
|
|
+ this.info.memory.textures ++;
|
|
|
+
|
|
|
renderTargetProperties.colorTextureGPU = colorTextureGPU;
|
|
|
renderTargetProperties.colorTextureFormat = colorTextureFormat;
|
|
|
|
|
@@ -235,6 +237,8 @@ class WebGPUTextures {
|
|
|
usage: GPUTextureUsage.OUTPUT_ATTACHMENT
|
|
|
} );
|
|
|
|
|
|
+ this.info.memory.textures ++;
|
|
|
+
|
|
|
renderTargetProperties.depthTextureGPU = depthTextureGPU;
|
|
|
renderTargetProperties.depthTextureFormat = depthTextureFormat;
|
|
|
|
|
@@ -727,10 +731,14 @@ function onRenderTargetDispose( event ) {
|
|
|
renderTargetProperties.colorTextureGPU.destroy();
|
|
|
properties.remove( renderTarget.texture );
|
|
|
|
|
|
+ this.info.memory.textures --;
|
|
|
+
|
|
|
if ( renderTarget.depthBuffer === true ) {
|
|
|
|
|
|
renderTargetProperties.depthTextureGPU.destroy();
|
|
|
|
|
|
+ this.info.memory.textures --;
|
|
|
+
|
|
|
if ( renderTarget.depthTexture !== null ) {
|
|
|
|
|
|
properties.remove( renderTarget.depthTexture );
|