[Mesa-dev] [PATCH 1/6] mesa: add and use a dirty flag for GL_TEXTURE_CUBE_MAP_SEAMLESS

Brian Paul brianp at vmware.com
Mon May 2 06:47:40 PDT 2011


On 05/02/2011 07:03 AM, Marek Olšák wrote:
> Otherwise there would be no way to know whether the state has been changed.
> ---
>   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);
>   	 break;

The flush call needs to be made before the state is changed.


>   #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.

-Brian


More information about the mesa-dev mailing list