nir: Add another index to load_uniform to specify the range read

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Jason Ekstrand
2015-11-24 13:52:49 -08:00
parent 27bd8ac6f3
commit 63101177f3
4 changed files with 18 additions and 1 deletions

View File

@@ -277,6 +277,11 @@ nir_lower_io_block(nir_block *block, void *void_state)
nir_intrinsic_set_base(load,
intrin->variables[0]->var->data.driver_location);
if (load->intrinsic == nir_intrinsic_load_uniform) {
nir_intrinsic_set_range(load,
state->type_size(intrin->variables[0]->var->type));
}
if (per_vertex)
load->src[0] = nir_src_for_ssa(vertex_index);