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>
diff --git a/src/gpu/gl/GrGLVertexArray.cpp b/src/gpu/gl/GrGLVertexArray.cpp
index a903e7d..fa318c5 100644
--- a/src/gpu/gl/GrGLVertexArray.cpp
+++ b/src/gpu/gl/GrGLVertexArray.cpp
@@ -45,10 +45,12 @@
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 @@
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: