[Mesa-dev] [PATCH] radv: spir-v allows texture size query with and without lod.

Edward O'Callaghan funfunctor at folklore1984.net
Fri Nov 18 06:13:56 UTC 2016


Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

On 11/18/2016 03:00 PM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> The translation to llvm was failing here due to required lod.
> 
> This fixes some new  SteamVR shaders.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/amd/common/ac_nir_to_llvm.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 2023c50..3a37d2d 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -3522,7 +3522,10 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
>  		address[count++] = sample_index;
>  	} else if(instr->op == nir_texop_txs) {
>  		count = 0;
> -		address[count++] = lod;
> +		if (lod)
> +			address[count++] = lod;
> +		else
> +			address[count++] = ctx->i32zero;
>  	}
>  
>  	for (chan = 0; chan < count; chan++) {
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161118/657d9daf/attachment.sig>


More information about the mesa-dev mailing list