mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 12:30:09 +01:00
radeonsi: bypass alpha-test for integer colorbuffers
Fixes spec/EXT_texture_integer/fbo-blending. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
f7d004b9ad
commit
f9ea435ebc
1 changed files with 10 additions and 1 deletions
|
|
@ -2352,7 +2352,16 @@ static INLINE void si_shader_selector_key(struct pipe_context *ctx,
|
|||
}
|
||||
if (rctx->queued.named.dsa) {
|
||||
key->ps.alpha_func = rctx->queued.named.dsa->alpha_func;
|
||||
key->ps.alpha_ref = rctx->queued.named.dsa->alpha_ref;
|
||||
|
||||
/* Alpha-test should be disabled if colorbuffer 0 is integer. */
|
||||
if (rctx->framebuffer.nr_cbufs &&
|
||||
rctx->framebuffer.cbufs[0] &&
|
||||
util_format_is_pure_integer(rctx->framebuffer.cbufs[0]->texture->format))
|
||||
key->ps.alpha_func = PIPE_FUNC_ALWAYS;
|
||||
|
||||
if (key->ps.alpha_func != PIPE_FUNC_ALWAYS &&
|
||||
key->ps.alpha_func != PIPE_FUNC_NEVER)
|
||||
key->ps.alpha_ref = rctx->queued.named.dsa->alpha_ref;
|
||||
} else {
|
||||
key->ps.alpha_func = PIPE_FUNC_ALWAYS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue