mirror of
https://github.com/libretro/RetroArch
synced 2025-02-11 15:40:28 +00:00
Improve performance; don't care about previous state ofcolor attachment
Color attachment is being completely overwritten.
This commit is contained in:
parent
5e1f991e32
commit
1c5d94aca1
@ -20,7 +20,6 @@
|
||||
|
||||
@property (readonly) id<MTLDevice> device;
|
||||
@property (readonly) id<MTLLibrary> library;
|
||||
@property (readonly) id<MTLCommandQueue> commandQueue;
|
||||
/*! @brief Returns the command buffer for the current frame */
|
||||
@property (readonly) id<MTLCommandBuffer> commandBuffer;
|
||||
@property (readonly) id<CAMetalDrawable> nextDrawable;
|
||||
|
@ -882,8 +882,8 @@ static vertex_t vertex_bytes[] = {
|
||||
id<MTLCommandBuffer> cb = ctx.commandBuffer;
|
||||
|
||||
MTLRenderPassDescriptor *rpd = [MTLRenderPassDescriptor new];
|
||||
rpd.colorAttachments[0].clearColor = MTLClearColorMake(0, 0, 0, 1.0);
|
||||
rpd.colorAttachments[0].loadAction = MTLLoadActionClear;
|
||||
// rpd.colorAttachments[0].clearColor = MTLClearColorMake(0, 0, 0, 1.0);
|
||||
rpd.colorAttachments[0].loadAction = MTLLoadActionDontCare;
|
||||
rpd.colorAttachments[0].storeAction = MTLStoreActionStore;
|
||||
|
||||
for (unsigned i = 0; i < _shader->passes; i++)
|
||||
@ -900,6 +900,9 @@ static vertex_t vertex_bytes[] = {
|
||||
}
|
||||
|
||||
id<MTLRenderCommandEncoder> rce = [cb renderCommandEncoderWithDescriptor:rpd];
|
||||
#if METAL_DEBUG
|
||||
rce.label = [NSString stringWithFormat:@"pass %d", i];
|
||||
#endif
|
||||
|
||||
[rce setRenderPipelineState:_engine.pass[i]._state];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user