diff options
author | Dave Airlie <airlied@redhat.com> | 2016-11-18 03:58:30 +0000 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-11-24 16:34:41 +0000 |
commit | 6a3b5f32c23d3c901598ba8ec626086df9c79203 (patch) | |
tree | 5aa829e76830b94c195041583f5bec502c94c2ec | |
parent | 32adfd509df398696013704a39cde888361824bf (diff) | |
download | external_mesa3d-6a3b5f32c23d3c901598ba8ec626086df9c79203.zip external_mesa3d-6a3b5f32c23d3c901598ba8ec626086df9c79203.tar.gz external_mesa3d-6a3b5f32c23d3c901598ba8ec626086df9c79203.tar.bz2 |
radv: spir-v allows texture size query with and without lod.
The translation to llvm was failing here due to required lod.
This fixes some new SteamVR shaders.
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit b1340fd708bb873617b8a529ac45cbc9507bd6c4)
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 0b73e06..31d7b6e 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3416,7 +3416,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++) { |