diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 4e87783f434..5b474a81f3f 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -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; diff --git a/src/gallium/drivers/asahi/agx_state.h b/src/gallium/drivers/asahi/agx_state.h index ce9e4827e5d..719ae09e021 100644 --- a/src/gallium/drivers/asahi/agx_state.h +++ b/src/gallium/drivers/asahi/agx_state.h @@ -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;