aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLVertexArray.cpp
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-10-24 13:22:10 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-25 15:44:05 +0000
commita045eea29eb79254248d7e2666825a1ca7d23d4e (patch)
tree4a0a55d8476a100c1fa5b54ca5212a02723a148f /src/gpu/gl/GrGLVertexArray.cpp
parentd204eb80abb0172b024664cf9f05d66d15574a24 (diff)
CCPR: use 16-bit ints for the atlas offset attrib
Bug: skia: Change-Id: I053e8416ced317b6ebc46cc8189840d60c7f91e8 Reviewed-on: https://skia-review.googlesource.com/62060 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/gpu/gl/GrGLVertexArray.cpp')
-rw-r--r--src/gpu/gl/GrGLVertexArray.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gpu/gl/GrGLVertexArray.cpp b/src/gpu/gl/GrGLVertexArray.cpp
index a903e7d2f1..fa318c58bf 100644
--- a/src/gpu/gl/GrGLVertexArray.cpp
+++ b/src/gpu/gl/GrGLVertexArray.cpp
@@ -45,10 +45,12 @@ static AttribLayout attrib_layout(GrVertexAttribType type) {
return {true, 1, GR_GL_UNSIGNED_BYTE};
case kUByte4_norm_GrVertexAttribType:
return {true, 4, GR_GL_UNSIGNED_BYTE};
- case kUShort2_norm_GrVertexAttribType:
- return {true, 2, GR_GL_UNSIGNED_SHORT};
+ case kShort2_GrVertexAttribType:
+ return {false, 2, GR_GL_SHORT};
case kUShort2_GrVertexAttribType:
return {false, 2, GR_GL_UNSIGNED_SHORT};
+ case kUShort2_norm_GrVertexAttribType:
+ return {true, 2, GR_GL_UNSIGNED_SHORT};
case kInt_GrVertexAttribType:
return {false, 1, GR_GL_INT};
case kUint_GrVertexAttribType:
@@ -87,10 +89,12 @@ static bool GrVertexAttribTypeIsIntType(const GrShaderCaps* shaderCaps,
return false;
case kUByte4_norm_GrVertexAttribType:
return false;
+ case kShort2_GrVertexAttribType:
+ return true;
+ case kUShort2_GrVertexAttribType:
+ return shaderCaps->integerSupport(); // FIXME: caller should handle this.
case kUShort2_norm_GrVertexAttribType:
return false;
- case kUShort2_GrVertexAttribType:
- return shaderCaps->integerSupport();
case kInt_GrVertexAttribType:
return true;
case kUint_GrVertexAttribType: