From a045eea29eb79254248d7e2666825a1ca7d23d4e Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Tue, 24 Oct 2017 13:22:10 -0600 Subject: 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 Reviewed-by: Ethan Nicholas --- src/gpu/gl/GrGLVertexArray.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/gpu/gl') 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: -- cgit v1.2.3