OSDN Git Service

Fixed uint uniforms
authorAlexis Hetu <sugoi@google.com>
Thu, 10 Sep 2015 20:55:03 +0000 (16:55 -0400)
committerAlexis Hétu <sugoi@google.com>
Wed, 23 Sep 2015 21:17:23 +0000 (21:17 +0000)
uint uniforms were failing because of a missing condition.
This only affected uint scalars, uint vectors were unaffected.

Change-Id: Ia2338a683f1e6f5f9b6944aae72e2dbec70a8ef2
Reviewed-on: https://swiftshader-review.googlesource.com/3963
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/OpenGL/libGLESv2/Program.cpp

index 18fa089..800e82d 100644 (file)
@@ -681,7 +681,7 @@ namespace es2
        \r
                count = std::min(size - (int)uniformIndex[location].element, count);\r
 \r
-               if(targetUniform->type == GL_INT || IsSamplerUniform(targetUniform->type))\r
+               if(targetUniform->type == GL_INT || targetUniform->type == GL_UNSIGNED_INT || IsSamplerUniform(targetUniform->type))\r
                {\r
                        memcpy(targetUniform->data + uniformIndex[location].element * sizeof(GLint),\r
                                   v, sizeof(GLint) * count);\r
@@ -800,7 +800,7 @@ namespace es2
        \r
                count = std::min(size - (int)uniformIndex[location].element, count);\r
 \r
-               if(targetUniform->type == GL_INT || IsSamplerUniform(targetUniform->type))\r
+               if(targetUniform->type == GL_INT || targetUniform->type == GL_UNSIGNED_INT || IsSamplerUniform(targetUniform->type))\r
                {\r
                        memcpy(targetUniform->data + uniformIndex[location].element * sizeof(GLuint),\r
                                   v, sizeof(GLuint)* count);\r