OSDN Git Service

mesa/subroutines: don't generate error in GetSubroutineIndex.
authorDave Airlie <airlied@redhat.com>
Tue, 17 May 2016 04:20:00 +0000 (14:20 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 23 May 2016 06:19:57 +0000 (16:19 +1000)
GLSL spec says this doesn't generate an error.

Fixes:
GL45-CTS.explicit_uniform_location.subroutine-loc

Reviewed-by: Chris Forbes <chrisforbes@google.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/main/shaderapi.c

index 109171e..47666d8 100644 (file)
@@ -2324,7 +2324,6 @@ _mesa_GetSubroutineIndex(GLuint program, GLenum shadertype,
    resource_type = _mesa_shader_stage_to_subroutine(stage);
    res = _mesa_program_resource_find_name(shProg, resource_type, name, NULL);
    if (!res) {
-      _mesa_error(ctx, GL_INVALID_OPERATION, "%s", api_name);
      return -1;
    }