Mesa (9.2): i965: Fix texture buffer rendering after a whole buffer replacement.

Carl Worth cworth at kemper.freedesktop.org
Mon Oct 28 16:40:41 UTC 2013


Module: Mesa
Branch: 9.2
Commit: 6f966b58a1257cc89a04b8a1ca80d038ba66a39d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6f966b58a1257cc89a04b8a1ca80d038ba66a39d

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Oct  4 16:13:00 2013 -0700

i965: Fix texture buffer rendering after a whole buffer replacement.

If glBufferData(), glBufferSubData(0, obj->Size), or similar happens, we
get a new drm_intel_bo for the buffer object, and thus need to re-upload
texture buffer state so we point at the new data.

Fixes the new piglit GL_ARB_texture_buffer_object/data-sync

Cc: "9.2" <mesa-stable at lists.freedesktop.org>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
(cherry picked from commit c0a9436d191d24d9aea18fcca7a79674af3a782e)

---

 src/mesa/drivers/dri/i965/brw_wm_surface_state.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 8847f91..e917943 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -259,6 +259,7 @@ brw_update_texture_surface(struct gl_context *ctx,
    uint32_t *surf;
    uint32_t tile_x, tile_y;
 
+   /* BRW_NEW_UNIFORM_BUFFER */
    if (tObj->Target == GL_TEXTURE_BUFFER) {
       brw_update_buffer_texture_surface(ctx, unit, binding_table, surf_index);
       return;
@@ -797,6 +798,7 @@ const struct brw_tracked_state brw_texture_surfaces = {
    .dirty = {
       .mesa = _NEW_TEXTURE,
       .brw = BRW_NEW_BATCH |
+             BRW_NEW_UNIFORM_BUFFER |
              BRW_NEW_VERTEX_PROGRAM |
              BRW_NEW_FRAGMENT_PROGRAM,
       .cache = 0




More information about the mesa-commit mailing list