|
|
@ -70,19 +70,14 @@ ImageInfo::ImageInfo(const TICEntry& config) noexcept { |
|
|
switch (tex_type) { |
|
|
switch (tex_type) { |
|
|
case TextureType::Texture1D: |
|
|
case TextureType::Texture1D: |
|
|
ASSERT(config.BaseLayer() == 0); |
|
|
ASSERT(config.BaseLayer() == 0); |
|
|
ASSERT(config.Depth() == 1); |
|
|
|
|
|
type = ImageType::e1D; |
|
|
type = ImageType::e1D; |
|
|
size.width = config.Width(); |
|
|
size.width = config.Width(); |
|
|
size.depth = 1; |
|
|
|
|
|
resources.layers = 1; |
|
|
resources.layers = 1; |
|
|
break; |
|
|
break; |
|
|
case TextureType::Texture1DArray: |
|
|
case TextureType::Texture1DArray: |
|
|
ASSERT(config.Depth() > 0); |
|
|
|
|
|
ASSERT(config.BaseLayer() < config.Depth()); |
|
|
|
|
|
type = ImageType::e1D; |
|
|
type = ImageType::e1D; |
|
|
size.width = config.Width(); |
|
|
size.width = config.Width(); |
|
|
size.depth = 1; |
|
|
|
|
|
resources.layers = config.Depth() - config.BaseLayer(); |
|
|
|
|
|
|
|
|
resources.layers = config.BaseLayer() + config.Depth(); |
|
|
break; |
|
|
break; |
|
|
case TextureType::Texture2D: |
|
|
case TextureType::Texture2D: |
|
|
case TextureType::Texture2DNoMipmap: |
|
|
case TextureType::Texture2DNoMipmap: |
|
|
@ -91,36 +86,28 @@ ImageInfo::ImageInfo(const TICEntry& config) noexcept { |
|
|
rescaleable = !config.IsPitchLinear(); |
|
|
rescaleable = !config.IsPitchLinear(); |
|
|
size.width = config.Width(); |
|
|
size.width = config.Width(); |
|
|
size.height = config.Height(); |
|
|
size.height = config.Height(); |
|
|
size.depth = 1; |
|
|
|
|
|
resources.layers = 1; |
|
|
|
|
|
|
|
|
resources.layers = config.BaseLayer() + 1; |
|
|
break; |
|
|
break; |
|
|
case TextureType::Texture2DArray: |
|
|
case TextureType::Texture2DArray: |
|
|
ASSERT(config.Depth() > 0); |
|
|
|
|
|
ASSERT(config.BaseLayer() < config.Depth()); |
|
|
|
|
|
type = ImageType::e2D; |
|
|
type = ImageType::e2D; |
|
|
rescaleable = true; |
|
|
rescaleable = true; |
|
|
size.width = config.Width(); |
|
|
size.width = config.Width(); |
|
|
size.height = config.Height(); |
|
|
size.height = config.Height(); |
|
|
size.depth = 1; |
|
|
|
|
|
resources.layers = config.Depth() - config.BaseLayer(); |
|
|
|
|
|
|
|
|
resources.layers = config.BaseLayer() + config.Depth(); |
|
|
break; |
|
|
break; |
|
|
case TextureType::TextureCubemap: |
|
|
case TextureType::TextureCubemap: |
|
|
ASSERT(config.Depth() == 1); |
|
|
ASSERT(config.Depth() == 1); |
|
|
type = ImageType::e2D; |
|
|
type = ImageType::e2D; |
|
|
size.width = config.Width(); |
|
|
size.width = config.Width(); |
|
|
size.height = config.Height(); |
|
|
size.height = config.Height(); |
|
|
size.depth = 1; |
|
|
|
|
|
resources.layers = 6; |
|
|
|
|
|
|
|
|
resources.layers = config.BaseLayer() + 6; |
|
|
break; |
|
|
break; |
|
|
case TextureType::TextureCubeArray: |
|
|
case TextureType::TextureCubeArray: |
|
|
UNIMPLEMENTED_IF(config.load_store_hint != 0); |
|
|
UNIMPLEMENTED_IF(config.load_store_hint != 0); |
|
|
ASSERT(config.Depth() > 0); |
|
|
|
|
|
ASSERT(config.BaseLayer() < config.Depth()); |
|
|
|
|
|
type = ImageType::e2D; |
|
|
type = ImageType::e2D; |
|
|
size.width = config.Width(); |
|
|
size.width = config.Width(); |
|
|
size.height = config.Height(); |
|
|
size.height = config.Height(); |
|
|
size.depth = 1; |
|
|
|
|
|
resources.layers = (config.Depth() - config.BaseLayer()) * 6; |
|
|
|
|
|
|
|
|
resources.layers = config.BaseLayer() + config.Depth() * 6; |
|
|
break; |
|
|
break; |
|
|
case TextureType::Texture3D: |
|
|
case TextureType::Texture3D: |
|
|
ASSERT(config.BaseLayer() == 0); |
|
|
ASSERT(config.BaseLayer() == 0); |
|
|
@ -133,7 +120,6 @@ ImageInfo::ImageInfo(const TICEntry& config) noexcept { |
|
|
case TextureType::Texture1DBuffer: |
|
|
case TextureType::Texture1DBuffer: |
|
|
type = ImageType::Buffer; |
|
|
type = ImageType::Buffer; |
|
|
size.width = config.Width(); |
|
|
size.width = config.Width(); |
|
|
size.depth = 1; |
|
|
|
|
|
resources.layers = 1; |
|
|
resources.layers = 1; |
|
|
break; |
|
|
break; |
|
|
default: |
|
|
default: |
|
|
|