[Mesa-dev] [PATCH 1/6] mesa: add and use a dirty flag for GL_TEXTURE_CUBE_MAP_SEAMLESS
Marek Olšák
maraeo at gmail.com
Mon May 2 08:29:13 PDT 2011
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
>> 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.
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.
The third attached patch just renames _NEW_SEAMLESS_CUBE_MAP to
_NEW_TEXTURE in st/mesa (replaces [PATCH 2/6]).
Please review.
>
>
>> #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.
Marek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mesa-make-_NEW_TEXTURE-dirty-when-changing-GL_TEXTUR.patch
Type: text/x-diff
Size: 1003 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110502/6b1dd5d3/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-mesa-flush-vertices-before-changing-GL_RASTERIZER_DI.patch
Type: text/x-diff
Size: 959 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110502/6b1dd5d3/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-gallium-implement-ARB_seamless_cube_map.patch
Type: text/x-diff
Size: 2990 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110502/6b1dd5d3/attachment-0002.patch>
More information about the mesa-dev
mailing list