summaryrefslogtreecommitdiffstats
path: root/src/amd/common
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-11-18 03:58:30 +0000
committerDave Airlie <[email protected]>2016-11-21 09:00:22 +1000
commitb1340fd708bb873617b8a529ac45cbc9507bd6c4 (patch)
treeded294edf1c001bc91e220637c858bf1478f86ae /src/amd/common
parent6d7be52d90cd5f4798b9612e8a68f6d6d9e31c33 (diff)
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" <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c5
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 5de1491123e..1d71795426c 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3492,7 +3492,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++) {