st/mesa: BufferData should flag NewDriverState
authorMarek Olšák <marek.olsak@amd.com>
Sun, 7 Aug 2016 00:45:30 +0000 (02:45 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 12 Aug 2016 16:50:01 +0000 (18:50 +0200)
because NewDriverState is filtered depending on active shader states,
while st->dirty isn't.

Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_cb_bufferobjects.c

index 2f56a55301dde0528fd79e5d47e0b1903ca66c7e..7c202ebcc50e789609c7f5365c7f1bcbcd51f7ac 100644 (file)
@@ -337,15 +337,15 @@ st_bufferobj_data(struct gl_context *ctx,
     * might be using it.
     */
    /* TODO: Add arrays to usage history */
-   st->dirty |= ST_NEW_VERTEX_ARRAYS;
+   ctx->NewDriverState |= ST_NEW_VERTEX_ARRAYS;
    if (st_obj->Base.UsageHistory & USAGE_UNIFORM_BUFFER)
-      st->dirty |= ST_NEW_UNIFORM_BUFFER;
+      ctx->NewDriverState |= ST_NEW_UNIFORM_BUFFER;
    if (st_obj->Base.UsageHistory & USAGE_SHADER_STORAGE_BUFFER)
-      st->dirty |= ST_NEW_STORAGE_BUFFER;
+      ctx->NewDriverState |= ST_NEW_STORAGE_BUFFER;
    if (st_obj->Base.UsageHistory & USAGE_TEXTURE_BUFFER)
-      st->dirty |= ST_NEW_SAMPLER_VIEWS | ST_NEW_IMAGE_UNITS;
+      ctx->NewDriverState |= ST_NEW_SAMPLER_VIEWS | ST_NEW_IMAGE_UNITS;
    if (st_obj->Base.UsageHistory & USAGE_ATOMIC_COUNTER_BUFFER)
-      st->dirty |= ST_NEW_ATOMIC_BUFFER;
+      ctx->NewDriverState |= ST_NEW_ATOMIC_BUFFER;
 
    return GL_TRUE;
 }