panfrost/decode: Remove memory comments
[mesa.git] / src / gallium / drivers / panfrost / pan_assemble.c
index c9abe9e6687865308edae598bbf369d197273a1b..de8a53ce05d7f7a928d0f500ff97b2257117c4fc 100644 (file)
@@ -81,6 +81,11 @@ panfrost_shader_compile(struct panfrost_context *ctx, struct mali_shader_meta *m
 
         util_dynarray_fini(&program.compiled);
 
+        /* Sysvals are prepended */
+        program.uniform_count += program.sysval_count;
+        state->sysval_count = program.sysval_count;
+        memcpy(state->sysval, program.sysvals, sizeof(state->sysval[0]) * state->sysval_count);
+
         meta->midgard1.uniform_count = MIN2(program.uniform_count, program.uniform_cutoff);
         meta->attribute_count = program.attribute_count;
         meta->varying_count = program.varying_count;
@@ -100,14 +105,12 @@ panfrost_shader_compile(struct panfrost_context *ctx, struct mali_shader_meta *m
         unsigned default_vec4_swizzle = panfrost_get_default_swizzle(4);
 
         /* Iterate the varyings and emit the corresponding descriptor */
-        unsigned general_purpose_count = 0;
-
         for (unsigned i = 0; i < program.varying_count; ++i) {
                 unsigned location = program.varyings[i];
 
                 /* Default to a vec4 varying */
                 struct mali_attr_meta v = {
-                        .format = MALI_RGBA16F,
+                        .format = MALI_RGBA32F,
                         .swizzle = default_vec4_swizzle,
                         .unknown1 = 0x2,
                 };
@@ -131,12 +134,9 @@ 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++);
                 }
 
                 state->varyings[i] = v;
+                state->varyings_loc[i] = location;
         }
-
-        /* Set the stride for the general purpose fp16 vec4 varyings */
-        state->general_varying_stride = (2 * 4) * general_purpose_count;
 }