mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-05 02:52:39 +08:00
V3.8.1 msaa (#15584)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user