mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 04:20:18 +01:00
asahi: Fix logic ops
Need to set colour mask correctly. Fixes spec@!opengl 1.0@gl-1.0-logicop@GL_AND, at least the non-MSAA portion. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19811>
This commit is contained in:
parent
a22ed99906
commit
9dddbfeaef
1 changed files with 4 additions and 3 deletions
|
|
@ -129,14 +129,15 @@ agx_create_blend_state(struct pipe_context *ctx,
|
||||||
if (state->logicop_enable) {
|
if (state->logicop_enable) {
|
||||||
so->logicop_enable = true;
|
so->logicop_enable = true;
|
||||||
so->logicop_func = state->logicop_func;
|
so->logicop_func = state->logicop_func;
|
||||||
return so;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned i = 0; i < PIPE_MAX_COLOR_BUFS; ++i) {
|
for (unsigned i = 0; i < PIPE_MAX_COLOR_BUFS; ++i) {
|
||||||
unsigned rti = state->independent_blend_enable ? i : 0;
|
unsigned rti = state->independent_blend_enable ? i : 0;
|
||||||
struct pipe_rt_blend_state rt = state->rt[rti];
|
struct pipe_rt_blend_state rt = state->rt[rti];
|
||||||
|
|
||||||
if (!rt.blend_enable) {
|
if (state->logicop_enable) {
|
||||||
|
/* No blending, but we get the colour mask below */
|
||||||
|
} else if (!rt.blend_enable) {
|
||||||
static const nir_lower_blend_channel replace = {
|
static const nir_lower_blend_channel replace = {
|
||||||
.func = BLEND_FUNC_ADD,
|
.func = BLEND_FUNC_ADD,
|
||||||
.src_factor = BLEND_FACTOR_ZERO,
|
.src_factor = BLEND_FACTOR_ZERO,
|
||||||
|
|
@ -160,7 +161,7 @@ agx_create_blend_state(struct pipe_context *ctx,
|
||||||
so->rt[i].alpha.dst_factor = util_blend_factor_to_shader(rt.alpha_dst_factor);
|
so->rt[i].alpha.dst_factor = util_blend_factor_to_shader(rt.alpha_dst_factor);
|
||||||
so->rt[i].alpha.invert_dst_factor = util_blend_factor_is_inverted(rt.alpha_dst_factor);
|
so->rt[i].alpha.invert_dst_factor = util_blend_factor_is_inverted(rt.alpha_dst_factor);
|
||||||
|
|
||||||
so->blend_enable = true;
|
so->blend_enable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
so->rt[i].colormask = rt.colormask;
|
so->rt[i].colormask = rt.colormask;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue