texture_cache: OpenGL: Implement MSAA uploads and copies

This commit is contained in:
ameerj 2023-02-07 21:33:57 -05:00
parent ed4a88bd93
commit 93cf2b3ca8
12 changed files with 136 additions and 14 deletions

View file

@ -573,10 +573,6 @@ u32 CalculateUnswizzledSizeBytes(const ImageInfo& info) noexcept {
if (info.type == ImageType::Buffer) {
return info.size.width * BytesPerBlock(info.format);
}
if (info.num_samples > 1) {
// Multisample images can't be uploaded or downloaded to the host
return 0;
}
if (info.type == ImageType::Linear) {
return info.pitch * Common::DivCeil(info.size.height, DefaultBlockHeight(info.format));
}
@ -703,7 +699,6 @@ ImageViewType RenderTargetImageViewType(const ImageInfo& info) noexcept {
std::vector<ImageCopy> MakeShrinkImageCopies(const ImageInfo& dst, const ImageInfo& src,
SubresourceBase base, u32 up_scale, u32 down_shift) {
ASSERT(dst.resources.levels >= src.resources.levels);
ASSERT(dst.num_samples == src.num_samples);
const bool is_dst_3d = dst.type == ImageType::e3D;
if (is_dst_3d) {