Mesa (main): radv: Only use TES vertex offset 2 for triangles and quads.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 13 15:22:34 UTC 2022
Module: Mesa
Branch: main
Commit: 394b93bfeba72584f80294ac87f74b752fcddb47
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=394b93bfeba72584f80294ac87f74b752fcddb47
Author: Timur Kristóf <timur.kristof at gmail.com>
Date: Wed Apr 13 14:54:30 2022 +0200
radv: Only use TES vertex offset 2 for triangles and quads.
Signed-off-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15837>
---
src/amd/vulkan/radv_shader.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index dc0a28160bc..f846445f950 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -1684,8 +1684,10 @@ radv_postprocess_config(const struct radv_device *device, const struct ac_shader
*/
bool need_gs_vtx_offset2 = !info->is_ngg_passthrough || info->gs.vertices_in >= 3;
+ /* TES only needs vertex offset 2 for triangles or quads. */
if (stage == MESA_SHADER_TESS_EVAL)
- need_gs_vtx_offset2 &= info->tes._primitive_mode != TESS_PRIMITIVE_ISOLINES;
+ need_gs_vtx_offset2 &= info->tes._primitive_mode == TESS_PRIMITIVE_TRIANGLES ||
+ info->tes._primitive_mode == TESS_PRIMITIVE_QUADS;
if (info->uses_invocation_id) {
gs_vgpr_comp_cnt = 3; /* VGPR3 contains InvocationID. */
More information about the mesa-commit
mailing list