Revert "Switched highp float to highfloat and mediump float to half."
This reverts commit 88d99c63878c2d3d340120f0321676f72afcb4f0.
Reason for revert: Believed to be causing unit test failures in Chrome roll:
https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/364433
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Ftryserver.chromium.android%2Flinux_android_rel_ng%2F364433%2F%2B%2Frecipes%2Fsteps%2Fcontent_browsertests__with_patch__on_Android%2F0%2Flogs%2FWebRtcCaptureFromElementBrowserTest.VerifyCanvasWebGLCaptureColor%2F0
Original change's description:
> Switched highp float to highfloat and mediump float to half.
>
> The ultimate goal is to end up with "float" and "half", but this
> intermediate step uses "highfloat" so that it is clear if I missed a
> "float" somewhere. Once this lands, a subsequent CL will switch all
> "highfloats" back to "floats".
>
> Bug: skia:
> Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca
> Reviewed-on: https://skia-review.googlesource.com/31000
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com,ethannicholas@google.com
Change-Id: I8bfa97547ac3920d433665f161d27df3f15c83aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/35705
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/include/private/GrTypesPriv.h b/include/private/GrTypesPriv.h
index 1536f7b..d2df9b2 100644
--- a/include/private/GrTypesPriv.h
+++ b/include/private/GrTypesPriv.h
@@ -78,27 +78,18 @@
enum GrSLType {
kVoid_GrSLType,
kBool_GrSLType,
- kUint_GrSLType,
- kShort_GrSLType,
- kUShort_GrSLType,
- kHighFloat_GrSLType,
- kHighFloat2_GrSLType,
- kHighFloat3_GrSLType,
- kHighFloat4_GrSLType,
- kHighFloat2x2_GrSLType,
- kHighFloat3x3_GrSLType,
- kHighFloat4x4_GrSLType,
- kHalf_GrSLType,
- kHalf2_GrSLType,
- kHalf3_GrSLType,
- kHalf4_GrSLType,
- kHalf2x2_GrSLType,
- kHalf3x3_GrSLType,
- kHalf4x4_GrSLType,
kInt_GrSLType,
- kInt2_GrSLType,
- kInt3_GrSLType,
- kInt4_GrSLType,
+ kUint_GrSLType,
+ kFloat_GrSLType,
+ kVec2f_GrSLType,
+ kVec3f_GrSLType,
+ kVec4f_GrSLType,
+ kVec2i_GrSLType,
+ kVec3i_GrSLType,
+ kVec4i_GrSLType,
+ kMat22f_GrSLType,
+ kMat33f_GrSLType,
+ kMat44f_GrSLType,
kTexture2DSampler_GrSLType,
kITexture2DSampler_GrSLType,
kTextureExternalSampler_GrSLType,
@@ -152,20 +143,13 @@
/** Is the shading language type float (including vectors/matrices)? */
static inline bool GrSLTypeIsFloatType(GrSLType type) {
switch (type) {
- case kHighFloat_GrSLType:
- case kHighFloat2_GrSLType:
- case kHighFloat3_GrSLType:
- case kHighFloat4_GrSLType:
- case kHighFloat2x2_GrSLType:
- case kHighFloat3x3_GrSLType:
- case kHighFloat4x4_GrSLType:
- case kHalf_GrSLType:
- case kHalf2_GrSLType:
- case kHalf3_GrSLType:
- case kHalf4_GrSLType:
- case kHalf2x2_GrSLType:
- case kHalf3x3_GrSLType:
- case kHalf4x4_GrSLType:
+ case kFloat_GrSLType:
+ case kVec2f_GrSLType:
+ case kVec3f_GrSLType:
+ case kVec4f_GrSLType:
+ case kMat22f_GrSLType:
+ case kMat33f_GrSLType:
+ case kMat44f_GrSLType:
return true;
case kVoid_GrSLType:
@@ -175,13 +159,11 @@
case kTexture2DRectSampler_GrSLType:
case kBufferSampler_GrSLType:
case kBool_GrSLType:
- case kUint_GrSLType:
- case kShort_GrSLType:
- case kUShort_GrSLType:
case kInt_GrSLType:
- case kInt2_GrSLType:
- case kInt3_GrSLType:
- case kInt4_GrSLType:
+ case kUint_GrSLType:
+ case kVec2i_GrSLType:
+ case kVec3i_GrSLType:
+ case kVec4i_GrSLType:
case kTexture2D_GrSLType:
case kSampler_GrSLType:
case kImageStorage2D_GrSLType:
@@ -201,29 +183,20 @@
return true;
case kVoid_GrSLType:
- case kHighFloat_GrSLType:
- case kHighFloat2_GrSLType:
- case kHighFloat3_GrSLType:
- case kHighFloat4_GrSLType:
- case kHighFloat2x2_GrSLType:
- case kHighFloat3x3_GrSLType:
- case kHighFloat4x4_GrSLType:
- case kHalf_GrSLType:
- case kHalf2_GrSLType:
- case kHalf3_GrSLType:
- case kHalf4_GrSLType:
- case kHalf2x2_GrSLType:
- case kHalf3x3_GrSLType:
- case kHalf4x4_GrSLType:
- case kInt_GrSLType:
- case kInt2_GrSLType:
- case kInt3_GrSLType:
- case kInt4_GrSLType:
+ case kFloat_GrSLType:
+ case kVec2f_GrSLType:
+ case kVec3f_GrSLType:
+ case kVec4f_GrSLType:
+ case kVec2i_GrSLType:
+ case kVec3i_GrSLType:
+ case kVec4i_GrSLType:
+ case kMat22f_GrSLType:
+ case kMat33f_GrSLType:
+ case kMat44f_GrSLType:
case kBufferSampler_GrSLType:
+ case kInt_GrSLType:
case kUint_GrSLType:
case kBool_GrSLType:
- case kShort_GrSLType:
- case kUShort_GrSLType:
case kTexture2D_GrSLType:
case kSampler_GrSLType:
case kImageStorage2D_GrSLType:
@@ -244,28 +217,19 @@
return true;
case kVoid_GrSLType:
- case kHighFloat_GrSLType:
- case kHighFloat2_GrSLType:
- case kHighFloat3_GrSLType:
- case kHighFloat4_GrSLType:
- case kHighFloat2x2_GrSLType:
- case kHighFloat3x3_GrSLType:
- case kHighFloat4x4_GrSLType:
- case kHalf_GrSLType:
- case kHalf2_GrSLType:
- case kHalf3_GrSLType:
- case kHalf4_GrSLType:
- case kHalf2x2_GrSLType:
- case kHalf3x3_GrSLType:
- case kHalf4x4_GrSLType:
+ case kFloat_GrSLType:
+ case kVec2f_GrSLType:
+ case kVec3f_GrSLType:
+ case kVec4f_GrSLType:
+ case kVec2i_GrSLType:
+ case kVec3i_GrSLType:
+ case kVec4i_GrSLType:
+ case kMat22f_GrSLType:
+ case kMat33f_GrSLType:
+ case kMat44f_GrSLType:
case kInt_GrSLType:
- case kInt2_GrSLType:
- case kInt3_GrSLType:
- case kInt4_GrSLType:
case kUint_GrSLType:
case kBool_GrSLType:
- case kShort_GrSLType:
- case kUShort_GrSLType:
case kTexture2D_GrSLType:
case kSampler_GrSLType:
case kImageStorage2D_GrSLType:
@@ -283,28 +247,19 @@
return true;
case kVoid_GrSLType:
- case kHighFloat_GrSLType:
- case kHighFloat2_GrSLType:
- case kHighFloat3_GrSLType:
- case kHighFloat4_GrSLType:
- case kHighFloat2x2_GrSLType:
- case kHighFloat3x3_GrSLType:
- case kHighFloat4x4_GrSLType:
- case kHalf_GrSLType:
- case kHalf2_GrSLType:
- case kHalf3_GrSLType:
- case kHalf4_GrSLType:
- case kHalf2x2_GrSLType:
- case kHalf3x3_GrSLType:
- case kHalf4x4_GrSLType:
- case kInt2_GrSLType:
- case kInt3_GrSLType:
- case kInt4_GrSLType:
+ case kFloat_GrSLType:
+ case kVec2f_GrSLType:
+ case kVec3f_GrSLType:
+ case kVec4f_GrSLType:
+ case kVec2i_GrSLType:
+ case kVec3i_GrSLType:
+ case kVec4i_GrSLType:
+ case kMat22f_GrSLType:
+ case kMat33f_GrSLType:
+ case kMat44f_GrSLType:
case kInt_GrSLType:
case kUint_GrSLType:
case kBool_GrSLType:
- case kShort_GrSLType:
- case kUShort_GrSLType:
case kTexture2D_GrSLType:
case kSampler_GrSLType:
case kTexture2DSampler_GrSLType:
@@ -320,71 +275,18 @@
static inline bool GrSLTypeAcceptsPrecision(GrSLType type) {
switch (type) {
- case kTexture2DSampler_GrSLType:
- case kITexture2DSampler_GrSLType:
- case kTextureExternalSampler_GrSLType:
- case kTexture2DRectSampler_GrSLType:
- case kBufferSampler_GrSLType:
- case kTexture2D_GrSLType:
- case kSampler_GrSLType:
- case kImageStorage2D_GrSLType:
- case kIImageStorage2D_GrSLType:
- return true;
-
- case kVoid_GrSLType:
- case kBool_GrSLType:
- case kUint_GrSLType:
- case kShort_GrSLType:
- case kUShort_GrSLType:
- case kHighFloat_GrSLType:
- case kHighFloat2_GrSLType:
- case kHighFloat3_GrSLType:
- case kHighFloat4_GrSLType:
- case kHighFloat2x2_GrSLType:
- case kHighFloat3x3_GrSLType:
- case kHighFloat4x4_GrSLType:
- case kHalf_GrSLType:
- case kHalf2_GrSLType:
- case kHalf3_GrSLType:
- case kHalf4_GrSLType:
- case kHalf2x2_GrSLType:
- case kHalf3x3_GrSLType:
- case kHalf4x4_GrSLType:
case kInt_GrSLType:
- case kInt2_GrSLType:
- case kInt3_GrSLType:
- case kInt4_GrSLType:
- return false;
- }
- SK_ABORT("Unexpected type");
- return false;
-}
-
-// temporarily accepting (but ignoring) precision modifiers on the new types; this will be killed
-// in a future CL
-static inline bool GrSLTypeTemporarilyAcceptsPrecision(GrSLType type) {
- switch (type) {
case kUint_GrSLType:
- case kShort_GrSLType:
- case kUShort_GrSLType:
- case kHighFloat_GrSLType:
- case kHighFloat2_GrSLType:
- case kHighFloat3_GrSLType:
- case kHighFloat4_GrSLType:
- case kHighFloat2x2_GrSLType:
- case kHighFloat3x3_GrSLType:
- case kHighFloat4x4_GrSLType:
- case kHalf_GrSLType:
- case kHalf2_GrSLType:
- case kHalf3_GrSLType:
- case kHalf4_GrSLType:
- case kHalf2x2_GrSLType:
- case kHalf3x3_GrSLType:
- case kHalf4x4_GrSLType:
- case kInt_GrSLType:
- case kInt2_GrSLType:
- case kInt3_GrSLType:
- case kInt4_GrSLType:
+ case kFloat_GrSLType:
+ case kVec2f_GrSLType:
+ case kVec3f_GrSLType:
+ case kVec4f_GrSLType:
+ case kVec2i_GrSLType:
+ case kVec3i_GrSLType:
+ case kVec4i_GrSLType:
+ case kMat22f_GrSLType:
+ case kMat33f_GrSLType:
+ case kMat44f_GrSLType:
case kTexture2DSampler_GrSLType:
case kITexture2DSampler_GrSLType:
case kTextureExternalSampler_GrSLType:
@@ -506,21 +408,21 @@
switch (type) {
case kUByte_GrVertexAttribType:
case kFloat_GrVertexAttribType:
- return kHighFloat_GrSLType;
+ return kFloat_GrSLType;
case kVec2us_GrVertexAttribType:
case kVec2f_GrVertexAttribType:
- return kHighFloat2_GrSLType;
+ return kVec2f_GrSLType;
case kVec3f_GrVertexAttribType:
- return kHighFloat3_GrSLType;
+ return kVec3f_GrSLType;
case kVec4ub_GrVertexAttribType:
case kVec4f_GrVertexAttribType:
- return kHighFloat4_GrSLType;
+ return kVec4f_GrSLType;
case kVec2i_GrVertexAttribType:
- return kInt2_GrSLType;
+ return kVec2i_GrSLType;
case kVec3i_GrVertexAttribType:
- return kInt3_GrSLType;
+ return kVec3i_GrSLType;
case kVec4i_GrVertexAttribType:
- return kInt4_GrSLType;
+ return kVec4i_GrSLType;
case kInt_GrVertexAttribType:
return kInt_GrSLType;
case kUint_GrVertexAttribType: