[Mesa-dev] [PATCH] spirv: handle function pointer returns.

Jason Ekstrand jason at jlekstrand.net
Wed Feb 20 16:36:45 UTC 2019


This doesn't apply to master.  shader_info doesn't have ptr_size yet.

On Tue, Feb 19, 2019 at 7:38 PM Dave Airlie <airlied at gmail.com> wrote:

> From: Dave Airlie <airlied at redhat.com>
>
> This was hardcoded to 32, use the physical bit size we setup.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/compiler/spirv/vtn_cfg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/compiler/spirv/vtn_cfg.c b/src/compiler/spirv/vtn_cfg.c
> index c32d54e9006..2000c84832e 100644
> --- a/src/compiler/spirv/vtn_cfg.c
> +++ b/src/compiler/spirv/vtn_cfg.c
> @@ -276,7 +276,7 @@ vtn_cfg_handle_prepass_instruction(struct vtn_builder
> *b, SpvOp opcode,
>        if (func_type->return_type->base_type != vtn_base_type_void) {
>           /* The return value is a regular pointer */
>           func->params[idx++] = (nir_parameter) {
> -            .num_components = 1, .bit_size = 32,
> +            .num_components = 1, .bit_size = b->shader->info.cs.ptr_size,
>           };
>        }
>
> --
> 2.20.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190220/11cfe1ff/attachment.html>


More information about the mesa-dev mailing list