[Mesa-dev] [PATCH 1/6] mesa: add and use a dirty flag for GL_TEXTURE_CUBE_MAP_SEAMLESS
brianp at vmware.com
Mon May 2 08:54:52 PDT 2011
On 05/02/2011 09:29 AM, Marek Olšák wrote:
> On Mon, May 2, 2011 at 3:47 PM, Brian Paul<brianp at vmware.com> wrote:
>> On 05/02/2011 07:03 AM, Marek Olšák wrote:
>>> Otherwise there would be no way to know whether the state has been
>>> src/mesa/main/enable.c | 1 +
>>> src/mesa/main/mtypes.h | 1 +
>>> 2 files changed, 2 insertions(+), 0 deletions(-)
>>> diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
>>> index 2ec19c8..dbc6d21 100644
>>> --- a/src/mesa/main/enable.c
>>> +++ b/src/mesa/main/enable.c
>>> @@ -886,6 +886,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap,
>>> GLboolean state)
>>> case GL_TEXTURE_CUBE_MAP_SEAMLESS:
>>> CHECK_EXTENSION(ARB_seamless_cube_map, cap);
>>> ctx->Texture.CubeMapSeamless = state;
>>> + FLUSH_VERTICES(ctx, _NEW_SEAMLESS_CUBE_MAP);
>> The flush call needs to be made before the state is changed.
> OK, please see the attached patch (replaces [PATCH 1/6]).
> The second attached patch fixes the same problem in the place where I
> got that from.
Thanks for fixing that too.
> The third attached patch just renames _NEW_SEAMLESS_CUBE_MAP to
> _NEW_TEXTURE in st/mesa (replaces [PATCH 2/6]).
> Please review.
Reviewed-by: Brian Paul <brianp at vmware.com>
>>> #if FEATURE_EXT_transform_feedback
>>> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
>>> index fba65e8..8665353 100644
>>> --- a/src/mesa/main/mtypes.h
>>> +++ b/src/mesa/main/mtypes.h
>>> @@ -2994,6 +2994,7 @@ struct gl_matrix_stack
>>> #define _NEW_PROGRAM_CONSTANTS (1<< 27)
>>> #define _NEW_BUFFER_OBJECT (1<< 28)
>>> #define _NEW_FRAG_CLAMP (1<< 29)
>>> +#define _NEW_SEAMLESS_CUBE_MAP (1<< 30)
>> I'd probably just use the _NEW_TEXTURE flag here.
> I didn't want to cause needless validation of pipe_rasterizer_state,
> but I guess it's the kind of state that doesn't change often.
Right. At some point in the future _NEW_TEXTURE should probably be
split up into slightly finer-grained flags.
More information about the mesa-dev