[Mesa-dev] [PATCH] nir/lower_vars_to_ssa: fix a bug with boolean constants

Jason Ekstrand jason at jlekstrand.net
Thu Jan 15 19:40:07 PST 2015


Reviewed-By: Jason Ekstrand <jason.ekstrand at intel.com>
On Jan 15, 2015 9:20 PM, "Connor Abbott" <cwabbott0 at gmail.com> wrote:

> Cc: Jason Ekstrand <jason at jlekstrand.net>
> ---
> Seems like we missed fixing this issue during review. Jason, can you commit
> this?
>
>  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 e331bcd..0eed0e2 100644
> --- a/src/glsl/nir/nir_lower_vars_to_ssa.c
> +++ b/src/glsl/nir/nir_lower_vars_to_ssa.c
> @@ -602,7 +602,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.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150115/f92b7390/attachment-0001.html>


More information about the mesa-dev mailing list