[Vulkan Old] Fix build error caused by constexpr countof

This commit is contained in:
Triang3l 2020-09-17 21:51:44 +03:00
parent 7c2245bb94
commit 1ebd0067f0
1 changed files with 4 additions and 11 deletions

View File

@ -672,17 +672,10 @@ TextureCache::TextureView* TextureCache::DemandView(Texture* texture,
swizzle_component_map[(swizzle >> 9) & 0x7], swizzle_component_map[(swizzle >> 9) & 0x7],
}; };
#define SWIZZLE_VECTOR(r, x) \ view_info.components.r = components[config.vector_swizzle.x];
{ \ view_info.components.g = components[config.vector_swizzle.y];
assert_true(config.vector_swizzle.x >= 0 && \ view_info.components.b = components[config.vector_swizzle.z];
config.vector_swizzle.x < xe::countof(components)); \ view_info.components.a = components[config.vector_swizzle.w];
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
if (texture->format == VK_FORMAT_D16_UNORM_S8_UINT || if (texture->format == VK_FORMAT_D16_UNORM_S8_UINT ||
texture->format == VK_FORMAT_D24_UNORM_S8_UINT || texture->format == VK_FORMAT_D24_UNORM_S8_UINT ||