summaryrefslogtreecommitdiffstats
path: root/hw/display/cirrus_vga_rop.h
diff options
context:
space:
mode:
authorGerd Hoffmann2017-03-15 14:28:07 +0100
committerGerd Hoffmann2017-03-16 08:58:16 +0100
commitffaf857778286ca54e3804432a2369a279e73aa7 (patch)
tree0fa8ca3f6cc9c49147625e7d97209c40b9fa1b4a /hw/display/cirrus_vga_rop.h
parentcirrus: stop passing around dst pointers in the blitter (diff)
downloadqemu-ffaf857778286ca54e3804432a2369a279e73aa7.tar.gz
qemu-ffaf857778286ca54e3804432a2369a279e73aa7.tar.xz
qemu-ffaf857778286ca54e3804432a2369a279e73aa7.zip
cirrus: stop passing around src pointers in the blitter
Does basically the same as "cirrus: stop passing around dst pointers in the blitter", just for the src pointer instead of the dst pointer. For the src we have to care about cputovideo blits though and fetch the data from s->cirrus_bltbuf instead of vga memory. The cirrus_src*() helper functions handle that. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1489584487-3489-1-git-send-email-kraxel@redhat.com
Diffstat (limited to 'hw/display/cirrus_vga_rop.h')
-rw-r--r--hw/display/cirrus_vga_rop.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/hw/display/cirrus_vga_rop.h b/hw/display/cirrus_vga_rop.h
index 1aa778d3e8..c61a677353 100644
--- a/hw/display/cirrus_vga_rop.h
+++ b/hw/display/cirrus_vga_rop.h
@@ -78,7 +78,7 @@ static inline void glue(rop_32_, ROP_NAME)(CirrusVGAState *s,
static void
glue(cirrus_bitblt_rop_fwd_, ROP_NAME)(CirrusVGAState *s,
uint32_t dstaddr,
- const uint8_t *src,
+ uint32_t srcaddr,
int dstpitch, int srcpitch,
int bltwidth, int bltheight)
{
@@ -92,19 +92,19 @@ glue(cirrus_bitblt_rop_fwd_, ROP_NAME)(CirrusVGAState *s,
for (y = 0; y < bltheight; y++) {
for (x = 0; x < bltwidth; x++) {
- ROP_OP(s, dstaddr, *src);
+ ROP_OP(s, dstaddr, cirrus_src(s, srcaddr));
dstaddr++;
- src++;
+ srcaddr++;
}
dstaddr += dstpitch;
- src += srcpitch;
+ srcaddr += srcpitch;
}
}
static void
glue(cirrus_bitblt_rop_bkwd_, ROP_NAME)(CirrusVGAState *s,
uint32_t dstaddr,
- const uint8_t *src,
+ uint32_t srcaddr,
int dstpitch, int srcpitch,
int bltwidth, int bltheight)
{
@@ -113,19 +113,19 @@ glue(cirrus_bitblt_rop_bkwd_, ROP_NAME)(CirrusVGAState *s,
srcpitch += bltwidth;
for (y = 0; y < bltheight; y++) {
for (x = 0; x < bltwidth; x++) {
- ROP_OP(s, dstaddr, *src);
+ ROP_OP(s, dstaddr, cirrus_src(s, srcaddr));
dstaddr--;
- src--;
+ srcaddr--;
}
dstaddr += dstpitch;
- src += srcpitch;
+ srcaddr += srcpitch;
}
}
static void
glue(glue(cirrus_bitblt_rop_fwd_transp_, ROP_NAME),_8)(CirrusVGAState *s,
uint32_t dstaddr,
- const uint8_t *src,
+ uint32_t srcaddr,
int dstpitch,
int srcpitch,
int bltwidth,
@@ -142,19 +142,19 @@ glue(glue(cirrus_bitblt_rop_fwd_transp_, ROP_NAME),_8)(CirrusVGAState *s,
for (y = 0; y < bltheight; y++) {
for (x = 0; x < bltwidth; x++) {
- ROP_OP_TR(s, dstaddr, *src, transp);
+ ROP_OP_TR(s, dstaddr, cirrus_src(s, srcaddr), transp);
dstaddr++;
- src++;
+ srcaddr++;
}
dstaddr += dstpitch;
- src += srcpitch;
+ srcaddr += srcpitch;
}
}
static void
glue(glue(cirrus_bitblt_rop_bkwd_transp_, ROP_NAME),_8)(CirrusVGAState *s,
uint32_t dstaddr,
- const uint8_t *src,
+ uint32_t srcaddr,
int dstpitch,
int srcpitch,
int bltwidth,
@@ -166,19 +166,19 @@ glue(glue(cirrus_bitblt_rop_bkwd_transp_, ROP_NAME),_8)(CirrusVGAState *s,
srcpitch += bltwidth;
for (y = 0; y < bltheight; y++) {
for (x = 0; x < bltwidth; x++) {
- ROP_OP_TR(s, dstaddr, *src, transp);
+ ROP_OP_TR(s, dstaddr, cirrus_src(s, srcaddr), transp);
dstaddr--;
- src--;
+ srcaddr--;
}
dstaddr += dstpitch;
- src += srcpitch;
+ srcaddr += srcpitch;
}
}
static void
glue(glue(cirrus_bitblt_rop_fwd_transp_, ROP_NAME),_16)(CirrusVGAState *s,
uint32_t dstaddr,
- const uint8_t *src,
+ uint32_t srcaddr,
int dstpitch,
int srcpitch,
int bltwidth,
@@ -195,19 +195,19 @@ glue(glue(cirrus_bitblt_rop_fwd_transp_, ROP_NAME),_16)(CirrusVGAState *s,
for (y = 0; y < bltheight; y++) {
for (x = 0; x < bltwidth; x+=2) {
- ROP_OP_TR_16(s, dstaddr, *(uint16_t *)src, transp);
+ ROP_OP_TR_16(s, dstaddr, cirrus_src16(s, srcaddr), transp);
dstaddr += 2;
- src += 2;
+ srcaddr += 2;
}
dstaddr += dstpitch;
- src += srcpitch;
+ srcaddr += srcpitch;
}
}
static void
glue(glue(cirrus_bitblt_rop_bkwd_transp_, ROP_NAME),_16)(CirrusVGAState *s,
uint32_t dstaddr,
- const uint8_t *src,
+ uint32_t srcaddr,
int dstpitch,
int srcpitch,
int bltwidth,
@@ -219,12 +219,12 @@ glue(glue(cirrus_bitblt_rop_bkwd_transp_, ROP_NAME),_16)(CirrusVGAState *s,
srcpitch += bltwidth;
for (y = 0; y < bltheight; y++) {
for (x = 0; x < bltwidth; x+=2) {
- ROP_OP_TR_16(s, dstaddr, *(uint16_t *)src, transp);
+ ROP_OP_TR_16(s, dstaddr, cirrus_src16(s, srcaddr), transp);
dstaddr -= 2;
- src -= 2;
+ srcaddr -= 2;
}
dstaddr += dstpitch;
- src += srcpitch;
+ srcaddr += srcpitch;
}
}