summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a3xx
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-03-29 19:59:38 -0400
committerIlia Mirkin <[email protected]>2015-04-02 00:09:14 -0400
commit8efa3e340d13a9f373e7b2834f12d9fae43e6867 (patch)
tree90bd7831f58242b63ac14d6a130d00f7493af507 /src/gallium/drivers/freedreno/a3xx
parent70eed78cacd711e663068e78a8430372cc5fabf1 (diff)
freedreno: remove alpha key from ir3_shader
This complication is unnecessary and makes MRTs more complicated and likely to generate tons of variants. Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx')
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_draw.c4
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_program.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c
index a3f954902a7..6ff762e2ae4 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c
@@ -121,9 +121,6 @@ fixup_shader_state(struct fd_context *ctx, struct ir3_shader_key *key)
if (last_key->half_precision != key->half_precision)
ctx->prog.dirty |= FD_SHADER_DIRTY_FP;
- if (last_key->alpha != key->alpha)
- ctx->prog.dirty |= FD_SHADER_DIRTY_FP;
-
fd3_ctx->last_key = *key;
}
}
@@ -141,7 +138,6 @@ fd3_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info)
/* do binning pass first: */
.binning_pass = true,
.color_two_side = ctx->rasterizer ? ctx->rasterizer->light_twoside : false,
- .alpha = util_format_is_alpha(pipe_surface_format(pfb->cbufs[0])),
// TODO set .half_precision based on render target format,
// ie. float16 and smaller use half, float32 use full..
.half_precision = !!(fd_mesa_debug & FD_DBG_FRAGHALF),
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_program.c b/src/gallium/drivers/freedreno/a3xx/fd3_program.c
index 1250dffe29e..442b47dea9f 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_program.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_program.c
@@ -202,6 +202,9 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit)
color_regid = ir3_find_output_regid(fp,
ir3_semantic_name(TGSI_SEMANTIC_COLOR, 0));
+ if (util_format_is_alpha(emit->format))
+ color_regid += 3;
+
/* we could probably divide this up into things that need to be
* emitted if frag-prog is dirty vs if vert-prog is dirty..
*/