[Mesa-dev] [PATCH v3 05/12] nir/lower_io: Get rid of load/store_foo_indirect
Jason Ekstrand
jason at jlekstrand.net
Wed Dec 9 20:27:23 PST 2015
On Tue, Dec 8, 2015 at 6:25 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On Tuesday, December 08, 2015 01:46:22 PM Jason Ekstrand wrote:
>> diff --git a/src/glsl/nir/nir_lower_io.c b/src/glsl/nir/nir_lower_io.c
>> index f64ac69..a2723d5 100644
>> --- a/src/glsl/nir/nir_lower_io.c
>> +++ b/src/glsl/nir/nir_lower_io.c
>> @@ -333,18 +311,18 @@ nir_lower_io(nir_shader *shader, nir_variable_mode mode,
>> * Return the indirect source for a load/store indirect intrinsic.
>
> This comment could use updating. How about:
>
> /**
> * Return the offset soruce for a load/store intrinsic.
> */
Good call. Fixed locally.
--Jason
>> */
>> nir_src *
>> -nir_get_io_indirect_src(nir_intrinsic_instr *instr)
>> +nir_get_io_offset_src(nir_intrinsic_instr *instr)
>> {
>> switch (instr->intrinsic) {
>> - case nir_intrinsic_load_input_indirect:
>> - case nir_intrinsic_load_output_indirect:
>> - case nir_intrinsic_load_uniform_indirect:
>> + case nir_intrinsic_load_input:
>> + case nir_intrinsic_load_output:
>> + case nir_intrinsic_load_uniform:
>> return &instr->src[0];
>> - case nir_intrinsic_load_per_vertex_input_indirect:
>> - case nir_intrinsic_load_per_vertex_output_indirect:
>> - case nir_intrinsic_store_output_indirect:
>> + case nir_intrinsic_load_per_vertex_input:
>> + case nir_intrinsic_load_per_vertex_output:
>> + case nir_intrinsic_store_output:
>> return &instr->src[1];
>> - case nir_intrinsic_store_per_vertex_output_indirect:
>> + case nir_intrinsic_store_per_vertex_output:
>> return &instr->src[2];
>> default:
>> return NULL;
More information about the mesa-dev
mailing list