From fc01996e3ac2819cf8da1fd492485c2c4df91876 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Fri, 24 Feb 2017 08:53:14 -0700 Subject: 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 --- layers/vk_layer_utils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'layers/vk_layer_utils.cpp') 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 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: -- cgit v1.2.3