Reland "Fix precision caps and rrect/ellipse effect precisions"
This is a reland of e42180022720f2fcfd3c634cad855506a7940591
Original change's description:
> 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 <csmartdalton@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com
Bug: skia:7190
Change-Id: I7ced37a64164b83d86f6a957c35e10ce9085aba0
Reviewed-on: https://skia-review.googlesource.com/72760
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp
index 2b24205..f5c4b34 100644
--- a/src/gpu/vk/GrVkCaps.cpp
+++ b/src/gpu/vk/GrVkCaps.cpp
@@ -259,19 +259,8 @@
shaderCaps->fVertexIDSupport = true;
// Assume the minimum precisions mandated by the SPIR-V spec.
- shaderCaps->fShaderPrecisionVaries = true;
- for (int s = 0; s < kGrShaderTypeCount; ++s) {
- auto& highp = shaderCaps->fFloatPrecisions[s][kHigh_GrSLPrecision];
- highp.fLogRangeLow = highp.fLogRangeHigh = 127;
- highp.fBits = 23;
-
- auto& mediump = shaderCaps->fFloatPrecisions[s][kMedium_GrSLPrecision];
- mediump.fLogRangeLow = mediump.fLogRangeHigh = 14;
- mediump.fBits = 10;
-
- shaderCaps->fFloatPrecisions[s][kLow_GrSLPrecision] = mediump;
- }
- shaderCaps->initSamplerPrecisionTable();
+ shaderCaps->fFloatIs32Bits = true;
+ shaderCaps->fHalfIs32Bits = false;
shaderCaps->fMaxVertexSamplers =
shaderCaps->fMaxGeometrySamplers =