aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-02-01 14:45:04 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-02 12:31:40 +0000
commit351b045a5e2cbfe41abf4296f9a984ea9ac307e8 (patch)
tree4a72c66581a7590204fb9f6e2dab35bf00629501
parent565da18f6e4a0f04dc836ce9d35f31bee31644f7 (diff)
Have Vulkan advertise that compressed textures are currently unsupported
This allows the ProxyTest to run on the Vulkan backend. Change-Id: I89a3212bdc2d4a1ceb0c27d0ff60f558d7b12647 Reviewed-on: https://skia-review.googlesource.com/7880 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
-rw-r--r--src/gpu/vk/GrVkCaps.cpp11
-rw-r--r--tests/ProxyTest.cpp4
2 files changed, 11 insertions, 4 deletions
diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp
index 383d3caf49..04f0eaa6b9 100644
--- a/src/gpu/vk/GrVkCaps.cpp
+++ b/src/gpu/vk/GrVkCaps.cpp
@@ -255,6 +255,17 @@ void GrVkCaps::initConfigTable(const GrVkInterface* interface, VkPhysicalDevice
fConfigTable[i].init(interface, physDev, format);
}
}
+
+ // We currently do not support compressed textures in Vulkan
+ const uint16_t kFlagsToRemove = ConfigInfo::kTextureable_Flag|ConfigInfo::kRenderable_Flag;
+ fConfigTable[kETC1_GrPixelConfig].fOptimalFlags &= ~kFlagsToRemove;
+ fConfigTable[kETC1_GrPixelConfig].fLinearFlags &= ~kFlagsToRemove;
+ fConfigTable[kLATC_GrPixelConfig].fOptimalFlags &= ~kFlagsToRemove;
+ fConfigTable[kLATC_GrPixelConfig].fLinearFlags &= ~kFlagsToRemove;
+ fConfigTable[kR11_EAC_GrPixelConfig].fOptimalFlags &= ~kFlagsToRemove;
+ fConfigTable[kR11_EAC_GrPixelConfig].fLinearFlags &= ~kFlagsToRemove;
+ fConfigTable[kASTC_12x12_GrPixelConfig].fOptimalFlags &= ~kFlagsToRemove;
+ fConfigTable[kASTC_12x12_GrPixelConfig].fLinearFlags &= ~kFlagsToRemove;
}
void GrVkCaps::ConfigInfo::InitConfigFlags(VkFormatFeatureFlags vkFlags, uint16_t* flags) {
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index 0fa303428b..8396b52625 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -109,10 +109,6 @@ static void check_texture(skiatest::Reporter* reporter,
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DeferredProxyTest, reporter, ctxInfo) {
- if (ctxInfo.backend() == kVulkan_GrBackend) {
- return;
- }
-
GrTextureProvider* provider = ctxInfo.grContext()->textureProvider();
const GrCaps& caps = *ctxInfo.grContext()->caps();