completed preliminary (untested) scaled_filtered_blit function, although it wont' work yet: the engine cmd define and fifo assignment has yet to be setup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15538 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3c8313fd87
commit
0cb2429ad1
@ -1844,6 +1844,12 @@ void SCREEN_TO_SCREEN_SCALED_FILTERED_BLIT_DMA(engine_token *et, scaled_blit_par
|
||||
{
|
||||
/* now setup blit (writing 12 32bit words) */
|
||||
nv_acc_cmd_dma(NV_SCALED_IMAGE_FROM_MEMORY, NV_SCALED_IMAGE_FROM_MEMORY_SOURCEORG, 6);
|
||||
//fixme?
|
||||
//it is yet unclear why SourceHeightWidth is specified twice.
|
||||
//The second one corresponds to the use in the bes, the first one
|
||||
//seems to specify clipping ('one rect' bes 'colorkeying') info.
|
||||
//If this is true then the current setup is correct.
|
||||
//(the 'client' using this acceleration cmd should do clipping for us!)
|
||||
((uint32*)(si->dma_buffer))[si->engine.dma.current++] =
|
||||
(((list[i].src_top) << 16) | (list[i].src_left)); /* SourceOrg */
|
||||
((uint32*)(si->dma_buffer))[si->engine.dma.current++] =
|
||||
@ -1852,23 +1858,28 @@ void SCREEN_TO_SCREEN_SCALED_FILTERED_BLIT_DMA(engine_token *et, scaled_blit_par
|
||||
(((list[i].dest_top) << 16) | (list[i].dest_left)); /* DestOrg */
|
||||
((uint32*)(si->dma_buffer))[si->engine.dma.current++] =
|
||||
((((list[i].dest_height) + 1) << 16) | ((list[i].dest_width) + 1)); /* DestHeightWidth */
|
||||
//fixme: setup:
|
||||
//fixme: findout scaling limits... (although the current cmd interface doesn't support them.)
|
||||
//fixme: checkout dest bitmap borders for 'faults': correct scaling if needed...
|
||||
((uint32*)(si->dma_buffer))[si->engine.dma.current++] =
|
||||
0; /* DeltaDuDx (in 12.20 format) */
|
||||
((list[i].src_width << 20) / list[i].dest_width); /* HorInvScale (in 12.20 format) */
|
||||
((uint32*)(si->dma_buffer))[si->engine.dma.current++] =
|
||||
0; /* Delta_Dv_Dy (in 12.20 format) */
|
||||
((list[i].src_height << 20) / list[i].dest_height); /* VerInvScale (in 12.20 format) */
|
||||
|
||||
nv_acc_cmd_dma(NV_SCALED_IMAGE_FROM_MEMORY, NV_SCALED_IMAGE_FROM_MEMORY_SIZE, 4);
|
||||
//fixme: checkout:
|
||||
nv_acc_cmd_dma(NV_SCALED_IMAGE_FROM_MEMORY, NV_SCALED_IMAGE_FROM_MEMORY_SOURCESIZE, 4);
|
||||
((uint32*)(si->dma_buffer))[si->engine.dma.current++] =
|
||||
((((list[i].src_height) + 1) << 16) | ((list[i].src_width) + 1)); /* SizeHeightWidth */
|
||||
((((list[i].src_height) + 1) << 16) | ((list[i].src_width) + 1)); /* SourceHeightWidth */
|
||||
/* setup source pitch (b0-15). Set 'format origin center' (b16-17) and
|
||||
* select 'format interpolator foh (bilinear filtering)' (b24). */
|
||||
((uint32*)(si->dma_buffer))[si->engine.dma.current++] =
|
||||
si->fbc.bytes_per_row; /* Pitch */
|
||||
(si->fbc.bytes_per_row | (1 << 16) | (1 << 24)); /* SourcePitch */
|
||||
/* setup source surface location */
|
||||
((uint32*)(si->dma_buffer))[si->engine.dma.current++] =
|
||||
((uint8*)si->fbc.frame_buffer - (uint8*)si->framebuffer); /* Offset */
|
||||
//fixme: setup:
|
||||
/* Setup source start: first (sub)pixel contributing to output picture */
|
||||
/* Note:
|
||||
* clipping is not asked for. Look at bes engine code for useage example. */
|
||||
((uint32*)(si->dma_buffer))[si->engine.dma.current++] =
|
||||
0; /* PointUV (U in 12.4 format, V in 4.12 format) */
|
||||
0; /* SourceRef (b0-15 = hor, b16-31 = ver: both in 12.4 format) */
|
||||
|
||||
i++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user