[Mesa-dev] [PATCH 15/16] i965/blorp: Update surface state entries in blorp.

Abdiel Janulgue abdiel.janulgue at linux.intel.com
Tue Oct 8 14:41:52 PDT 2013


When hw-generated binding tables are enabled edit the binding table
state for new SURFACE_STATE entries that are generated in the blorp path.

Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
 src/mesa/drivers/dri/i965/gen6_blorp.cpp |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
index e77b6fb..6b1f4df 100644
--- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
@@ -465,7 +465,20 @@ gen6_blorp_emit_binding_table(struct brw_context *brw,
                               uint32_t wm_surf_offset_texture)
 {
    uint32_t wm_bind_bo_offset;
-   uint32_t *bind = (uint32_t *)
+   uint32_t *bind;
+
+   if (brw->hw_bt_pool && brw->has_resource_streamer) {
+      gen7_update_binding_table(brw, STAGE_FRAGMENT_SHADER,
+                                BRW_BLORP_RENDERBUFFER_BINDING_TABLE_INDEX,
+                                wm_surf_offset_renderbuffer);
+      gen7_update_binding_table(brw, STAGE_FRAGMENT_SHADER,
+                                BRW_BLORP_TEXTURE_BINDING_TABLE_INDEX,
+                                wm_surf_offset_texture);
+
+      return brw->wm.base.bind_bo_offset;
+   }
+
+   bind = (uint32_t *)
       brw_state_batch(brw, AUB_TRACE_BINDING_TABLE,
                       sizeof(uint32_t) *
                       BRW_BLORP_NUM_BINDING_TABLE_ENTRIES,
-- 
1.7.9.5



More information about the mesa-dev mailing list