From e42180022720f2fcfd3c634cad855506a7940591 Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Wed, 15 Nov 2017 18:27:09 -0700 Subject: Fix precision caps and rrect/ellipse effect precisions Replaces all the complex precision caps with a single flag that says whether "float" == fp32. Updates the ellipse and rrect effects to use float coords, and use the scale workaround when float != fp32. Bug: skia:7190 Change-Id: Ieccff9f38acd05e5cec78fe90d01a5da901a9307 Reviewed-on: https://skia-review.googlesource.com/70961 Commit-Queue: Chris Dalton Reviewed-by: Ethan Nicholas Reviewed-by: Brian Salomon --- tests/SRGBReadWritePixelsTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/SRGBReadWritePixelsTest.cpp') diff --git a/tests/SRGBReadWritePixelsTest.cpp b/tests/SRGBReadWritePixelsTest.cpp index 6ebdcf7c20..b5d61c1850 100644 --- a/tests/SRGBReadWritePixelsTest.cpp +++ b/tests/SRGBReadWritePixelsTest.cpp @@ -184,14 +184,14 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SRGBReadWritePixels, reporter, ctxInfo) { return; } - float error = context->caps()->shaderCaps()->floatPrecisionVaries() ? 1.2f : 0.5f; + float error = context->caps()->shaderCaps()->halfIs32Bits() ? 0.5f : 1.2f; // Write srgba data and read as srgba and then as rgba if (sContext->writePixels(iiSRGBA, origData, 0, 0, 0)) { // For the all-srgba case, we allow a small error only for devices that have // precision variation because the srgba data gets converted to linear and back in // the shader. - float smallError = context->caps()->shaderCaps()->floatPrecisionVaries() ? 1.f : 0.0f; + float smallError = context->caps()->shaderCaps()->halfIs32Bits() ? 0.0f : 1.f; read_and_check_pixels(reporter, sContext.get(), origData, iiSRGBA, check_srgb_to_linear_to_srgb_conversion, smallError, "write/read srgba to srgba texture"); -- cgit v1.2.3