brw_wm_prog_data *prog_data = (brw_wm_prog_data*) this->prog_data;
brw_wm_prog_key *key = (brw_wm_prog_key*) this->key;
- for (unsigned int i = 0; i < VARYING_SLOT_MAX; i++) {
- prog_data->urb_setup[i] = -1;
- }
+ memset(prog_data->urb_setup, -1,
+ sizeof(prog_data->urb_setup[0]) * VARYING_SLOT_MAX);
int urb_next = 0;
/* Figure out where each of the incoming setup attributes lands. */
return;
pull_constant_loc = ralloc_array(mem_ctx, int, uniforms);
-
- for (unsigned int i = 0; i < uniforms; i++) {
- pull_constant_loc[i] = -1;
- }
+ memset(pull_constant_loc, -1, sizeof(pull_constant_loc[0]) * uniforms);
/* Walk through and find array access of uniforms. Put a copy of that
* uniform in the pull constant buffer.
vec4_visitor::move_grf_array_access_to_scratch()
{
int scratch_loc[this->virtual_grf_count];
-
- for (int i = 0; i < this->virtual_grf_count; i++) {
- scratch_loc[i] = -1;
- }
+ memset(scratch_loc, -1, sizeof(scratch_loc));
/* First, calculate the set of virtual GRFs that need to be punted
* to scratch due to having any array access on them, and where in
vec4_visitor::move_uniform_array_access_to_pull_constants()
{
int pull_constant_loc[this->uniforms];
-
- for (int i = 0; i < this->uniforms; i++) {
- pull_constant_loc[i] = -1;
- }
+ memset(pull_constant_loc, -1, sizeof(pull_constant_loc));
/* Walk through and find array access of uniforms. Put a copy of that
* uniform in the pull constant buffer.