diff --git a/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm b/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm index 3f17197af..75d5c66fd 100644 --- a/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm +++ b/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm @@ -410,7 +410,7 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget; width:frameBufferWidth height:frameBufferHeight mipmapped:NO]; - textureDescriptor.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead; + textureDescriptor.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead | MTLTextureUsageShaderWrite; textureDescriptor.resourceOptions = MTLResourceStorageModePrivate; id _oldFrameBuffer = _frameBuffer; _frameBuffer = [_view.device newTextureWithDescriptor:textureDescriptor]; @@ -447,6 +447,9 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget; if(_oldFrameBuffer) { [self copyTexture:_oldFrameBuffer to:_frameBuffer]; } else { + // TODO: this use of clearTexture is the only reasn _frameBuffer has a marked usage of MTLTextureUsageShaderWrite; + // it'd probably be smarter to blank it with geometry rather than potentially complicating + // its storage further? [self clearTexture:_frameBuffer]; }