[Mesa-dev] [PATCH 3/5] nir: Fix setup of constant bool initializers.
Connor Abbott
cwabbott0 at gmail.com
Thu Jan 22 20:09:24 PST 2015
On Wed, Jan 21, 2015 at 11:03 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> Connor wrote *exactly* the same patch:
>
> http://lists.freedesktop.org/archives/mesa-dev/2015-January/074522.html
>
> This version can have my R-B too. And, fwiw, I like your commit message
> better.
Indeed... let's push this version, since as you mentioned it has the
better commit message.
>
> On Wed, Jan 21, 2015 at 5:25 PM, Eric Anholt <eric at anholt.net> wrote:
>>
>> brw_fs_nir has only seen scalar bools so far, thanks to vector splitting,
>> and the ralloc of in glsl_to_nir.cpp will *usually* get you a 0-filled
>> chunk of memory, so reading too large of a value will usually get you the
>> right bool value. But once we start doing vector bools in a few commits,
>> we end up getting bad values.
>> ---
>> src/glsl/nir/nir_lower_vars_to_ssa.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/glsl/nir/nir_lower_vars_to_ssa.c
>> b/src/glsl/nir/nir_lower_vars_to_ssa.c
>> index 089f0d5..03967e3 100644
>> --- a/src/glsl/nir/nir_lower_vars_to_ssa.c
>> +++ b/src/glsl/nir/nir_lower_vars_to_ssa.c
>> @@ -600,7 +600,7 @@ get_const_initializer_load(const nir_deref_var *deref,
>> load->value.u[i] = constant->value.u[matrix_offset + i];
>> break;
>> case GLSL_TYPE_BOOL:
>> - load->value.u[i] = constant->value.u[matrix_offset + i] ?
>> + load->value.u[i] = constant->value.b[matrix_offset + i] ?
>> NIR_TRUE : NIR_FALSE;
>> break;
>> default:
>> --
>> 2.1.3
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list