Browse Source

Normalize TextureCubemap to TextureCubeArray when needed

pull/2830/head
MaranBr 5 months ago
committed by crueter
parent
commit
9eed8ec2d6
  1. 2
      src/video_core/texture_cache/image_info.cpp
  2. 2
      src/video_core/texture_cache/image_view_info.cpp

2
src/video_core/texture_cache/image_info.cpp

@ -56,6 +56,8 @@ ImageInfo::ImageInfo(const TICEntry& config) noexcept {
tex_type = TextureType::Texture1DArray;
} else if (tex_type == TextureType::Texture2D && (config.Depth() > 1 || config.BaseLayer() != 0)) {
tex_type = TextureType::Texture2DArray;
} else if (tex_type == TextureType::TextureCubemap && (config.Depth() > 1 || config.BaseLayer() != 0)) {
tex_type = TextureType::TextureCubeArray;
}
switch (tex_type) {
case TextureType::Texture1D:

2
src/video_core/texture_cache/image_view_info.cpp

@ -45,6 +45,8 @@ ImageViewInfo::ImageViewInfo(const TICEntry& config, s32 base_layer) noexcept
tex_type = TextureType::Texture1DArray;
} else if (tex_type == TextureType::Texture2D && (config.Depth() > 1 || base_layer != 0)) {
tex_type = TextureType::Texture2DArray;
} else if (tex_type == TextureType::TextureCubemap && (config.Depth() > 1 || base_layer != 0)) {
tex_type = TextureType::TextureCubeArray;
}
switch (tex_type) {
case TextureType::Texture1D:

Loading…
Cancel
Save