[Mesa-dev] [PATCH] r600: fix isoline tess factor component swapping.

Nicolai Hähnle nhaehnle at gmail.com
Tue Nov 14 16:30:17 UTC 2017


On 13.11.2017 06:41, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> As per radeonsi, the tess factor components for isolines
> are reversed.
> 
> Fixes: tests/spec/arb_tessellation_shader/execution/isoline.shader_test
> Signed-off-by: Dave Airlie <airlied at redhat.com>

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

> ---
>   src/gallium/drivers/r600/r600_shader.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
> index fd0cc78..f4bbb34 100644
> --- a/src/gallium/drivers/r600/r600_shader.c
> +++ b/src/gallium/drivers/r600/r600_shader.c
> @@ -2885,6 +2885,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,
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list