st/mesa: Invalidate the gallium array atom only if needed.
Now that the buffer object usage history tracks if it is being used as vertex buffer object, we can restrict setting the ST_NEW_VERTEX_ARRAYS bit to dirty on glBufferData calls to buffers that are potentially used as vertex buffer object. Also put a note that the same could be done for index arrays used in indexed draws. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
parent
e727f8c8b8
commit
904a0552aa
|
@ -357,8 +357,10 @@ bufferobj_data(struct gl_context *ctx,
|
|||
/* The current buffer may be bound, so we have to revalidate all atoms that
|
||||
* might be using it.
|
||||
*/
|
||||
/* TODO: Add arrays to usage history */
|
||||
ctx->NewDriverState |= ST_NEW_VERTEX_ARRAYS;
|
||||
if (st_obj->Base.UsageHistory & USAGE_ARRAY_BUFFER)
|
||||
ctx->NewDriverState |= ST_NEW_VERTEX_ARRAYS;
|
||||
/* if (st_obj->Base.UsageHistory & USAGE_ELEMENT_ARRAY_BUFFER) */
|
||||
/* ctx->NewDriverState |= TODO: Handle indices as gallium state; */
|
||||
if (st_obj->Base.UsageHistory & USAGE_UNIFORM_BUFFER)
|
||||
ctx->NewDriverState |= ST_NEW_UNIFORM_BUFFER;
|
||||
if (st_obj->Base.UsageHistory & USAGE_SHADER_STORAGE_BUFFER)
|
||||
|
|
Loading…
Reference in New Issue