radeonsi/gfx9: fix TXF_LZ with 1D textures
authorMarek Olšák <marek.olsak@amd.com>
Fri, 16 Jun 2017 20:33:22 +0000 (22:33 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 19 Jun 2017 18:15:36 +0000 (20:15 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c

index e72052c44598d4be71bc3895f4dfefbf4e43ef61..3b50ca5341469865bc90d9741cb20cfd9c2eee55 100644 (file)
@@ -1493,7 +1493,8 @@ static void tex_fetch_args(
                LLVMValueRef filler;
 
                /* Use 0.5, so that we don't sample the border color. */
-               if (opcode == TGSI_OPCODE_TXF)
+               if (opcode == TGSI_OPCODE_TXF ||
+                   opcode == TGSI_OPCODE_TXF_LZ)
                        filler = ctx->i32_0;
                else
                        filler = LLVMConstReal(ctx->f32, 0.5);