[Mesa-dev] [PATCH 4/5] i965: Share the draw x/y offset masking code between main/blorp and all gens.

Eric Anholt eric at anholt.net
Mon Oct 15 09:42:58 PDT 2012


Kenneth Graunke <kenneth at whitecape.org> writes:

> On 10/12/2012 03:30 PM, Eric Anholt wrote:
>> This code is twisty, and the comment before most of the blocks was actually
>> giving me the opposite impression from its intention: We want to apply as much
>> of our offset as possible through coarse tile-aligned adjustment, since we can
>> do so independently per buffer, and apply the minimum we can through
>> fine-grained drawing offset x/y, since it has to agree between all buffers.
>> ---
>>   src/mesa/drivers/dri/i965/brw_blorp.h       |    4 -
>>   src/mesa/drivers/dri/i965/brw_context.h     |    8 ++
>>   src/mesa/drivers/dri/i965/brw_misc_state.c  |  111 +++++++++++++++++----------
>>   src/mesa/drivers/dri/i965/gen6_blorp.cpp    |   28 +------
>>   src/mesa/drivers/dri/i965/gen7_blorp.cpp    |    5 +-
>>   src/mesa/drivers/dri/i965/gen7_misc_state.c |   41 ++--------
>>   6 files changed, 89 insertions(+), 108 deletions(-)
>
> Thank you for doing this.  I had a similar patch to refactor this, but I 
> had done a lot more refactoring and ended up breaking everything 
> something awful.
>
> Nice to have these tests fixed.
>
> For the series:
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

Yeah, I tried a different refactor as well after the last patch, pushing
more of this logic into shared cross-gen code, but it ended up bloating
things up more.

It's a horrible mess, but I'm not sure we can make it much better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121015/4a6006c1/attachment-0001.pgp>


More information about the mesa-dev mailing list