[Mesa-dev] [PATCH 01/10] st/mesa: use bitshifting to define state flags
Marek Olšák
maraeo at gmail.com
Wed Apr 18 09:22:48 PDT 2012
On Wed, Apr 18, 2012 at 5:02 PM, Brian Paul <brianp at vmware.com> wrote:
> On 04/18/2012 08:16 AM, Marek Olšák wrote:
>>
>> ---
>> src/mesa/state_tracker/st_context.h | 12 ++++++------
>> 1 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/src/mesa/state_tracker/st_context.h
>> b/src/mesa/state_tracker/st_context.h
>> index da03719..3d41ab5 100644
>> --- a/src/mesa/state_tracker/st_context.h
>> +++ b/src/mesa/state_tracker/st_context.h
>> @@ -42,12 +42,12 @@ struct st_context;
>> struct st_fragment_program;
>>
>>
>> -#define ST_NEW_MESA 0x1 /* Mesa state has changed */
>> -#define ST_NEW_FRAGMENT_PROGRAM 0x2
>> -#define ST_NEW_VERTEX_PROGRAM 0x4
>> -#define ST_NEW_FRAMEBUFFER 0x8
>> -#define ST_NEW_EDGEFLAGS_DATA 0x10
>> -#define ST_NEW_GEOMETRY_PROGRAM 0x20
>> +#define ST_NEW_MESA (1<< 0) /* Mesa state has changed
>> */
>> +#define ST_NEW_FRAGMENT_PROGRAM (1<< 1)
>> +#define ST_NEW_VERTEX_PROGRAM (1<< 2)
>> +#define ST_NEW_FRAMEBUFFER (1<< 3)
>> +#define ST_NEW_EDGEFLAGS_DATA (1<< 4)
>> +#define ST_NEW_GEOMETRY_PROGRAM (1<< 5)
>>
>>
>> struct st_state_flags {
>
>
> Marek, these look like good clean-ups. Thanks.
>
> BTW, the gl_array_attrib::NewState field is assigned to but never used
> anywhere. Want to remove it too?
Hi Brian,
I didn't remove it because I thought it would be useful in the future.
I wouldn't oppose somebody else removing it though.
Marek
More information about the mesa-dev
mailing list