Move workaround for fSRGBsupport before config table init in GrVkCaps

Bug: skia:
Change-Id: Ibd03f77dbdf2a3ee4b189443699d755f3510f044
Reviewed-on: https://skia-review.googlesource.com/111540
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
Greg Daniel 2018-03-01 15:01:27 -05:00 committed by Skia Commit-Bot
parent ded47a5014
commit f3b1162d55

View File

@ -85,6 +85,16 @@ void GrVkCaps::init(const GrContextOptions& contextOptions, const GrVkInterface*
this->initGrCaps(properties, memoryProperties, featureFlags);
this->initShaderCaps(properties, featureFlags);
if (!contextOptions.fDisableDriverCorrectnessWorkarounds) {
#if defined(SK_CPU_X86)
// We need to do this before initing the config table since it uses fSRGBSupport
if (kImagination_VkVendor == properties.vendorID) {
fSRGBSupport = false;
}
#endif
}
this->initConfigTable(vkInterface, physDev, properties);
this->initStencilFormat(vkInterface, physDev);
@ -145,12 +155,6 @@ void GrVkCaps::applyDriverCorrectnessWorkarounds(const VkPhysicalDevicePropertie
fCanUseWholeSizeOnFlushMappedMemory = false;
}
#if defined(SK_CPU_X86)
if (kImagination_VkVendor == properties.vendorID) {
fSRGBSupport = false;
}
#endif
////////////////////////////////////////////////////////////////////////////
// GrShaderCaps workarounds
////////////////////////////////////////////////////////////////////////////