From 1ebd0067f0598346b4f709180be250e879427309 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Thu, 17 Sep 2020 21:51:44 +0300 Subject: [PATCH] [Vulkan Old] Fix build error caused by constexpr countof --- src/xenia/gpu/vulkan/texture_cache.cc | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/xenia/gpu/vulkan/texture_cache.cc b/src/xenia/gpu/vulkan/texture_cache.cc index 39a88ef38..fa6cdcd69 100644 --- a/src/xenia/gpu/vulkan/texture_cache.cc +++ b/src/xenia/gpu/vulkan/texture_cache.cc @@ -672,17 +672,10 @@ TextureCache::TextureView* TextureCache::DemandView(Texture* texture, swizzle_component_map[(swizzle >> 9) & 0x7], }; -#define SWIZZLE_VECTOR(r, x) \ - { \ - assert_true(config.vector_swizzle.x >= 0 && \ - config.vector_swizzle.x < xe::countof(components)); \ - view_info.components.r = components[config.vector_swizzle.x]; \ - } - SWIZZLE_VECTOR(r, x); - SWIZZLE_VECTOR(g, y); - SWIZZLE_VECTOR(b, z); - SWIZZLE_VECTOR(a, w); -#undef SWIZZLE_CHANNEL + view_info.components.r = components[config.vector_swizzle.x]; + view_info.components.g = components[config.vector_swizzle.y]; + view_info.components.b = components[config.vector_swizzle.z]; + view_info.components.a = components[config.vector_swizzle.w]; if (texture->format == VK_FORMAT_D16_UNORM_S8_UINT || texture->format == VK_FORMAT_D24_UNORM_S8_UINT ||