Fix depth/stencil clearing broken during recent fix.
A recent change for resolving color formats mistakenly broke clearing depth and stencil formats. Remove optionality of all function arguments in MVKRenderPassAttachment::populateMTLRenderPassAttachmentDescriptor() to avoid bad calls being masked by optional function arguments. Add appropriate canResolveFormat values for all calls to that function.
This commit is contained in:
parent
ce583f4f3d
commit
ff7ea713f6
@ -191,7 +191,7 @@ public:
|
||||
bool hasResolveAttachment,
|
||||
bool canResolveFormat,
|
||||
bool isStencil,
|
||||
bool loadOverride = false);
|
||||
bool loadOverride);
|
||||
|
||||
/** If a render encoder is active, sets the store action for this attachment to it. */
|
||||
void encodeStoreAction(MVKCommandEncoder* cmdEncoder,
|
||||
|
@ -275,10 +275,9 @@ void MVKRenderSubpass::populateMTLRenderPassDescriptor(MTLRenderPassDescriptor*
|
||||
isMemorylessAttachment = dsImage->getMTLTexture(0).storageMode == MTLStorageModeMemoryless;
|
||||
#endif
|
||||
if (dsMVKRPAtt->populateMTLRenderPassAttachmentDescriptor(mtlDepthAttDesc, this,
|
||||
isRenderingEntireAttachment,
|
||||
isMemorylessAttachment,
|
||||
hasResolveAttachment, false,
|
||||
loadOverride)) {
|
||||
isRenderingEntireAttachment, isMemorylessAttachment,
|
||||
hasResolveAttachment, true,
|
||||
false, loadOverride)) {
|
||||
mtlDepthAttDesc.clearDepth = pixFmts->getMTLClearDepthValue(clearValues[dsRPAttIdx]);
|
||||
}
|
||||
if (isMultiview()) {
|
||||
@ -303,10 +302,9 @@ void MVKRenderSubpass::populateMTLRenderPassDescriptor(MTLRenderPassDescriptor*
|
||||
isMemorylessAttachment = dsImage->getMTLTexture(0).storageMode == MTLStorageModeMemoryless;
|
||||
#endif
|
||||
if (dsMVKRPAtt->populateMTLRenderPassAttachmentDescriptor(mtlStencilAttDesc, this,
|
||||
isRenderingEntireAttachment,
|
||||
isMemorylessAttachment,
|
||||
isRenderingEntireAttachment, isMemorylessAttachment,
|
||||
hasResolveAttachment, true,
|
||||
loadOverride)) {
|
||||
true, loadOverride)) {
|
||||
mtlStencilAttDesc.clearStencil = pixFmts->getMTLClearStencilValue(clearValues[dsRPAttIdx]);
|
||||
}
|
||||
if (isMultiview()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user