Fixes from PR code review.
Inline MVKRenderSubpass::hasDepthStencilAttachment() and fix minor comment typo.
This commit is contained in:
parent
293c049a16
commit
0de4cafb72
@ -1452,7 +1452,7 @@ void MVKGraphicsPipeline::addFragmentOutputToPipeline(MTLRenderPipelineDescripto
|
||||
: mvkMTLPrimitiveTopologyClassFromVkPrimitiveTopology(pCreateInfo->pInputAssemblyState->topology);
|
||||
}
|
||||
|
||||
// Color attachments - must ignore bad pColorBlendState pointer if rasterization is disable or subpass has not color attachments
|
||||
// Color attachments - must ignore bad pColorBlendState pointer if rasterization is disabled or subpass has no color attachments
|
||||
uint32_t caCnt = 0;
|
||||
if (_isRasterizingColor && pCreateInfo->pColorBlendState) {
|
||||
for (uint32_t caIdx = 0; caIdx < pCreateInfo->pColorBlendState->attachmentCount; caIdx++) {
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
bool hasColorAttachments();
|
||||
|
||||
/** Returns whether this subpass has a depth/stencil attachment. */
|
||||
bool hasDepthStencilAttachment();
|
||||
bool hasDepthStencilAttachment() { return _depthStencilAttachment.attachment != VK_ATTACHMENT_UNUSED; }
|
||||
|
||||
/** Returns the number of color attachments, which may be zero for depth-only rendering. */
|
||||
uint32_t getColorAttachmentCount() { return uint32_t(_colorAttachments.size()); }
|
||||
|
@ -42,10 +42,6 @@ bool MVKRenderSubpass::hasColorAttachments() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MVKRenderSubpass::hasDepthStencilAttachment() {
|
||||
return _depthStencilAttachment.attachment != VK_ATTACHMENT_UNUSED;
|
||||
}
|
||||
|
||||
VkFormat MVKRenderSubpass::getColorAttachmentFormat(uint32_t colorAttIdx) {
|
||||
if (colorAttIdx < _colorAttachments.size()) {
|
||||
uint32_t rpAttIdx = _colorAttachments[colorAttIdx].attachment;
|
||||
|
Loading…
x
Reference in New Issue
Block a user