struct fd_ringbuffer *vsconstobj = fd_submit_new_ringbuffer(
ctx->batch->submit, 0x1000, FD_RINGBUFFER_STREAMING);
- ir3_emit_vs_consts(vp, vsconstobj, ctx, emit->info);
+ ir3_emit_user_consts(ctx->screen, vp, vsconstobj,
+ &ctx->constbuf[PIPE_SHADER_VERTEX]);
+ ir3_emit_ubos(ctx->screen, vp, vsconstobj,
+ &ctx->constbuf[PIPE_SHADER_VERTEX]);
+ ir3_emit_immediates(ctx->screen, vp, vsconstobj);
+ ir3_emit_ssbo_sizes(ctx->screen, vp, vsconstobj,
+ &ctx->shaderbuf[PIPE_SHADER_VERTEX]);
+ ir3_emit_image_dims(ctx->screen, vp, vsconstobj,
+ &ctx->shaderimg[PIPE_SHADER_VERTEX]);
+
+ if (ir3_needs_vs_driver_params(vp))
+ ir3_emit_vs_driver_params(vp, vsconstobj, ctx, emit->info);
+
fd6_emit_add_group(emit, vsconstobj, FD6_GROUP_VS_CONST, 0x7);
fd_ringbuffer_del(vsconstobj);
}
struct fd_ringbuffer *fsconstobj = fd_submit_new_ringbuffer(
ctx->batch->submit, 0x1000, FD_RINGBUFFER_STREAMING);
- ir3_emit_fs_consts(fp, fsconstobj, ctx);
+ ir3_emit_user_consts(ctx->screen, fp, fsconstobj,
+ &ctx->constbuf[PIPE_SHADER_FRAGMENT]);
+ ir3_emit_ubos(ctx->screen, fp, fsconstobj,
+ &ctx->constbuf[PIPE_SHADER_FRAGMENT]);
+ ir3_emit_immediates(ctx->screen, fp, fsconstobj);
+ ir3_emit_ssbo_sizes(ctx->screen, fp, fsconstobj,
+ &ctx->shaderbuf[PIPE_SHADER_FRAGMENT]);
+ ir3_emit_image_dims(ctx->screen, fp, fsconstobj,
+ &ctx->shaderimg[PIPE_SHADER_FRAGMENT]);
+
fd6_emit_add_group(emit, fsconstobj, FD6_GROUP_FS_CONST, 0x6);
fd_ringbuffer_del(fsconstobj);
}
offset, size, user_buffer, buffer);
}
-static void
-emit_user_consts(struct fd_screen *screen, const struct ir3_shader_variant *v,
+void
+ir3_emit_user_consts(struct fd_screen *screen, const struct ir3_shader_variant *v,
struct fd_ringbuffer *ring, struct fd_constbuf_stateobj *constbuf)
{
struct ir3_ubo_analysis_state *state;
}
}
-static void
-emit_ubos(struct fd_screen *screen, const struct ir3_shader_variant *v,
+void
+ir3_emit_ubos(struct fd_screen *screen, const struct ir3_shader_variant *v,
struct fd_ringbuffer *ring, struct fd_constbuf_stateobj *constbuf)
{
const struct ir3_const_state *const_state = &v->shader->const_state;
}
}
-static void
-emit_ssbo_sizes(struct fd_screen *screen, const struct ir3_shader_variant *v,
+void
+ir3_emit_ssbo_sizes(struct fd_screen *screen, const struct ir3_shader_variant *v,
struct fd_ringbuffer *ring, struct fd_shaderbuf_stateobj *sb)
{
const struct ir3_const_state *const_state = &v->shader->const_state;
}
}
-static void
-emit_image_dims(struct fd_screen *screen, const struct ir3_shader_variant *v,
+void
+ir3_emit_image_dims(struct fd_screen *screen, const struct ir3_shader_variant *v,
struct fd_ringbuffer *ring, struct fd_shaderimg_stateobj *si)
{
const struct ir3_const_state *const_state = &v->shader->const_state;
}
}
-static void
-emit_immediates(struct fd_screen *screen, const struct ir3_shader_variant *v,
+void
+ir3_emit_immediates(struct fd_screen *screen, const struct ir3_shader_variant *v,
struct fd_ringbuffer *ring)
{
const struct ir3_const_state *const_state = &v->shader->const_state;
ring_wfi(ctx->batch, ring);
- emit_user_consts(ctx->screen, v, ring, constbuf);
- emit_ubos(ctx->screen, v, ring, constbuf);
+ ir3_emit_user_consts(ctx->screen, v, ring, constbuf);
+ ir3_emit_ubos(ctx->screen, v, ring, constbuf);
if (shader_dirty)
- emit_immediates(ctx->screen, v, ring);
+ ir3_emit_immediates(ctx->screen, v, ring);
}
if (dirty & (FD_DIRTY_SHADER_PROG | FD_DIRTY_SHADER_SSBO)) {
struct fd_shaderbuf_stateobj *sb = &ctx->shaderbuf[t];
ring_wfi(ctx->batch, ring);
- emit_ssbo_sizes(ctx->screen, v, ring, sb);
+ ir3_emit_ssbo_sizes(ctx->screen, v, ring, sb);
}
if (dirty & (FD_DIRTY_SHADER_PROG | FD_DIRTY_SHADER_IMAGE)) {
struct fd_shaderimg_stateobj *si = &ctx->shaderimg[t];
ring_wfi(ctx->batch, ring);
- emit_image_dims(ctx->screen, v, ring, si);
+ ir3_emit_image_dims(ctx->screen, v, ring, si);
}
}
struct fd_ringbuffer;
struct fd_context;
+struct fd_screen;
+struct fd_constbuf_stateobj;
+struct fd_shaderbuf_stateobj;
+struct fd_shaderimg_stateobj;
+
+void ir3_emit_user_consts(struct fd_screen *screen, const struct ir3_shader_variant *v,
+ struct fd_ringbuffer *ring, struct fd_constbuf_stateobj *constbuf);
+void ir3_emit_ubos(struct fd_screen *screen, const struct ir3_shader_variant *v,
+ struct fd_ringbuffer *ring, struct fd_constbuf_stateobj *constbuf);
+void ir3_emit_ssbo_sizes(struct fd_screen *screen, const struct ir3_shader_variant *v,
+ struct fd_ringbuffer *ring, struct fd_shaderbuf_stateobj *sb);
+void ir3_emit_image_dims(struct fd_screen *screen, const struct ir3_shader_variant *v,
+ struct fd_ringbuffer *ring, struct fd_shaderimg_stateobj *si);
+void ir3_emit_immediates(struct fd_screen *screen, const struct ir3_shader_variant *v,
+ struct fd_ringbuffer *ring);
static inline bool
ir3_needs_vs_driver_params(const struct ir3_shader_variant *v)