diff options
author | Nicolai Hähnle <[email protected]> | 2016-10-31 12:50:09 +0100 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-11-03 10:11:24 +0100 |
commit | 908f92ad1f8562490468716d789f4d78b543399c (patch) | |
tree | b6e2e04f74c536f1a5966baaf348f7cdf5a232cc /src/gallium/drivers/radeonsi/si_shader.h | |
parent | ffe4e829b0da8484ecc98ca4d31bfdbb8d667643 (diff) |
radeonsi: generate GS prolog to (partially) fix triangle strip adjacency rotation
Fixes GL45-CTS.geometry_shader.adjacency.adjacency_indiced_triangle_strip and
others.
This leaves the case of triangle strips with adjacency and primitive restarts
open. It seems that the only thing that cares about that is a piglit test.
Fixing this efficiently would be really involved, and I don't want to use the
hammer of degrading to software handling of indices because there may well
be software that uses this draw mode (without caring about the precise
rotation of triangles).
v2:
- skip the GS prolog entirely if workaround is not needed
- only check for TES (TES is always non-null when tessellation is used)
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.h')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 91f9cbffd8e..d8ab2a41c9c 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -325,6 +325,10 @@ struct si_tcs_epilog_bits { uint64_t inputs_to_copy; }; +struct si_gs_prolog_bits { + unsigned tri_strip_adj_fix:1; +}; + /* Common PS bits between the shader key and the prolog key. */ struct si_ps_prolog_bits { unsigned color_two_side:1; @@ -363,6 +367,9 @@ union si_shader_part_key { struct si_tcs_epilog_bits states; } tcs_epilog; struct { + struct si_gs_prolog_bits states; + } gs_prolog; + struct { struct si_ps_prolog_bits states; unsigned num_input_sgprs:5; unsigned num_input_vgprs:5; @@ -401,6 +408,9 @@ union si_shader_key { struct si_vs_epilog_bits epilog; /* same as VS */ unsigned as_es:1; /* export shader */ } tes; /* tessellation evaluation shader */ + struct { + struct si_gs_prolog_bits prolog; + } gs; }; struct si_shader_config { |