[Mesa-dev] [PATCH 20/21] nir/lower_indirect: Bail early if modes == 0
Jason Ekstrand
jason at jlekstrand.net
Sun Oct 29 20:47:56 UTC 2017
Good point. I'll drop this patch.
On October 29, 2017 05:10:01 Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl> wrote:
> Doesn't the old behavior also lower compact arrays even with modes = 0?
>
>
>
> On Sat, Oct 28, 2017 at 8:36 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
>> There's no point in walking the program if 100% if we're never going to
>> actually lower anything.
>> ---
>> src/compiler/nir/nir_lower_indirect_derefs.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/src/compiler/nir/nir_lower_indirect_derefs.c
>> b/src/compiler/nir/nir_lower_indirect_derefs.c
>> index c949224..f1e060c 100644
>> --- a/src/compiler/nir/nir_lower_indirect_derefs.c
>> +++ b/src/compiler/nir/nir_lower_indirect_derefs.c
>> @@ -202,6 +202,9 @@ nir_lower_indirect_derefs(nir_shader *shader,
>> nir_variable_mode modes)
>> {
>> bool progress = false;
>>
>> + if (modes == 0)
>> + return false;
>> +
>> nir_foreach_function(function, shader) {
>> if (function->impl)
>> progress = lower_indirects_impl(function->impl, modes) || progress;
>> --
>> 2.5.0.400.gff86faf
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list