diff --git a/src/asahi/compiler/agx_compiler.h b/src/asahi/compiler/agx_compiler.h index abe39b6d761..466b17c7f12 100644 --- a/src/asahi/compiler/agx_compiler.h +++ b/src/asahi/compiler/agx_compiler.h @@ -61,6 +61,18 @@ enum agx_size { AGX_SIZE_64 = 2 }; +static inline unsigned +agx_size_align_16(enum agx_size size) +{ + switch (size) { + case AGX_SIZE_16: return 1; + case AGX_SIZE_32: return 2; + case AGX_SIZE_64: return 4; + } + + unreachable("Invalid size"); +} + typedef struct { /* Sufficient for as many SSA values as we need. Immediates and uniforms fit in 16-bits */ unsigned value : 22;