void
fs_visitor::move_uniform_array_access_to_pull_constants()
{
- int pull_constant_loc[uniforms];
+ pull_constant_loc = ralloc_array(mem_ctx, int, uniforms);
for (unsigned int i = 0; i < uniforms; i++) {
pull_constant_loc[i] = -1;
}
}
invalidate_live_intervals();
+
+ ralloc_free(pull_constant_loc);
+ pull_constant_loc = NULL;
}
/**
*/
unsigned int pull_uniform_base = max_uniform_components;
- int pull_constant_loc[uniforms];
+ pull_constant_loc = ralloc_array(mem_ctx, int, uniforms);
for (unsigned int i = 0; i < uniforms; i++) {
if (i < pull_uniform_base) {
pull_constant_loc[i] = -1;
/** Number of uniform variable components visited. */
unsigned uniforms;
+ /**
+ * Array mapping UNIFORM register numbers to the pull parameter index,
+ * or -1 if this uniform register isn't being uploaded as a pull constant.
+ */
+ int *pull_constant_loc;
+
/* This is the map from UNIFORM hw_reg + reg_offset as generated by
* the visitor to the packed uniform number after
* remove_dead_constants() that represents the actual uploaded