From 3a2caf8ecf38124f4ad21a0f6c4dabfcfa17911a Mon Sep 17 00:00:00 2001 From: cdalton Date: Fri, 5 Feb 2016 16:26:32 -0800 Subject: Improve GLSL integer support - Adds shader types for uint. - Adds a cap for integer support. - Uses glVertexAttribIPointer for integer attribs. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1669853002 Review URL: https://codereview.chromium.org/1669853002 --- src/gpu/gl/GrGLInterface.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gpu/gl/GrGLInterface.cpp') diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp index 925f081b34..c09efae2b8 100644 --- a/src/gpu/gl/GrGLInterface.cpp +++ b/src/gpu/gl/GrGLInterface.cpp @@ -416,6 +416,13 @@ bool GrGLInterface::validate() const { } } + // glVertexAttribIPointer was added in version 3.0 of both desktop and ES. + if (glVer >= GR_GL_VER(3, 0)) { + if (NULL == fFunctions.fVertexAttribIPointer) { + RETURN_FALSE_INTERFACE + } + } + if (kGL_GrGLStandard == fStandard) { if (glVer >= GR_GL_VER(3, 0) || fExtensions.has("GL_ARB_vertex_array_object")) { if (nullptr == fFunctions.fBindVertexArray || -- cgit v1.2.3