From 64bc833f328346656150734cd5acccadb80b0445 Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Thu, 19 Sep 2019 13:45:44 -0700 Subject: [PATCH] freedreno: Move fs functions after geometry pipeline stages Let's try to always order the stages in the pipeline order. Signed-off-by: Kristian H. Kristensen --- .../drivers/freedreno/freedreno_program.c | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/freedreno/freedreno_program.c b/src/gallium/drivers/freedreno/freedreno_program.c index 8567883fb77..deadb3d73a4 100644 --- a/src/gallium/drivers/freedreno/freedreno_program.c +++ b/src/gallium/drivers/freedreno/freedreno_program.c @@ -30,15 +30,6 @@ #include "freedreno_program.h" #include "freedreno_context.h" -static void -fd_fs_state_bind(struct pipe_context *pctx, void *hwcso) -{ - struct fd_context *ctx = fd_context(pctx); - ctx->prog.fs = hwcso; - ctx->dirty_shader[PIPE_SHADER_FRAGMENT] |= FD_DIRTY_SHADER_PROG; - ctx->dirty |= FD_DIRTY_PROG; -} - static void fd_vs_state_bind(struct pipe_context *pctx, void *hwcso) { @@ -75,6 +66,15 @@ fd_gs_state_bind(struct pipe_context *pctx, void *hwcso) ctx->dirty |= FD_DIRTY_PROG; } +static void +fd_fs_state_bind(struct pipe_context *pctx, void *hwcso) +{ + struct fd_context *ctx = fd_context(pctx); + ctx->prog.fs = hwcso; + ctx->dirty_shader[PIPE_SHADER_FRAGMENT] |= FD_DIRTY_SHADER_PROG; + ctx->dirty |= FD_DIRTY_PROG; +} + static const char *solid_fs = "FRAG \n" "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1 \n" @@ -154,10 +154,10 @@ void fd_prog_init(struct pipe_context *pctx) int i; pctx->bind_vs_state = fd_vs_state_bind; - pctx->bind_fs_state = fd_fs_state_bind; pctx->bind_tcs_state = fd_tcs_state_bind; pctx->bind_tes_state = fd_tes_state_bind; pctx->bind_gs_state = fd_gs_state_bind; + pctx->bind_fs_state = fd_fs_state_bind; ctx->solid_prog.fs = assemble_tgsi(pctx, solid_fs, true); ctx->solid_prog.vs = assemble_tgsi(pctx, solid_vs, false);