summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2014-07-17 22:24:50 +0200
committerCarl Worth <cworth@cworth.org>2014-07-17 14:29:10 -0700
commit0273f22a103adbfe8be733a3690bf06e8f1b7ab7 (patch)
tree91cee63119f78b797983a9eb6f0c5a5a6f5a5a7d /src/gallium/drivers
parente7310313725142cf536179d4d918db2c20438765 (diff)
radeonsi: add support for TXB2
This is needed by latest fixes for samplerCubeShadow with bias. Otherwise, a crash occurs.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 09c99ebaf5a..397b6ee384c 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1539,6 +1539,8 @@ static void tex_fetch_args(
/* Pack LOD bias value */
if (opcode == TGSI_OPCODE_TXB)
address[count++] = coords[3];
+ if (opcode == TGSI_OPCODE_TXB2)
+ address[count++] = lp_build_emit_fetch(bld_base, inst, 1, 0);
/* Pack depth comparison value */
switch (target) {
@@ -2497,6 +2499,7 @@ int si_pipe_shader_create(
bld_base->op_actions[TGSI_OPCODE_TEX] = tex_action;
bld_base->op_actions[TGSI_OPCODE_TXB] = txb_action;
+ bld_base->op_actions[TGSI_OPCODE_TXB2] = txb_action;
#if HAVE_LLVM >= 0x0304
bld_base->op_actions[TGSI_OPCODE_TXD] = txd_action;
#endif