mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 03:50:13 +01:00
panfrost: do not allow skipping of fragment shader when alpha-to-coverage
When alpha to coverage is enabled we cannot allow the fragment shader to
be skipped, because the calculated alpha result is essentially a side
effect (it can cause some samples to be discarded).
This brings the OpenGL driver in line with panvk, which already has this
check in its version of fs_required().
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Cc: mesa-stable
(cherry picked from commit 3ce6bcb9e8)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
This commit is contained in:
parent
dcd2327de2
commit
a88c776da0
2 changed files with 6 additions and 1 deletions
|
|
@ -14,7 +14,7 @@
|
|||
"description": "panfrost: do not allow skipping of fragment shader when alpha-to-coverage",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -225,6 +225,11 @@ panfrost_fs_required(struct panfrost_compiled_shader *fs,
|
|||
if (fs->info.fs.sidefx)
|
||||
return true;
|
||||
|
||||
/* If alpha to coverage is enabled we need to execute, as
|
||||
* writing the pixel can modify occlusion query results. */
|
||||
if (blend->base.alpha_to_coverage)
|
||||
return true;
|
||||
|
||||
/* Using an empty FS requires early-z to be enabled, but alpha test
|
||||
* needs it disabled. Alpha test is only native on Midgard, so only
|
||||
* check there.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue