[Mesa-dev] [PATCH 1/4] radv: set use_prim_id for tess shaders correctly.

Kenneth Graunke kenneth at whitecape.org
Tue Jun 20 18:30:51 UTC 2017


On Monday, June 19, 2017 9:38:04 PM PDT Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> Just noticed in passing.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/amd/common/ac_nir_to_llvm.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 49117d2..4d9c070 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -3869,11 +3869,13 @@ static void visit_intrinsic(struct nir_to_llvm_context *ctx,
>  	case nir_intrinsic_load_primitive_id:
>  		if (ctx->stage == MESA_SHADER_GEOMETRY)
>  			result = ctx->gs_prim_id;
> -		else if (ctx->stage == MESA_SHADER_TESS_CTRL)
> +		else if (ctx->stage == MESA_SHADER_TESS_CTRL) {
> +			ctx->shader_info->tcs.uses_prim_id = true;
>  			result = ctx->tcs_patch_id;
> -		else if (ctx->stage == MESA_SHADER_TESS_EVAL)
> +		} else if (ctx->stage == MESA_SHADER_TESS_EVAL) {
> +			ctx->shader_info->tcs.uses_prim_id = true;
>  			result = ctx->tes_patch_id;
> -		else
> +		} else
>  			fprintf(stderr, "Unknown primitive id intrinsic: %d", ctx->stage);
>  		break;
>  	case nir_intrinsic_load_sample_id:
> 

This series is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

although my review for patch 4 is probably pretty worthless, as I'm not
familiar with GS scenario modes and the like :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170620/e5b63819/attachment.sig>


More information about the mesa-dev mailing list