[Mesa-dev] [PATCH] radeonsi/nir: add primitive id to inputs scan

Nicolai Hähnle nhaehnle at gmail.com
Mon Jan 22 13:11:55 UTC 2018


On 19.01.2018 12:46, Timothy Arceri wrote:
> Fixes the following piglit tests:
> 
> arb_tessellation_shader/fs-primitiveid-instanced
> glsl-1.50/primitive-id-no-gs
> glsl-1.50/primitive-id-no-gs-first-vertex
> glsl-1.50/primitive-id-no-gs-instanced
> glsl-1.50/primitive-id-no-gs-strip
> glsl-1.50/primitive-id-no-gs-strip-first-vertex

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


> ---
>   src/gallium/drivers/radeonsi/si_shader_nir.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
> index 4455322392..2f19bae813 100644
> --- a/src/gallium/drivers/radeonsi/si_shader_nir.c
> +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
> @@ -315,6 +315,9 @@ void si_nir_scan_shader(const struct nir_shader *nir,
>   			info->input_semantic_name[i] = semantic_name;
>   			info->input_semantic_index[i] = semantic_index;
>   
> +			if (semantic_name == TGSI_SEMANTIC_PRIMID)
> +				info->uses_primid = true;
> +
>   			if (variable->data.sample)
>   				info->input_interpolate_loc[i] = TGSI_INTERPOLATE_LOC_SAMPLE;
>   			else if (variable->data.centroid)
> 


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


More information about the mesa-dev mailing list