diff options
author | Timothy Arceri <[email protected]> | 2018-01-19 22:44:58 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-01-23 09:11:21 +1100 |
commit | dabff1cf7a13348cc93a9162f464d476a8866464 (patch) | |
tree | 46a19231fbd3155028ed9ef022fbb6303eee4bcd /src/gallium | |
parent | c6a0ce7e5479f9bb8ed6135df685b0e34681c189 (diff) |
radeonsi/nir: add primitive id to inputs scan
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_nir.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 56594fcd0e2..e26994c06b9 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -239,6 +239,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) |