mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
asahi: Pack non-border colour sampler desc
Apparently custom border colours don't work properly with bindless. Needs investigation. Patch this out so we don't fault. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056>
This commit is contained in:
parent
a74fbb3840
commit
b69ab37bdc
2 changed files with 6 additions and 1 deletions
|
|
@ -505,12 +505,17 @@ agx_create_sampler_state(struct pipe_context *pctx,
|
|||
}
|
||||
}
|
||||
|
||||
memcpy(&so->desc_without_custom_border, &so->desc, sizeof(so->desc));
|
||||
|
||||
if (so->uses_custom_border) {
|
||||
union pipe_color_union border = state->border_color;
|
||||
enum pipe_format format =
|
||||
fixup_border_zs(state->border_color_format, &border);
|
||||
|
||||
agx_pack_border(&so->border, border.ui, format);
|
||||
|
||||
/* Neutralize the bindless-safe descriptor. XXX: This is a hack. */
|
||||
so->desc_without_custom_border.opaque[1] &= ~(1u << 23);
|
||||
}
|
||||
|
||||
return so;
|
||||
|
|
|
|||
|
|
@ -591,7 +591,7 @@ struct agx_sampler_state {
|
|||
struct pipe_sampler_state base;
|
||||
|
||||
/* Prepared descriptor */
|
||||
struct agx_sampler_packed desc;
|
||||
struct agx_sampler_packed desc, desc_without_custom_border;
|
||||
|
||||
/* Whether a custom border colour is required */
|
||||
bool uses_custom_border;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue