[Mesa-dev] [PATCH 8/8] st/mesa: BufferData should flag NewDriverState

Marek Olšák maraeo at gmail.com
Sun Aug 7 01:12:24 UTC 2016


From: Marek Olšák <marek.olsak at amd.com>

because NewDriverState is filtered depending on active shader states,
while st->dirty isn't.
---
 src/mesa/state_tracker/st_cb_bufferobjects.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 2f56a55..7c202eb 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -330,29 +330,29 @@ st_bufferobj_data(struct gl_context *ctx,
          /* out of memory */
          st_obj->Base.Size = 0;
          return GL_FALSE;
       }
    }
 
    /* The current buffer may be bound, so we have to revalidate all atoms that
     * 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;
 }
 
 
 /**
  * Called via glInvalidateBuffer(Sub)Data.
  */
 static void
 st_bufferobj_invalidate(struct gl_context *ctx,
-- 
2.7.4



More information about the mesa-dev mailing list