On Fri, 8 Jun 2012 14:16:47 -0700, Jordan Justen <[email protected]> wrote: > On Mon, Jun 4, 2012 at 1:31 PM, Eric Anholt <[email protected]> wrote: > > On Sun, 27 May 2012 21:08:07 -0700, Jordan Justen > > <[email protected]> wrote: > >> Set the step_rate value when drawing to implement > >> ARB_instanced_arrays for gen >= 4. > > > >> @@ -504,7 +513,7 @@ static void brw_prepare_vertices(struct brw_context > >> *brw) > >> > >> nr_uploads = 0; > >> } > >> - else if (total_size < 2048) { > >> + else if (can_merge_uploads) { > >> /* Upload non-interleaved arrays into a single interleaved array */ > >> struct brw_vertex_buffer *buffer; > >> int count = MAX2(max_index - min_index + 1, 1); > > > > The total_size < 2048 check probably should stay down here rather than > > get moved inside the loop up above. Other than that, > > I think the code should be still handling the (total_size >= 2048) > case by setting can_merge_uploads to false earlier in the function. > > But, would you rather have the total_size < 2048 down lower for code > readability? Is so, I can replace can_merge_uploads with > instance_divisor_used, and use: > else if ((total_size < 2048) && !instance_divisor_used) {
My only problem was moving the test up into the loop, when you only need to test it once -- this is the hottest path in the driver, and we've already got way too much code in it.
pgpa6HnrnnUPK.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
