V3.8.1 msaa (#15584)

This commit is contained in:
hyde zhou
2023-07-18 11:55:05 +08:00
committed by GitHub
parent 7a4841404f
commit 979e3c9677
118 changed files with 4908 additions and 3016 deletions
@@ -54,6 +54,9 @@ void FramebufferValidator::doInit(const FramebufferInfo &info) {
if (info.renderPass->getDepthStencilAttachment().format != Format::UNKNOWN) {
CC_ASSERT(info.depthStencilTexture);
}
if (info.renderPass->getDepthStencilResolveAttachment().format != Format::UNKNOWN) {
CC_ASSERT(info.depthStencilResolveTexture);
}
for (uint32_t i = 0U; i < info.colorTextures.size(); ++i) {
const auto &desc = info.renderPass->getColorAttachments()[i];
@@ -67,6 +70,11 @@ void FramebufferValidator::doInit(const FramebufferInfo &info) {
CC_ASSERT(hasFlag(info.depthStencilTexture->getInfo().usage, TextureUsageBit::DEPTH_STENCIL_ATTACHMENT));
CC_ASSERT(info.depthStencilTexture->getFormat() == info.renderPass->getDepthStencilAttachment().format);
}
if (info.depthStencilResolveTexture) {
CC_ASSERT(static_cast<TextureValidator *>(info.depthStencilResolveTexture)->isInited());
CC_ASSERT(hasFlag(info.depthStencilResolveTexture->getInfo().usage, TextureUsageBit::DEPTH_STENCIL_ATTACHMENT));
CC_ASSERT(info.depthStencilResolveTexture->getFormat() == info.renderPass->getDepthStencilResolveAttachment().format);
}
/////////// execute ///////////
@@ -79,6 +87,9 @@ void FramebufferValidator::doInit(const FramebufferInfo &info) {
if (info.depthStencilTexture) {
actorInfo.depthStencilTexture = static_cast<TextureValidator *>(info.depthStencilTexture)->getActor();
}
if (info.depthStencilResolveTexture) {
actorInfo.depthStencilResolveTexture = static_cast<TextureValidator *>(info.depthStencilResolveTexture)->getActor();
}
actorInfo.renderPass = static_cast<RenderPassValidator *>(info.renderPass)->getActor();
_actor->initialize(actorInfo);