[Mesa-dev] [PATCH 11/16] i965/gen7.5: Update surface entries for pull constants and VS UBO surfaces.
Abdiel Janulgue
abdiel.janulgue at linux.intel.com
Tue Oct 8 14:41:48 PDT 2013
When surface_state pointing to pull constant surfaces are changed, update
on-chip binding table. Same with VS ubo surface states.
Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
index 2c5d06f..88a54a9 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
@@ -87,6 +87,10 @@ brw_upload_vec4_pull_constants(struct brw_context *brw,
const int surf = SURF_INDEX_VEC4_CONST_BUFFER;
brw->vtbl.create_constant_surface(brw, stage_state->const_bo, 0, size,
&stage_state->surf_offset[surf], false);
+ if (brw->has_resource_streamer) {
+ gen7_update_binding_table(brw, STAGE_VERTEX_SHADER,
+ surf, stage_state->surf_offset[surf]);
+ }
brw->state.dirty.brw |= brw_new_constbuf;
}
@@ -138,6 +142,11 @@ brw_upload_vs_ubo_surfaces(struct brw_context *brw)
brw_upload_ubo_surfaces(brw, prog->_LinkedShaders[MESA_SHADER_VERTEX],
&stage_state->surf_offset[SURF_INDEX_VEC4_UBO(0)]);
+ if (brw->has_resource_streamer) {
+ gen7_update_binding_table(brw, STAGE_VERTEX_SHADER,
+ SURF_INDEX_VEC4_UBO(0),
+ stage_state->surf_offset[SURF_INDEX_VEC4_UBO(0)]);
+ }
}
const struct brw_tracked_state brw_vs_ubo_surfaces = {
--
1.7.9.5
More information about the mesa-dev
mailing list