push_constant_loc = ralloc_array(mem_ctx, int, uniforms);
pull_constant_loc = ralloc_array(mem_ctx, int, uniforms);
+ /* Default to -1 meaning no location */
+ memset(push_constant_loc, -1, uniforms * sizeof(*push_constant_loc));
+ memset(pull_constant_loc, -1, uniforms * sizeof(*pull_constant_loc));
+
int chunk_start = -1;
/* First push 64-bit uniforms to ensure they are properly aligned */
if (!is_live[u] || !is_live_64bit[u])
continue;
- pull_constant_loc[u] = -1;
- push_constant_loc[u] = -1;
-
set_push_pull_constant_loc(u, &chunk_start, contiguous[u],
push_constant_loc, pull_constant_loc,
&num_push_constants, &num_pull_constants,
if (!is_live[u] || is_live_64bit[u])
continue;
- pull_constant_loc[u] = -1;
- push_constant_loc[u] = -1;
-
set_push_pull_constant_loc(u, &chunk_start, contiguous[u],
push_constant_loc, pull_constant_loc,
&num_push_constants, &num_pull_constants,