mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-24 08:10:22 +01:00
asahi: Plumb through lower_clip_fs
Key to rast->clip_plane_enable and lower. This fixes translucency of one of the surfaces in the Neverball title screen. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>
This commit is contained in:
parent
e441896eb8
commit
8a1050082f
2 changed files with 7 additions and 0 deletions
|
|
@ -943,6 +943,11 @@ agx_update_shader(struct agx_context *ctx, struct agx_compiled_shader **out,
|
|||
NIR_PASS_V(nir, nir_lower_blend, &opts);
|
||||
|
||||
NIR_PASS_V(nir, nir_lower_fragcolor, key->nr_cbufs);
|
||||
|
||||
if (key->clip_plane_enable) {
|
||||
NIR_PASS_V(nir, nir_lower_clip_fs, key->clip_plane_enable,
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
||||
agx_compile_shader_nir(nir, &key->base, &binary, &compiled->info);
|
||||
|
|
@ -1017,6 +1022,7 @@ agx_update_fs(struct agx_context *ctx)
|
|||
{
|
||||
struct asahi_shader_key key = {
|
||||
.nr_cbufs = ctx->batch->nr_cbufs,
|
||||
.clip_plane_enable = ctx->rast->base.clip_plane_enable,
|
||||
};
|
||||
|
||||
for (unsigned i = 0; i < key.nr_cbufs; ++i) {
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ struct asahi_shader_key {
|
|||
struct agx_shader_key base;
|
||||
struct agx_blend blend;
|
||||
unsigned nr_cbufs;
|
||||
uint8_t clip_plane_enable;
|
||||
enum pipe_format rt_formats[PIPE_MAX_COLOR_BUFS];
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue