[Mesa-dev] [PATCH] i965: enable ARB_instanced_arrays extension
Jordan Justen
jljusten at gmail.com
Fri Jun 8 23:16:47 CEST 2012
On Mon, Jun 4, 2012 at 1:31 PM, Eric Anholt <eric at anholt.net> wrote:
> On Sun, 27 May 2012 21:08:07 -0700, Jordan Justen <jordan.l.justen at intel.com> 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) {
Thanks,
-Jordan
More information about the mesa-dev
mailing list