panfrost: Use fp32 (not fp16) varyings
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 28 Apr 2019 15:21:34 +0000 (15:21 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 28 Apr 2019 21:34:32 +0000 (21:34 +0000)
In a perfect world, we'd use fp16 varyings for mediump and fp32 for
highp, allowing us to get a performance win without sacrificing
conformance. Unfortunately, we're not there (yet), so it's better we
assume always fp32 than always fp16 to avoid artefacts / breaking a lot
of deqp.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/pan_assemble.c

index 5222631183283879d57219d7d6419791bda844e4..a6ba5fa6790e5938df9583d7473f8122f0950669 100644 (file)
@@ -112,7 +112,7 @@ panfrost_shader_compile(struct panfrost_context *ctx, struct mali_shader_meta *m
 
                 /* Default to a vec4 varying */
                 struct mali_attr_meta v = {
-                        .format = MALI_RGBA16F,
+                        .format = MALI_RGBA32F,
                         .swizzle = default_vec4_swizzle,
                         .unknown1 = 0x2,
                 };
@@ -136,12 +136,12 @@ panfrost_shader_compile(struct panfrost_context *ctx, struct mali_shader_meta *m
                         state->reads_point_coord = true;
                 } else {
                         v.index = 0;
-                        v.src_offset = 8 * (general_purpose_count++);
+                        v.src_offset = 16 * (general_purpose_count++);
                 }
 
                 state->varyings[i] = v;
         }
 
-        /* Set the stride for the general purpose fp16 vec4 varyings */
-        state->general_varying_stride = (2 * 4) * general_purpose_count;
+        /* Set the stride for the general purpose fp32 vec4 varyings */
+        state->general_varying_stride = (4 * 4) * general_purpose_count;
 }