On 03/12/2014 05:30 AM, Pohjolainen, Topi wrote: > On Tue, Mar 11, 2014 at 11:48:54PM -0700, Kenneth Graunke wrote: [snip] >> + stage_prog_data->nr_params = num_push_constants; >> + >> + /* Up until now, the param[] array has been indexed by reg + reg_offset >> + * of UNIFORM registers. Condense it to only contain the uniforms we >> + * chose to upload as push constants. >> + */ >> + for (unsigned int i = 0; i < uniforms; i++) { >> + int remapped = push_constant_loc[i]; >> + >> + if (remapped == -1) >> + continue; >> + > > I suppose it is obvious, but I had to read again the assigning loop above to > be > certain, and hence there is no danger of writing before reading in > "stage_prog_data->param[]": > > assert(remapped <= i);
Right...I agree, the assert is definitely nice to have. (The old code I moved didn't have one.) I've added it for v2. --Ken
signature.asc
Description: OpenPGP digital signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev