[Mesa-dev] [PATCH 2/2] gallium: implement seamless cubemap extensions

Marek Olšák maraeo at gmail.com
Tue May 3 15:05:38 PDT 2011


On Tue, May 3, 2011 at 9:31 PM, Brian Paul <brianp at vmware.com> wrote:
> On 05/03/2011 11:55 AM, Roland Scheidegger wrote:
>>
>> Am 03.05.2011 15:55, schrieb Marek Olšák:
>>>
>>> diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c
>>> b/src/mesa/state_tracker/st_atom_rasterizer.c
>>> index 250cbb2..ac6d76a 100644
>>> --- a/src/mesa/state_tracker/st_atom_rasterizer.c
>>> +++ b/src/mesa/state_tracker/st_atom_rasterizer.c
>>> @@ -257,6 +257,9 @@ static void update_raster_state( struct st_context
>>> *st )
>>>     /* _NEW_FRAG_CLAMP */
>>>     raster->clamp_fragment_color = ctx->Color._ClampFragmentColor;
>>>
>>> +   /* _NEW_TEXTURE */
>>> +   raster->seamless_cube_map = ctx->Texture.CubeMapSeamless != GL_FALSE;
>>> +
>>>     raster->gl_rasterization_rules = 1;
>>>
>>>     cso_set_rasterizer(st->cso_context, raster);
>>> @@ -273,7 +276,8 @@ const struct st_tracked_state st_update_rasterizer =
>>> {
>>>         _NEW_POLYGON |
>>>         _NEW_PROGRAM |
>>>         _NEW_SCISSOR |
>>> -       _NEW_FRAG_CLAMP),      /* mesa state dependencies*/
>>> +       _NEW_FRAG_CLAMP |
>>> +       _NEW_TEXTURE),  /* mesa state dependencies */
>>>        ST_NEW_VERTEX_PROGRAM,  /* state tracker dependencies */
>>>     },
>>>     update_raster_state     /* update function */
>>
>> Hmm seems rather unfortunate that this is _NEW_TEXTURE - looks like all
>> the rest of the bits are likely much lower frequency (and of course the
>> seamless bit itself probably only ever changes once). I can see now why
>> you made that a new bit. I'll defer that to Brian though.
>
> Marek, are you sure it's too hard to check the currently bound samplers in
> the driver to check for global seamless cube map there?

Not so hard, it's just additional work that I wanted to avoid.

BTW I don't like the Mesa dirty flags either. They don't map to the
gallium state objects very well and we already have 30 or so.

Marek


More information about the mesa-dev mailing list