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:
Alyssa Rosenzweig 2023-10-06 15:23:51 -04:00 committed by Marge Bot
parent a74fbb3840
commit b69ab37bdc
2 changed files with 6 additions and 1 deletions

View file

@ -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;

View file

@ -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;