aboutsummaryrefslogtreecommitdiff
path: root/layers/vk_layer_utils.cpp
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2017-02-24 08:53:14 -0700
committerMark Lobodzinski <mark@lunarg.com>2017-02-24 11:13:11 -0700
commitfc01996e3ac2819cf8da1fd492485c2c4df91876 (patch)
tree578a08fad2222fa404c7405ef98ccc47678c3b19 /layers/vk_layer_utils.cpp
parent6924e281ae8c0e1167af0fd34c66ac1db13455a4 (diff)
downloadusermoji-fc01996e3ac2819cf8da1fd492485c2c4df91876.tar.xz
layers: GL168, fix bad compressed texel block size
The image<->buffer copy validation was checking against texel block sizes, but needed the block size in byte. Fixed the bad validation errors and renamed existing util function and updated a compressed texture size to match the spec. Change-Id: I40b9635a4fab131ab1525da51e94c4c5577217be
Diffstat (limited to 'layers/vk_layer_utils.cpp')
-rw-r--r--layers/vk_layer_utils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/layers/vk_layer_utils.cpp b/layers/vk_layer_utils.cpp
index 18a42b9d..cd23563e 100644
--- a/layers/vk_layer_utils.cpp
+++ b/layers/vk_layer_utils.cpp
@@ -189,7 +189,7 @@ const std::map<VkFormat, VULKAN_FORMAT_INFO> vk_format_table = {
{VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, {8, 4, VK_FORMAT_COMPATIBILITY_CLASS_ETC2_RGBA_BIT}},
{VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, {8, 4, VK_FORMAT_COMPATIBILITY_CLASS_ETC2_RGBA_BIT}},
{VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, {16, 4, VK_FORMAT_COMPATIBILITY_CLASS_ETC2_EAC_RGBA_BIT}},
- {VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, {16, 4, VK_FORMAT_COMPATIBILITY_CLASS_ETC2_EAC_RGBA_BIT}},
+ {VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, {8, 4, VK_FORMAT_COMPATIBILITY_CLASS_ETC2_EAC_RGBA_BIT}},
{VK_FORMAT_EAC_R11_UNORM_BLOCK, {8, 1, VK_FORMAT_COMPATIBILITY_CLASS_EAC_R_BIT}},
{VK_FORMAT_EAC_R11_SNORM_BLOCK, {8, 1, VK_FORMAT_COMPATIBILITY_CLASS_EAC_R_BIT}},
{VK_FORMAT_EAC_R11G11_UNORM_BLOCK, {16, 2, VK_FORMAT_COMPATIBILITY_CLASS_EAC_RG_BIT}},
@@ -559,8 +559,8 @@ VK_LAYER_EXPORT bool vk_format_is_compressed(VkFormat format) {
}
}
-// Return compressed block sizes for block compressed formats
-VK_LAYER_EXPORT VkExtent2D vk_format_compressed_block_size(VkFormat format) {
+// Return compressed texel block sizes for block compressed formats
+VK_LAYER_EXPORT VkExtent2D vk_format_compressed_texel_block_extents(VkFormat format) {
VkExtent2D block_size = {1, 1};
switch (format) {
case VK_FORMAT_BC1_RGB_UNORM_BLOCK: