mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 12:30:09 +01:00
zink: use a better array loop sizing for gfx descriptor program init
this will be more consistent if the array is ever resized Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37358>
This commit is contained in:
parent
a7c320e652
commit
393958a02e
1 changed files with 2 additions and 1 deletions
|
|
@ -522,7 +522,8 @@ zink_descriptor_program_init(struct zink_context *ctx, struct zink_program *pg)
|
|||
}
|
||||
}
|
||||
|
||||
unsigned num_shaders = pg->is_compute ? 1 : ZINK_GFX_SHADER_COUNT;
|
||||
struct zink_gfx_program *prog;
|
||||
unsigned num_shaders = pg->is_compute ? 1 : ARRAY_SIZE(prog->shaders);
|
||||
bool have_push = screen->info.have_KHR_push_descriptor;
|
||||
/* iterate over the shaders and generate binding/layout/template structs */
|
||||
for (int i = 0; i < num_shaders; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue