Really disable srgb on nexus player vulkan
Bug: skia:
Change-Id: I75804136195fdddffd6498660e8f96e0580f7cd8
Reviewed-on: https://skia-review.googlesource.com/17780
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp
index cb699fb..16b4609 100644
--- a/src/gpu/vk/GrVkCaps.cpp
+++ b/src/gpu/vk/GrVkCaps.cpp
@@ -117,12 +117,6 @@
}
#endif
-#if defined(SK_CPU_X86)
- if (kImagination_VkVendor == properties.vendorID) {
- fSRGBSupport = false;
- }
-#endif
-
this->applyOptionsOverrides(contextOptions);
fShaderCaps->applyOptionsOverrides(contextOptions);
}
@@ -196,6 +190,12 @@
if (kAMD_VkVendor == properties.vendorID) {
fNewCBOnPipelineChange = true;
}
+
+#if defined(SK_CPU_X86)
+ if (kImagination_VkVendor == properties.vendorID) {
+ fSRGBSupport = false;
+ }
+#endif
}
void GrVkCaps::initShaderCaps(const VkPhysicalDeviceProperties& properties, uint32_t featureFlags) {
@@ -309,7 +309,9 @@
for (int i = 0; i < kGrPixelConfigCnt; ++i) {
VkFormat format;
if (GrPixelConfigToVkFormat(static_cast<GrPixelConfig>(i), &format)) {
- fConfigTable[i].init(interface, physDev, format);
+ if (!GrPixelConfigIsSRGB(static_cast<GrPixelConfig>(i)) || fSRGBSupport) {
+ fConfigTable[i].init(interface, physDev, format);
+ }
}
}
}