[Mesa-stable] [PATCH 10.4 backport] i965: Add missing BRW_NEW_*_PROG_DATA to texture/renderbuffer atoms.

Kenneth Graunke kenneth at whitecape.org
Wed Dec 24 00:18:42 PST 2014


This was probably missed when moving from a fixed binding table layout
to a dynamic one that changes based on the shader.

Fixes newly proposed Piglit test fbo-mrt-new-bind.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87619
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>
Reviewed-by: Mike Stroyan <mike at LunarG.com>
Cc: "10.4 10.3" <mesa-stable at lists.freedesktop.org>
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Here's a backport of this bugfix to 10.4.

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 ef46dd7..b38eba1 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -535,6 +535,7 @@ brw_update_null_renderbuffer_surface(struct brw_context *brw, unsigned int unit)
    drm_intel_bo *bo = NULL;
    unsigned pitch_minus_1 = 0;
    uint32_t multisampling_state = 0;
+   /* CACHE_NEW_WM_PROG */
    uint32_t surf_index =
       brw->wm.prog_data->binding_table.render_target_start + unit;
 
@@ -620,6 +621,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
    uint32_t format = 0;
    /* _NEW_BUFFERS */
    mesa_format rb_format = _mesa_get_render_format(ctx, intel_rb_format(irb));
+   /* CACHE_NEW_WM_PROG */
    uint32_t surf_index =
       brw->wm.prog_data->binding_table.render_target_start + unit;
 
@@ -737,7 +739,7 @@ const struct brw_tracked_state brw_renderbuffer_surfaces = {
       .mesa = (_NEW_COLOR |
                _NEW_BUFFERS),
       .brw = BRW_NEW_BATCH,
-      .cache = 0
+      .cache = CACHE_NEW_WM_PROG,
    },
    .emit = brw_update_renderbuffer_surfaces,
 };
@@ -764,6 +766,8 @@ update_stage_texture_surfaces(struct brw_context *brw,
    struct gl_context *ctx = &brw->ctx;
 
    uint32_t *surf_offset = stage_state->surf_offset;
+
+   /* CACHE_NEW_*_PROG */
    if (for_gather)
       surf_offset += stage_state->prog_data->binding_table.gather_texture_start;
    else
@@ -828,7 +832,7 @@ const struct brw_tracked_state brw_texture_surfaces = {
              BRW_NEW_VERTEX_PROGRAM |
              BRW_NEW_GEOMETRY_PROGRAM |
              BRW_NEW_FRAGMENT_PROGRAM,
-      .cache = 0
+      .cache = CACHE_NEW_VS_PROG | CACHE_NEW_GS_PROG | CACHE_NEW_WM_PROG,
    },
    .emit = brw_update_texture_surfaces,
 };
-- 
2.2.1



More information about the mesa-stable mailing list