diff options
author | Dave Airlie <airlied@redhat.com> | 2017-11-13 15:40:15 +1000 |
---|---|---|
committer | Andres Gomez <agomez@igalia.com> | 2017-11-21 18:16:46 +0200 |
commit | 84f765ce25226c2d7694ff42d0f761310bdcb7b9 (patch) | |
tree | b3e85cd9dddb507831af825d0e0bd6081c110ea3 | |
parent | 0465cfe0b0c8c846fc5428123c93bfe5a04b0888 (diff) | |
download | mesa-84f765ce25226c2d7694ff42d0f761310bdcb7b9.tar.gz |
r600: fix isoline tess factor component swapping.
As per radeonsi, the tess factor components for isolines
are reversed.
Fixes: tests/spec/arb_tessellation_shader/execution/isoline.shader_test
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit f3f8615d76b20ad66466b172a600e06b9a833729)
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 2eb8187341c..9d6543d910a 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -2870,6 +2870,13 @@ static int r600_emit_tess_factor(struct r600_shader_ctx *ctx) int out_idx = i >= outer_comps ? tessinner_idx : tessouter_idx; int out_comp = i >= outer_comps ? i - outer_comps : i; + if (ctx->shader->tcs_prim_mode == PIPE_PRIM_LINES) { + if (out_comp == 1) + out_comp = 0; + else if (out_comp == 0) + out_comp = 1; + } + r = single_alu_op2(ctx, ALU_OP2_ADD_INT, treg[i / 2], (2 * (i % 2)), temp_reg, 0, |