From: Kristian Høgsberg Kristensen Date: Tue, 25 Aug 2015 22:57:12 +0000 (-0700) Subject: vk: Support descriptor sets and bindings in vec4 ubo loads X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e5afa75b5193c188551ed6a98c56691eae6841a;p=mesa.git vk: Support descriptor sets and bindings in vec4 ubo loads Still incomplete, but at least we get the simplest case working. Signed-off-by: Kristian Høgsberg Kristensen --- diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp index 923e2d30a4c..ee353b22330 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp @@ -612,17 +612,19 @@ vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr) has_indirect = true; /* fallthrough */ case nir_intrinsic_load_ubo: { + const uint32_t set = instr->const_index[0]; nir_const_value *const_block_index = nir_src_as_const_value(instr->src[0]); src_reg surf_index; dest = get_nir_dest(instr->dest); if (const_block_index) { + uint32_t binding = const_block_index->u[0]; + /* The block index is a constant, so just emit the binding table entry * as an immediate. */ - surf_index = src_reg(prog_data->base.binding_table.ubo_start + - const_block_index->u[0]); + surf_index = src_reg(stage_prog_data->bind_map[set].index[binding]); } else { /* The block index is not a constant. Evaluate the index expression * per-channel and add the base UBO index; we have to select a value