asahi: add static assert

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
This commit is contained in:
Alyssa Rosenzweig 2023-11-25 12:04:03 -04:00
parent 2be37d1c96
commit a8857028bb

View file

@ -2581,6 +2581,8 @@ agx_upload_samplers(struct agx_batch *batch, struct agx_compiled_shader *cs,
*out = sampler->desc;
if (custom_borders) {
STATIC_ASSERT(sizeof(sampler->border) == AGX_BORDER_LENGTH);
memcpy(out_sampler + AGX_SAMPLER_LENGTH, &sampler->border,
AGX_BORDER_LENGTH);
} else {