Revert "panfrost: Don't DIY point size/coord fields"
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 25 Jul 2019 20:16:45 +0000 (13:16 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 25 Jul 2019 20:17:22 +0000 (13:17 -0700)
This reverts commit 4508f43eed5a4528f0e8ca9d1cfcdc78857043e0, which
broke a bunch of dEQP tests (e.g. in
dEQP-GLES2.functional.draw.draw_arrays.*)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_assemble.c
src/panfrost/midgard/midgard_compile.h

index c724489da3c17d286f2aafffe982280cc2d34363..8b831b8f52d70392cd508604cd5b01ec85729e45 100644 (file)
@@ -103,8 +103,8 @@ panfrost_shader_compile(struct panfrost_context *ctx, struct mali_shader_meta *m
         }
 
         state->can_discard = s->info.fs.uses_discard;
-        state->writes_point_size = s->info.outputs_written & VARYING_SLOT_PSIZ;
-        state->reads_point_coord = s->info.inputs_read & VARYING_SLOT_PNTC;
+        state->writes_point_size = program.writes_point_size;
+        state->reads_point_coord = false;
         state->helper_invocations = s->info.fs.needs_helper_invocations;
 
         /* Separate as primary uniform count is truncated */
@@ -136,10 +136,14 @@ panfrost_shader_compile(struct panfrost_context *ctx, struct mali_shader_meta *m
                         v.index = 2;
                         v.format = MALI_R16F;
                         v.swizzle = default_vec1_swizzle;
+
+                        state->writes_point_size = true;
                 } else if (location == VARYING_SLOT_PNTC) {
                         v.index = 3;
                         v.format = MALI_RG16F;
                         v.swizzle = default_vec2_swizzle;
+
+                        state->reads_point_coord = true;
                 } else {
                         v.index = 0;
                 }
index d450971128b583194a5daba7d0ec8fc5920db756..b6cd2affe724b9a28cf06e57bb04b420bdf412dc 100644 (file)
@@ -87,6 +87,9 @@ typedef struct {
 
         unsigned varyings[32];
 
+        /* Boolean properties of the program */
+        bool writes_point_size;
+
         int first_tag;
 
         struct util_dynarray compiled;