mirror of
https://github.com/TomHarte/CLK.git
synced 2024-10-19 14:25:35 +00:00
Avoids a redundant clear.
This commit is contained in:
parent
59c4c8233f
commit
11dec6fc0f
@ -448,6 +448,9 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget;
|
|||||||
- (void)drawInMTKView:(nonnull MTKView *)view {
|
- (void)drawInMTKView:(nonnull MTKView *)view {
|
||||||
// Schedule a copy from the current framebuffer to the view; blitting is unavailable as the target is a framebuffer texture.
|
// Schedule a copy from the current framebuffer to the view; blitting is unavailable as the target is a framebuffer texture.
|
||||||
id<MTLCommandBuffer> commandBuffer = [_commandQueue commandBuffer];
|
id<MTLCommandBuffer> commandBuffer = [_commandQueue commandBuffer];
|
||||||
|
|
||||||
|
// Every pixel will be drawn, so don't clear or reload.
|
||||||
|
view.currentRenderPassDescriptor.colorAttachments[0].loadAction = MTLLoadActionDontCare;
|
||||||
id<MTLRenderCommandEncoder> encoder = [commandBuffer renderCommandEncoderWithDescriptor:view.currentRenderPassDescriptor];
|
id<MTLRenderCommandEncoder> encoder = [commandBuffer renderCommandEncoderWithDescriptor:view.currentRenderPassDescriptor];
|
||||||
|
|
||||||
[encoder setRenderPipelineState:_copyPipeline];
|
[encoder setRenderPipelineState:_copyPipeline];
|
||||||
|
Loading…
Reference in New Issue
Block a user