1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-02-27 00:30:26 +00:00

Ensure _finalisedLineTexture really is cleared.

This commit is contained in:
Thomas Harte 2020-12-09 20:18:53 -05:00
parent dbdea95241
commit 394f6b58d8
2 changed files with 2 additions and 1 deletions

View File

@ -499,6 +499,7 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget;
id<MTLCommandBuffer> commandBuffer = [_commandQueue commandBuffer];
id<MTLComputeCommandEncoder> computeEncoder = [commandBuffer computeCommandEncoder];
[computeEncoder setTexture:_finalisedLineTexture atIndex:0];
[self dispatchComputeCommandEncoder:computeEncoder pipelineState:clearPipeline width:lineTextureDescriptor.width height:lineTextureDescriptor.height offsetBuffer:[self bufferForOffset:0]];
[computeEncoder endEncoding];

View File

@ -582,7 +582,7 @@ kernel void separateLumaKernel5( texture2d<half, access::read> inTexture [[textu
return setSeparatedLumaChroma(luminance, centreSample, outTexture, gid, offset);
}
kernel void clearKernel( texture2d<half, access::write> outTexture [[texture(1)]],
kernel void clearKernel( texture2d<half, access::write> outTexture [[texture(0)]],
uint2 gid [[thread_position_in_grid]]) {
outTexture.write(half4(0.0f, 0.0f, 0.0f, 1.0f), gid);
}