aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-05-23 15:21:02 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-23 19:57:48 +0000
commit019078714d6bf2afe72b33ff4c22e858c119cc11 (patch)
treec83deaf2bb0ece75160996265185f399bbea87c9 /src/gpu
parent6ebba9f5b26d556b0a22131749da680716059702 (diff)
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>
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/vk/GrVkCaps.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp
index cb699fb4ad..16b46096e4 100644
--- a/src/gpu/vk/GrVkCaps.cpp
+++ b/src/gpu/vk/GrVkCaps.cpp
@@ -117,12 +117,6 @@ void GrVkCaps::init(const GrContextOptions& contextOptions, const GrVkInterface*
}
#endif
-#if defined(SK_CPU_X86)
- if (kImagination_VkVendor == properties.vendorID) {
- fSRGBSupport = false;
- }
-#endif
-
this->applyOptionsOverrides(contextOptions);
fShaderCaps->applyOptionsOverrides(contextOptions);
}
@@ -196,6 +190,12 @@ void GrVkCaps::initGrCaps(const VkPhysicalDeviceProperties& properties,
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 @@ void GrVkCaps::initConfigTable(const GrVkInterface* interface, VkPhysicalDevice
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);
+ }
}
}
}