[Mesa-dev] [PATCH 2/3] intel: Add multisample scaled blitting in blorp engine

Anuj Phogat anuj.phogat at gmail.com
Thu May 9 08:49:58 PDT 2013


On Tue, May 7, 2013 at 10:40 AM, Paul Berry <stereotype441 at gmail.com> wrote:
> On 1 May 2013 14:10, Anuj Phogat <anuj.phogat at gmail.com> wrote:
>>
>> In traditional multisampled framebuffer rendering, color samples must be
>> explicitly
>> resolved via BlitFramebuffer before doing the scaled blitting of the
>> framebuffer.
>> So, scaled blitting of a multisample framebuffer takes two separate calls
>> to
>> BlitFramebuffer.
>>
>> This patch implements the functionality of doing multisampled scaled
>> resolve using
>> just one BlitFramebuffer call. Important changes involved in this patch
>> are listed
>> below:
>> 1. Add fractional scale/offset capability.
>> 2. Modify blorp setup code to handle scaled blits properly.
>>    - Do register allocation for UD and float registers.
>>    - Use float registers to do scale / offset texture coordinates.
>>    - Change offset computation to consider float coordinates.
>>    - Round the scaled & offset coordinates down to integer.
>>    - Make relevant changes to ensure correct blitting of stencil / depth
>> buffers.
>> 3. Linear filter is not yet implemented in blorp. So, don't use blorp
>> engine to do
>>    single sampled scaled blitting.
>> 4. if INTEL_DEBUG=blorp is set, recompile the blorp shader to dump the
>> native code
>>    for blorp blit. This will not effect performance but assist in
>> debugging.
>>
>> Note: Observed no piglit regressions on sandybridge & ivybridge with these
>> changes.
>
>
> It seems like you're going to a lot of extra effort in this patch to allow
> blorp to sometimes use UD registers and sometimes use UW registers.  I think
> it was a mistake on my part that I ever used UW registers in the first
> place.  It's hard to imagine the performance increase being worth the extra
> complication.
>
> I would prefer to see this split into two patches: one to switch blorp to
> use UD registers instead of UW registers, and one to add the scaled blit
> functionality.  That would let us drop almost all of the variable renaming
> and the additional function arguments, and it would make it easier to do a
> focused review of what's different with scaled blits.
>
Yeah. I ended up doing lot of changes in this patch which are not directly
related to scaled blitting. I'll split it in to two as suggested.


More information about the mesa-dev mailing list