Merge pull request #67270 from RandomShaper/slim_usage_msaa_attachment

Restrict MSAA attachment usage to the strictly needed set
This commit is contained in:
Rémi Verschelde 2022-10-11 21:16:11 +02:00 committed by GitHub
commit 6da55cd94b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2461,6 +2461,7 @@ void TextureStorage::_update_render_target(RenderTarget *rt) {
RD::TEXTURE_SAMPLES_8,
};
rd_color_multisample_format.samples = texture_samples[rt->msaa];
rd_color_multisample_format.usage_bits = RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT;
RD::TextureView rd_view_multisample;
rd_color_multisample_format.is_resolve_buffer = false;
rt->color_multisample = RD::get_singleton()->texture_create(rd_color_multisample_format, rd_view_multisample);