Andre I think it is a nice improvement to also have a batch stretch blit and to 
reduce the number of needed calls to EmitCommands.

Ideally, for compatibility with existing older drivers I think the StretchBlit 
behavior should be the same as before.  Thus, if the rects were 1:1 and if a 
driver obtains better performance from an actual 1:1 blit being performed by 
the driver rather than a scaled blit that behavior could still occur.

The new BatchStretchBlit function would then only call the driver's scaled blit 
function (regardless of if the rects were 1:1 or not).  If a driver obtained 
better performance via standard blit over scaled blit when the rects were 1:1, 
it could perform that check internally and internally switch to the standard 
blit driver functionality.

I know it will complicate the implementation, but I think the implementation of 
the dfb_gfxcard_batchstretchblit function should allow fully disjointed GPU/CPU 
scaled blit operations being performed by the driver (and also perform the 
minimum number of calls necessary to dfb_gfxcard_state_check/acquire/release 
and gAcquire/gRelease). This will allow the driver to start handling using the 
GPU, fail if necessary and perform an operation using the CPU rasterizer, after 
which GPU rendering would continue again if there were more rects.  It appears 
that your implementation will allow the fallback to CPU, but then does not 
return to GPU operations.

Another thing to consider is to add a DFXL_BATCHSTRETCHBLIT flag for the driver 
to report support for it.  If not supported, the DFB core software should 
emulate by just calling standard stretch blit iteratively.

BTW: I would recommend that the new BatchStretchBlit function be added at the 
end of the interface function table to prevent non-recompiled programs have 
having issues (otherwise the minor version should be increased).

Regards,
Timothy

--

Timothy Strelchun
CE Software Engineering
Digital Home Group
Intel Corporation

>-----Original Message-----
>From: directfb-dev-boun...@directfb.org 
>[mailto:directfb-dev-boun...@directfb.org] On Behalf Of André Draszik
>Sent: Monday, December 13, 2010 8:43 AM
>To: directfb-dev@directfb.org
>Subject: [directfb-dev] batch stretch blit
>
>Hi,
>
>attached is an updated version of the batched stretchblit.
>
>All the code duplication of batched vs. non batched versions 
>has been removed...
>
>Not sure how to best deal with the calling of dfb_gfxcard_blit( srect,
>drect->x, drect->y, state ); if the rectangle sizes match.
>Should dfb_state_check()/_acquire() maybe do DFXL_BLIT | 
>DFXL_STRETCHBLIT in the first place, instead of releasing and 
>releasing and reacquiring the STRETCHBLIT state?
>
>
>Cheers,
>Andre'
>
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to