mirror of
https://github.com/rt64/rt64.git
synced 2025-01-17 01:11:03 +00:00
Don’t store and resolve MSAA
This commit is contained in:
parent
a3fc9540fc
commit
b855e7dd69
@ -447,6 +447,11 @@ namespace RT64 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static MTLClearColor toClearColor(RenderColor color) {
|
||||||
|
return MTLClearColorMake(color.r, color.g, color.b, color.a);
|
||||||
|
}
|
||||||
|
|
||||||
// MetalBuffer
|
// MetalBuffer
|
||||||
|
|
||||||
MetalBuffer::MetalBuffer(MetalDevice *device, MetalPool *pool, const RenderBufferDesc &desc) {
|
MetalBuffer::MetalBuffer(MetalDevice *device, MetalPool *pool, const RenderBufferDesc &desc) {
|
||||||
@ -1256,15 +1261,12 @@ namespace RT64 {
|
|||||||
|
|
||||||
if (resolveTo.count(colorAttachment.texture) != 0) {
|
if (resolveTo.count(colorAttachment.texture) != 0) {
|
||||||
colorAttachment.resolveTexture = resolveTo[colorAttachment.texture];
|
colorAttachment.resolveTexture = resolveTo[colorAttachment.texture];
|
||||||
colorAttachment.storeAction = MTLStoreActionStoreAndMultisampleResolve;
|
colorAttachment.storeAction = MTLStoreActionMultisampleResolve;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attachmentsToClear.count(i) != 0) {
|
if (attachmentsToClear.count(i) != 0) {
|
||||||
colorAttachment.loadAction = MTLLoadActionClear;
|
colorAttachment.loadAction = MTLLoadActionClear;
|
||||||
colorAttachment.clearColor = MTLClearColorMake(attachmentsToClear[i].r,
|
colorAttachment.clearColor = toClearColor(attachmentsToClear[i]);
|
||||||
attachmentsToClear[i].g,
|
|
||||||
attachmentsToClear[i].b,
|
|
||||||
attachmentsToClear[i].a);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1276,7 +1278,7 @@ namespace RT64 {
|
|||||||
|
|
||||||
if (resolveTo.count(depthAttachment.texture) != 0) {
|
if (resolveTo.count(depthAttachment.texture) != 0) {
|
||||||
depthAttachment.resolveTexture = resolveTo[depthAttachment.texture];
|
depthAttachment.resolveTexture = resolveTo[depthAttachment.texture];
|
||||||
depthAttachment.storeAction = MTLStoreActionStoreAndMultisampleResolve;
|
depthAttachment.storeAction = MTLStoreActionMultisampleResolve;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (depthClearValue >= 0.0) {
|
if (depthClearValue >= 0.0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user