mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 11:20:11 +01:00
r600: Add flag for dual-source blending to shader key
Otherwise the number of outputs and the output data index can't be interpreted correctly. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6814>
This commit is contained in:
parent
1625a9b9ae
commit
a57f2d0cfa
2 changed files with 4 additions and 1 deletions
|
|
@ -137,6 +137,7 @@ union r600_shader_key {
|
||||||
unsigned color_two_side:1;
|
unsigned color_two_side:1;
|
||||||
unsigned alpha_to_one:1;
|
unsigned alpha_to_one:1;
|
||||||
unsigned apply_sample_id_mask:1;
|
unsigned apply_sample_id_mask:1;
|
||||||
|
unsigned dual_source_blend:1;
|
||||||
} ps;
|
} ps;
|
||||||
struct {
|
struct {
|
||||||
unsigned prim_id_out:8;
|
unsigned prim_id_out:8;
|
||||||
|
|
|
||||||
|
|
@ -821,8 +821,10 @@ static inline void r600_shader_selector_key(const struct pipe_context *ctx,
|
||||||
key->ps.nr_cbufs = rctx->framebuffer.state.nr_cbufs;
|
key->ps.nr_cbufs = rctx->framebuffer.state.nr_cbufs;
|
||||||
key->ps.apply_sample_id_mask = (rctx->ps_iter_samples > 1) || !rctx->rasterizer->multisample_enable;
|
key->ps.apply_sample_id_mask = (rctx->ps_iter_samples > 1) || !rctx->rasterizer->multisample_enable;
|
||||||
/* Dual-source blending only makes sense with nr_cbufs == 1. */
|
/* Dual-source blending only makes sense with nr_cbufs == 1. */
|
||||||
if (key->ps.nr_cbufs == 1 && rctx->dual_src_blend)
|
if (key->ps.nr_cbufs == 1 && rctx->dual_src_blend) {
|
||||||
key->ps.nr_cbufs = 2;
|
key->ps.nr_cbufs = 2;
|
||||||
|
key->ps.dual_source_blend = 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PIPE_SHADER_TESS_EVAL:
|
case PIPE_SHADER_TESS_EVAL:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue