On Wed, Nov 12, 2008 at 05:18:22PM +0100, [EMAIL PROTECTED] wrote:
> Hi!
> 
> Since no one replied to the alignment question 
> <http://mail.directfb.org/pipermail/directfb-users/2008-July/000827.html> 
> I'll ask another alignment question. I'm running DFB 1.1.1 with ARG1555 on 
> Fujitsu Jade Platform. For blitting I need 16 byte alignment and the textures 
> are required to be 64 byte aligned.
> 
> The correct alignments for blitting I can set using CardLimitations data 
> structure. But how do I tell DFB that the textures are required to be 64 byte 
> aligned? I didn't find any example doing this nor I found any documentation.

There's no really simple way to do that at the moment. The simplest
thing to do is set the alignment limit to 64 bytes.

It would be nice to have some mechanism to select the alignment based on
the intended use of the surface. However that would require a new API so
that the application could provide some hints to the allocator. The
other option would be to reallocate when the alignment isn't sufficient
but that could lead to some performance issues so the initial hint might
be a good idea anyway.

How this could be implemented with DirectFB >= 1.3 is by creating a
custom surface pool that could allocate using different alignments.
But a better solution would be to add something to the gfxdriver API
that would allow asking the gfxdriver for the alignment. That could
be used by the surface manager so that many of the already existing
pool implementations would benefit from it.

The gfxdriver would also need to check the alignment in CheckState() in
case the hint was incorrect. How exactly the reallocation would happen
after that I'm not sure yet.

Something like this would be quite nice for the mach64 driver since it
requires the texture pitch to be a power of two and currently it just
aligns all allocations (well, actually only when the pitch and height
are below 1024 pixels) to power of two values.

-- 
Ville Syrjälä
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to