[Mesa-dev] [PATCH 2/2] gallium: implement seamless cubemap extensions
Brian Paul
brianp at vmware.com
Tue May 3 12:31:02 PDT 2011
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?
I'm still not too satisfied with having this state in two places. It
feels shoehorned into the rasterizer state.
But I don't want to hold this up too long. It could be changed in the
future if we change our minds.
-Brian
More information about the mesa-dev
mailing list