[Mesa-dev] [PATCH 4/5] mesa: Implement functions for clear_buffer_object extensions

Pi Tabred servuswiegehtz at yahoo.de
Wed Dec 11 04:21:00 PST 2013



On 10.12.2013 17:44, Brian Paul wrote:
> On 12/10/2013 06:13 AM, Pi Tabred wrote:
>> ... 
>> +      }
>> +   }
>> +
>> +   if (!_mesa_is_color_format(format)) {
>> +      _mesa_error(ctx, GL_INVALID_ENUM,
>> +                  "glClearBufferData(no color format)");
>> +   }
> 
> Are you sure about that error?  Where is this mentioned in the spec?
> Plus, you're missing a 'return' statement.

I am not sure, but is it possible to convert data from a depth/stencil
format to a color format? If not, the statement

"INVALID_ENUM is generated by ClearBufferSubData if <format> or <type>
is not one of the supported format or type tokens."

could be interpreted as to include this error as only certain color
formats are allowed for the internalformat.


Either way, you are right about the missing 'return'.


More information about the mesa-dev mailing list