diff options
author | Rob Clark <[email protected]> | 2016-03-13 12:15:28 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-03-13 12:23:41 -0400 |
commit | 476551a21fbb255a3effa7aa46801764a38ef213 (patch) | |
tree | ab286d83b1568ad82c331ba2974b946a911bfa8e | |
parent | dd9135c452a2a457fb6cabf7de573075d22a869a (diff) |
freedreno/a3xx: move where we deal w/ binning FS
Signed-off-by: Rob Clark <[email protected]>
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_draw.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_emit.h | 10 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_program.c | 9 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c index b8a31d84b3f..f48d464c294 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c @@ -167,6 +167,7 @@ fd3_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info) emit.key.binning_pass = false; emit.dirty = dirty; emit.vp = NULL; /* we changed key so need to refetch vp */ + emit.fp = NULL; draw_impl(ctx, ctx->ring, &emit); } diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h index fd9c3caae67..5dbb11599b5 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h @@ -75,8 +75,14 @@ static inline const struct ir3_shader_variant * fd3_emit_get_fp(struct fd3_emit *emit) { if (!emit->fp) { - struct fd3_shader_stateobj *so = emit->prog->fp; - emit->fp = ir3_shader_variant(so->shader, emit->key); + if (emit->key.binning_pass) { + /* use dummy stateobj to simplify binning vs non-binning: */ + static const struct ir3_shader_variant binning_fp = {}; + emit->fp = &binning_fp; + } else { + struct fd3_shader_stateobj *so = emit->prog->fp; + emit->fp = ir3_shader_variant(so->shader, emit->key); + } } return emit->fp; } diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_program.c b/src/gallium/drivers/freedreno/a3xx/fd3_program.c index a0fa40d1c25..57e269cc21f 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_program.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_program.c @@ -140,14 +140,7 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit, debug_assert(nr <= ARRAY_SIZE(color_regid)); vp = fd3_emit_get_vp(emit); - - if (emit->key.binning_pass) { - /* use dummy stateobj to simplify binning vs non-binning: */ - static const struct ir3_shader_variant binning_fp = {}; - fp = &binning_fp; - } else { - fp = fd3_emit_get_fp(emit); - } + fp = fd3_emit_get_fp(emit); vsi = &vp->info; fsi = &fp->info; |