Module: Mesa
Branch: staging/18.1
Commit: 11619279ecc8d15ec9f856fd3f17654f46e07b77
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=11619279ecc8d15ec9f856fd3f17654f46e07b77

Author: Dave Airlie <[email protected]>
Date:   Thu Jul 19 05:39:15 2018 +0100

r600: enable tess_input_info for TES

There might be a nicer way to do this, but this is at least correct.

This fixes:
KHR-GL44.tessellation_shader.single.max_patch_vertices
KHR-GL44.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_PatchVerticesIn

Reviewed-By: Gert Wollny <[email protected]>
Cc: [email protected]
(cherry picked from commit d73f1026b404a0aae532d56643fe63651cb4c8a7)

---

 src/gallium/drivers/r600/r600_shader.c | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_shader.c 
b/src/gallium/drivers/r600/r600_shader.c
index bd511c76ac..db4f9a1675 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -1673,19 +1673,11 @@ static void tgsi_src(struct r600_shader_ctx *ctx,
                } else if 
(ctx->info.system_value_semantic_name[tgsi_src->Register.Index] == 
TGSI_SEMANTIC_TESSOUTER) {
                        r600_src->sel = 2;
                } else if 
(ctx->info.system_value_semantic_name[tgsi_src->Register.Index] == 
TGSI_SEMANTIC_VERTICESIN) {
-                       if (ctx->type == PIPE_SHADER_TESS_CTRL) {
-                               r600_src->sel = ctx->tess_input_info;
-                               r600_src->swizzle[0] = 2;
-                               r600_src->swizzle[1] = 2;
-                               r600_src->swizzle[2] = 2;
-                               r600_src->swizzle[3] = 2;
-                       } else {
-                               r600_src->sel = ctx->tess_input_info;
-                               r600_src->swizzle[0] = 3;
-                               r600_src->swizzle[1] = 3;
-                               r600_src->swizzle[2] = 3;
-                               r600_src->swizzle[3] = 3;
-                       }
+                       r600_src->sel = ctx->tess_input_info;
+                       r600_src->swizzle[0] = 2;
+                       r600_src->swizzle[1] = 2;
+                       r600_src->swizzle[2] = 2;
+                       r600_src->swizzle[3] = 2;
                } else if (ctx->type == PIPE_SHADER_TESS_CTRL && 
ctx->info.system_value_semantic_name[tgsi_src->Register.Index] == 
TGSI_SEMANTIC_PRIMID) {
                        r600_src->sel = 0;
                        r600_src->swizzle[0] = 0;
@@ -3559,7 +3551,7 @@ static int r600_shader_from_tgsi(struct r600_context 
*rctx,
                ctx.tess_input_info = ++regno;
                ctx.tess_output_info = ++regno;
        } else if (ctx.type == PIPE_SHADER_TESS_EVAL) {
-               ctx.tess_input_info = 0;
+               ctx.tess_input_info = ++regno;
                ctx.tess_output_info = ++regno;
        } else if (ctx.type == PIPE_SHADER_GEOMETRY) {
                ctx.gs_export_gpr_tregs[0] = ++regno;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to