freedreno/a6xx: stop using ir3_emit_{vs,fs}_consts()
Should be no functional change. Next step is to re-arrange various const state into different stateobjs. Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
parent
53667a43c4
commit
f0b91730a1
|
@ -934,7 +934,19 @@ fd6_emit_state(struct fd_ringbuffer *ring, struct fd6_emit *emit)
|
|||
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);
|
||||
}
|
||||
|
@ -943,7 +955,16 @@ fd6_emit_state(struct fd_ringbuffer *ring, struct fd6_emit *emit)
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -211,8 +211,8 @@ emit_const(struct fd_screen *screen, struct fd_ringbuffer *ring,
|
|||
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;
|
||||
|
@ -246,8 +246,8 @@ emit_user_consts(struct fd_screen *screen, const struct ir3_shader_variant *v,
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -277,8 +277,8 @@ emit_ubos(struct fd_screen *screen, const struct ir3_shader_variant *v,
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -298,8 +298,8 @@ emit_ssbo_sizes(struct fd_screen *screen, const struct ir3_shader_variant *v,
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -350,8 +350,8 @@ emit_image_dims(struct fd_screen *screen, const struct ir3_shader_variant *v,
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -482,22 +482,22 @@ emit_common_consts(const struct ir3_shader_variant *v, struct fd_ringbuffer *rin
|
|||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,21 @@ struct ir3_shader_variant * ir3_shader_variant(struct ir3_shader *shader,
|
|||
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue