[Mesa-dev] [RFC PATCH 10/12] i965: Use hw-bt for generated WM UBO surface states.

Abdiel Janulgue abdiel.janulgue at linux.intel.com
Mon Jul 8 06:17:01 PDT 2013


Update the hardware binding table when uploading a new UBO surface state

Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c |    5 +++++
 1 file changed, 5 insertions(+)

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 f1fb889..8dbf021 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -851,6 +851,7 @@ static void
 brw_upload_wm_ubo_surfaces(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->intel.ctx;
+   struct intel_context *intel = &brw->intel;
    /* _NEW_PROGRAM */
    struct gl_shader_program *prog = ctx->Shader._CurrentFragmentProgram;
 
@@ -859,6 +860,10 @@ brw_upload_wm_ubo_surfaces(struct brw_context *brw)
 
    brw_upload_ubo_surfaces(brw, prog->_LinkedShaders[MESA_SHADER_FRAGMENT],
 			   &brw->wm.surf_offset[SURF_INDEX_WM_UBO(0)]);
+   if (intel->is_haswell) {
+      gen7_update_ps_binding_table(brw, SURF_INDEX_WM_UBO(0),
+                                     brw->wm.surf_offset[SURF_INDEX_WM_UBO(0)]);
+   }
 }
 
 const struct brw_tracked_state brw_wm_ubo_surfaces = {
-- 
1.7.9.5



More information about the mesa-dev mailing list