diff options
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index bfd01068aba..14ba251d4fb 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -1421,6 +1421,18 @@ vec4_visitor::emit_shader_time_write(enum shader_time_shader_type type, emit(SHADER_OPCODE_SHADER_TIME_ADD, dst_reg(), src_reg(dst)); } +void +vec4_visitor::assign_binding_table_offsets() +{ + prog_data->base.binding_table.texture_start = SURF_INDEX_VEC4_TEXTURE(0); + prog_data->base.binding_table.ubo_start = SURF_INDEX_VEC4_UBO(0); + prog_data->base.binding_table.shader_time_start = SURF_INDEX_VEC4_SHADER_TIME; + prog_data->base.binding_table.gather_texture_start = SURF_INDEX_VEC4_GATHER_TEXTURE(0); + prog_data->base.binding_table.pull_constants_start = SURF_INDEX_VEC4_CONST_BUFFER; + + /* prog_data->base.binding_table.size will be set by mark_surface_used. */ +} + bool vec4_visitor::run() { @@ -1429,6 +1441,8 @@ vec4_visitor::run() if (INTEL_DEBUG & DEBUG_SHADER_TIME) emit_shader_time_begin(); + assign_binding_table_offsets(); + emit_prolog(); /* Generate VS IR for main(). (the visitor only descends into @@ -1594,7 +1608,7 @@ bool brw_vec4_prog_data_compare(const struct brw_vec4_prog_data *a, const struct brw_vec4_prog_data *b) { - /* Compare all the struct up to the pointers. */ + /* Compare all the struct (including the base) up to the pointers. */ if (memcmp(a, b, offsetof(struct brw_vec4_prog_data, param))) return false; |