[Mesa-dev] [PATCH 6/6] glsl: fix a crash in ir_print_visitor() for bindless samplers/images

Timothy Arceri tarceri at itsqueeze.com
Wed May 31 00:46:51 UTC 2017


Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

On 26/05/17 04:07, Samuel Pitoiset wrote:
> Bindless samplers/images are represented with 64-bit unsigned
> integers and they can be assigned with explicit constructors.
> 
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>   src/compiler/glsl/ir_print_visitor.cpp | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/src/compiler/glsl/ir_print_visitor.cpp b/src/compiler/glsl/ir_print_visitor.cpp
> index 43be940a2f..ba3c1e243f 100644
> --- a/src/compiler/glsl/ir_print_visitor.cpp
> +++ b/src/compiler/glsl/ir_print_visitor.cpp
> @@ -492,7 +492,11 @@ void ir_print_visitor::visit(ir_constant *ir)
>               else
>                  fprintf(f, "%f", ir->value.f[i]);
>               break;
> -	 case GLSL_TYPE_UINT64:fprintf(f, "%" PRIu64, ir->value.u64[i]); break;
> +	 case GLSL_TYPE_SAMPLER:
> +	 case GLSL_TYPE_IMAGE:
> +	 case GLSL_TYPE_UINT64:
> +            fprintf(f, "%" PRIu64, ir->value.u64[i]);
> +            break;
>   	 case GLSL_TYPE_INT64: fprintf(f, "%" PRIi64, ir->value.i64[i]); break;
>   	 case GLSL_TYPE_BOOL:  fprintf(f, "%d", ir->value.b[i]); break;
>   	 case GLSL_TYPE_DOUBLE:
> 


More information about the mesa-dev mailing list