Vulkan: Emit a warning when attempting to use a texture in an unsupported way

This commit is contained in:
DrChat 2017-09-07 14:37:05 -05:00
parent f9d08888c7
commit e674c9df26
1 changed files with 5 additions and 0 deletions

View File

@ -253,6 +253,11 @@ TextureCache::Texture* TextureCache::AllocateTexture(
vkGetPhysicalDeviceFormatProperties(*device_, format, &props);
if ((props.optimalTilingFeatures & required_flags) != required_flags) {
// Texture needs conversion on upload to a native format.
XELOGE(
"Texture Cache: Invalid usage flag specified on format %s (vk %d) "
"(0x%.8X != 0x%.8X)",
texture_info.format_info()->name, format,
(props.optimalTilingFeatures & required_flags), required_flags);
assert_always();
}