diff options
author | Patrice Mandin <pmandin@caramail.com> | 2008-08-27 20:33:06 +0200 |
---|---|---|
committer | Patrice Mandin <pmandin@caramail.com> | 2008-08-27 20:33:06 +0200 |
commit | 3b567807c4745936962675837095e456912d4ca1 (patch) | |
tree | ceed9c19a9b7b4fd616583cb8eab8cc068b830e1 | |
parent | 3d4cdc4311ea5170d2ad9d90674fcd9e31098de2 (diff) |
Fix image blit dimensions, still no blit
-rw-r--r-- | imageblit.c | 7 | ||||
-rw-r--r-- | main.c | 6 |
2 files changed, 4 insertions, 9 deletions
diff --git a/imageblit.c b/imageblit.c index 020d3ab..8eac789 100644 --- a/imageblit.c +++ b/imageblit.c @@ -15,15 +15,13 @@ void imageblit_init(void) OUT_RING(NvSyncNotify); BEGIN_RING(NvSubImageBlit, NV04_IMAGE_BLIT_SURFACE, 1); - OUT_RING(NvCtxSurf2D); + OUT_RING (NvCtxSurf2D); BEGIN_RING(NvSubImageBlit, NV04_IMAGE_BLIT_CLIP_RECTANGLE, 1); OUT_RING(NvClipRect); BEGIN_RING(NvSubImageBlit, NV04_IMAGE_BLIT_PATTERN, 1); OUT_RING(NvImagePattern); BEGIN_RING(NvSubImageBlit, NV04_IMAGE_BLIT_ROP, 1); OUT_RING(NvRasterOp); - /*BEGIN_RING(NvSubImageBlit, NV04_IMAGE_BLIT_OPERATION, 1); - OUT_RING(NV04_IMAGE_BLIT_OPERATION_SRCCOPY);*/ FIRE_RING(); } @@ -34,9 +32,6 @@ void imageblit_copy(int sx,int sy, int dx,int dy, int w,int h) SetSubchannel(NvSubImageBlit, NvImageBlit); - BEGIN_RING(NvSubImageBlit, NV04_IMAGE_BLIT_SURFACE, 1); - OUT_RING (NvCtxSurf2D); - BEGIN_RING(NvSubImageBlit, NV04_IMAGE_BLIT_OPERATION, 1); OUT_RING (NV04_IMAGE_BLIT_OPERATION_SRCCOPY); @@ -42,10 +42,10 @@ int main(int argc, char **argv) imageblit_init(); /* FIXME: this does not work */ - /*imageblit_copy(viewport_x,viewport_y, + imageblit_copy(viewport_x,viewport_y, viewport_x+(viewport_w>>2),viewport_h+(viewport_h>>2), - viewport_w>>1, viewport_h>>2 - );*/ + viewport_w>>2, viewport_h>>2 + ); /* mandatory, or we get PFIFO_CACHE_ERROR */ tcl_init(); |