mesa: do not modify args when errors with GetProgramResourceName
authorTapani Pälli <tapani.palli@intel.com>
Tue, 4 Aug 2015 08:09:35 +0000 (11:09 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Wed, 5 Aug 2015 04:26:10 +0000 (07:26 +0300)
Original purpose of these lines was to be more friendly against
GUI tools using the extension. However conformance suite explicitly
checks that buffers are not modified in error conditions.

Fixes:
   ES31-CTS.program_interface_query.buff-length

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
src/mesa/main/program_resource.c

index 3864775818c7bd12cc69a79155cbed47c341e9ce..23d2b4d2da0a0baf2e8f4e6eae31525d80dad1b1 100644 (file)
@@ -274,12 +274,6 @@ _mesa_GetProgramResourceName(GLuint program, GLenum programInterface,
       _mesa_lookup_shader_program_err(ctx, program,
                                       "glGetProgramResourceName");
 
-   /* Set user friendly return values in case of errors. */
-   if (name)
-      *name = '\0';
-   if (length)
-      *length = 0;
-
    if (!shProg || !name)
       return;