panfrost: Don't DIY point size/coord fields
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 23 Jul 2019 23:55:38 +0000 (16:55 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 25 Jul 2019 13:34:21 +0000 (06:34 -0700)
Again, it's in shader_info for us!

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

index 7515808..8ccf912 100644 (file)
@@ -92,8 +92,8 @@ panfrost_shader_compile(struct panfrost_context *ctx, struct mali_shader_meta *m
         meta->midgard1.work_count = program.work_register_count;
 
         state->can_discard = s->info.fs.uses_discard;
-        state->writes_point_size = program.writes_point_size;
-        state->reads_point_coord = false;
+        state->writes_point_size = s->info.outputs_written & VARYING_SLOT_PSIZ;
+        state->reads_point_coord = s->info.inputs_read & VARYING_SLOT_PNTC;
         state->helper_invocations = s->info.fs.needs_helper_invocations;
 
         /* Separate as primary uniform count is truncated */
@@ -125,14 +125,10 @@ 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 f76715e..3b16cbd 100644 (file)
@@ -88,9 +88,6 @@ typedef struct {
 
         unsigned varyings[32];
 
-        /* Boolean properties of the program */
-        bool writes_point_size;
-
         int first_tag;
 
         struct util_dynarray compiled;