mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 08:50:09 +01:00
hk: Fix build error with static_assert
../src/asahi/vulkan/hk_cmd_draw.c: In function ‘hk_draw’:
../src/asahi/vulkan/hk_cmd_draw.c:3471:32: error: expression in static assertion is not constant
3471 | static_assert(size > sizeof(VkDrawIndirectCommand),
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: 5bc89aa991 ("hk,libagx: handle adjacency without a GS")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12351
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32988>
This commit is contained in:
parent
2a053b2e60
commit
25f5f1b9b4
1 changed files with 2 additions and 1 deletions
|
|
@ -3468,7 +3468,8 @@ hk_draw(struct hk_cmd_buffer *cmd, uint16_t draw_id, struct agx_draw draw_)
|
|||
|
||||
if (agx_is_indirect(draw.b)) {
|
||||
const size_t size = sizeof(VkDrawIndexedIndirectCommand);
|
||||
static_assert(size > sizeof(VkDrawIndirectCommand),
|
||||
static_assert(sizeof(VkDrawIndexedIndirectCommand) >
|
||||
sizeof(VkDrawIndirectCommand),
|
||||
"allocation size is conservative");
|
||||
|
||||
uint64_t out_draw = hk_pool_alloc(cmd, size, 4).gpu;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue