Remove hacks for UShort2 texture coords
Plumb GPU type down for binding of vertex attributes in GL. Use that
to select between float and int versions of VertexAttribPointer.
For client code that was relying on the strange behavior of UShort2,
use shader caps to pick the appropriate GrSLType.
Bug: skia:
Change-Id: If52ea49e0a5667246687e90e088d0823dbedb921
Reviewed-on: https://skia-review.googlesource.com/155401
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/gl/GrGLVertexArray.h b/src/gpu/gl/GrGLVertexArray.h
index e460c04..93bd526 100644
--- a/src/gpu/gl/GrGLVertexArray.h
+++ b/src/gpu/gl/GrGLVertexArray.h
@@ -40,7 +40,8 @@
void set(GrGLGpu*,
int attribIndex,
const GrBuffer* vertexBuffer,
- GrVertexAttribType type,
+ GrVertexAttribType cpuType,
+ GrSLType gpuType,
GrGLsizei stride,
size_t offsetInBytes,
int divisor = 0);
@@ -77,7 +78,8 @@
}
GrGpuResource::UniqueID fVertexBufferUniqueID;
- GrVertexAttribType fType;
+ GrVertexAttribType fCPUType;
+ GrSLType fGPUType;
GrGLsizei fStride;
size_t fOffset;
int fDivisor;