[Mesa-dev] [PATCH 04/14] mesa: refactor _mesa_valid_prim_mode()

Brian Paul brianp at vmware.com
Thu Apr 25 07:41:25 PDT 2013


On 04/25/2013 12:42 AM, Ian Romanick wrote:
> On 04/25/2013 02:32 AM, Brian Paul wrote:
>> ...in terms of new _mesa_is_valid_prim_mode(). We need a mode validater
>> function that doesn't depend on current state for the display list
>> code.
>> ---
>> src/mesa/main/api_validate.c | 31 +++++++++++++++++++------------
>> src/mesa/main/api_validate.h | 3 +++
>> 2 files changed, 22 insertions(+), 12 deletions(-)
>>
>> diff --git a/src/mesa/main/api_validate.c
>> b/src/mesa/main/api_validate.c
>> index 19f5ab5..03f14f0 100644
>> --- a/src/mesa/main/api_validate.c
>> +++ b/src/mesa/main/api_validate.c
>> @@ -201,12 +201,11 @@ check_index_bounds(struct gl_context *ctx,
>> GLsizei count, GLenum type,
>> * Is 'mode' a valid value for glBegin(), glDrawArrays(),
>> glDrawElements(),
>> * etc? The set of legal values depends on whether geometry
>> shaders/programs
>> * are supported.
>> + * Note: This may be called during display list compilation.
>> */
>> GLboolean
>
> Maybe make this bool (and keep using true / false) since the return
> value is assigned to a bool in _mesa_valid_prim_mode anyway?

OK.

-Brian



More information about the mesa-dev mailing list