aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a6xx/fd6_emit.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-10-02 12:38:09 -0400
committerRob Clark <[email protected]>2018-10-17 12:44:48 -0400
commit2e9c08c0bce8df63979327f3b1c3c828fd1b98da (patch)
tree91abf80199d5a99a9b3687fe78e173be0878d910 /src/gallium/drivers/freedreno/a6xx/fd6_emit.h
parent8b1a3b5dde6405b4193eb0118e044a88b9b3accf (diff)
freedreno/ir3: move binning_pass out of shader variant key
Prep work for a following patch, that introduces a cache to map from program state (all shader stages) plus variant key to pre-baked hw state (which could be emit'd via CP_SET_DRAW_STATE, for example). To do that, we really want the variant key to be immutable, and to treat the binning pass shader as an extra shader stage, rather than as a VS variant. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a6xx/fd6_emit.h')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_emit.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h
index 005952750f8..c05b0a45c96 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h
@@ -61,6 +61,7 @@ struct fd6_emit {
const struct fd_vertex_state *vtx;
const struct fd_program_stateobj *prog;
const struct pipe_draw_info *info;
+ bool binning_pass;
struct ir3_shader_key key;
enum fd_dirty_3d_state dirty;
@@ -90,7 +91,8 @@ fd6_emit_get_vp(struct fd6_emit *emit)
{
if (!emit->vp) {
struct ir3_shader *shader = emit->prog->vp;
- emit->vp = ir3_shader_variant(shader, emit->key, emit->debug);
+ emit->vp = ir3_shader_variant(shader, emit->key,
+ emit->binning_pass, emit->debug);
}
return emit->vp;
}
@@ -99,13 +101,14 @@ static inline const struct ir3_shader_variant *
fd6_emit_get_fp(struct fd6_emit *emit)
{
if (!emit->fp) {
- if (emit->key.binning_pass) {
+ if (emit->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 ir3_shader *shader = emit->prog->fp;
- emit->fp = ir3_shader_variant(shader, emit->key,emit->debug);
+ emit->fp = ir3_shader_variant(shader, emit->key,
+ false, emit->debug);
}
}
return emit->fp;