void
panfrost_emit_varying_descriptor(struct panfrost_batch *batch,
unsigned vertex_count,
- struct mali_vertex_tiler_postfix *vertex_postfix,
- struct mali_vertex_tiler_postfix *tiler_postfix,
- union midgard_primitive_size *primitive_size)
+ mali_ptr *vs_attribs,
+ mali_ptr *fs_attribs,
+ mali_ptr *buffers,
+ mali_ptr *position,
+ mali_ptr *psiz)
{
/* Load the shaders */
struct panfrost_context *ctx = batch->ctx;
gen_stride, vertex_count);
/* fp32 vec4 gl_Position */
- tiler_postfix->position_varying = panfrost_emit_varyings(batch,
+ *position = panfrost_emit_varyings(batch,
&varyings[pan_varying_index(present, PAN_VARY_POSITION)],
sizeof(float) * 4, vertex_count);
if (present & (1 << PAN_VARY_PSIZ)) {
- primitive_size->pointer = panfrost_emit_varyings(batch,
+ *psiz = panfrost_emit_varyings(batch,
&varyings[pan_varying_index(present, PAN_VARY_PSIZ)],
2, vertex_count);
}
pan_emit_special_input(varyings, present, PAN_VARY_FACE, MALI_ATTRIBUTE_SPECIAL_FRONT_FACING);
pan_emit_special_input(varyings, present, PAN_VARY_FRAGCOORD, MALI_ATTRIBUTE_SPECIAL_FRAG_COORD);
- vertex_postfix->varyings = T.gpu;
- tiler_postfix->varyings = T.gpu;
-
- vertex_postfix->varying_meta = trans.gpu;
- tiler_postfix->varying_meta = trans.gpu + vs_size;
+ *buffers = T.gpu;
+ *vs_attribs = trans.gpu;
+ *fs_attribs = trans.gpu + vs_size;
}
void
void
panfrost_emit_varying_descriptor(struct panfrost_batch *batch,
unsigned vertex_count,
- struct mali_vertex_tiler_postfix *vertex_postfix,
- struct mali_vertex_tiler_postfix *tiler_postfix,
- union midgard_primitive_size *primitive_size);
+ mali_ptr *vs_attribs,
+ mali_ptr *fs_attribs,
+ mali_ptr *buffers,
+ mali_ptr *position,
+ mali_ptr *psiz);
void
panfrost_emit_vertex_tiler_jobs(struct panfrost_batch *batch,
/* Emit all sort of descriptors. */
mali_ptr push_vert = 0, push_frag = 0, attribs = 0;
+ mali_ptr varyings = 0, vs_vary = 0, fs_vary = 0, pos = 0, psiz = 0;
vertex_postfix.attribute_meta = panfrost_emit_vertex_data(batch, &attribs);
vertex_postfix.attributes = attribs;
panfrost_emit_varying_descriptor(batch,
ctx->padded_count *
ctx->instance_count,
- &vertex_postfix, &tiler_postfix,
- &primitive_size);
+ &vs_vary, &fs_vary, &varyings,
+ &pos, &psiz);
+ vertex_postfix.varyings = varyings;
+ tiler_postfix.varyings = varyings;
+ vertex_postfix.varying_meta = vs_vary;
+ tiler_postfix.varying_meta = fs_vary;
+ tiler_postfix.position_varying = pos;
vertex_postfix.sampler_descriptor = panfrost_emit_sampler_descriptors(batch, PIPE_SHADER_VERTEX);
tiler_postfix.sampler_descriptor = panfrost_emit_sampler_descriptors(batch, PIPE_SHADER_FRAGMENT);
vertex_postfix.textures = panfrost_emit_texture_descriptors(batch, PIPE_SHADER_VERTEX);
vertex_postfix.shader = panfrost_emit_compute_shader_meta(batch, PIPE_SHADER_VERTEX);
tiler_postfix.shader = panfrost_emit_frag_shader_meta(batch);
+ primitive_size.pointer = psiz;
panfrost_vt_update_primitive_size(ctx, &tiler_prefix, &primitive_size);
/* Fire off the draw itself */