Commit ad81218e40e27d79e1021c248cf16ca269d963df
1 parent
e4afee97
depth=24 write mask fix (Volker Ruppert)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1404 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
15 additions
and
1 deletions
hw/cirrus_vga.c
hw/cirrus_vga_rop2.h
... | ... | @@ -47,7 +47,11 @@ glue(glue(glue(cirrus_patternfill_, ROP_NAME), _),DEPTH) |
47 | 47 | int x, y, pattern_y, pattern_pitch, pattern_x; |
48 | 48 | unsigned int col; |
49 | 49 | const uint8_t *src1; |
50 | +#if DEPTH == 24 | |
51 | + int skipleft = s->gr[0x2f] & 0x1f; | |
52 | +#else | |
50 | 53 | int skipleft = (s->gr[0x2f] & 0x07) * (DEPTH / 8); |
54 | +#endif | |
51 | 55 | |
52 | 56 | #if DEPTH == 8 |
53 | 57 | pattern_pitch = 8; |
... | ... | @@ -100,8 +104,13 @@ glue(glue(glue(cirrus_colorexpand_transp_, ROP_NAME), _),DEPTH) |
100 | 104 | unsigned int col; |
101 | 105 | unsigned bitmask; |
102 | 106 | unsigned index; |
107 | +#if DEPTH == 24 | |
108 | + int dstskipleft = s->gr[0x2f] & 0x1f; | |
109 | + int srcskipleft = dstskipleft / 3; | |
110 | +#else | |
103 | 111 | int srcskipleft = s->gr[0x2f] & 0x07; |
104 | 112 | int dstskipleft = srcskipleft * (DEPTH / 8); |
113 | +#endif | |
105 | 114 | |
106 | 115 | if (s->cirrus_blt_modeext & CIRRUS_BLTMODEEXT_COLOREXPINV) { |
107 | 116 | bits_xor = 0xff; |
... | ... | @@ -178,8 +187,13 @@ glue(glue(glue(cirrus_colorexpand_pattern_transp_, ROP_NAME), _),DEPTH) |
178 | 187 | int x, y, bitpos, pattern_y; |
179 | 188 | unsigned int bits, bits_xor; |
180 | 189 | unsigned int col; |
190 | +#if DEPTH == 24 | |
191 | + int dstskipleft = s->gr[0x2f] & 0x1f; | |
192 | + int srcskipleft = dstskipleft / 3; | |
193 | +#else | |
181 | 194 | int srcskipleft = s->gr[0x2f] & 0x07; |
182 | 195 | int dstskipleft = srcskipleft * (DEPTH / 8); |
196 | +#endif | |
183 | 197 | |
184 | 198 | if (s->cirrus_blt_modeext & CIRRUS_BLTMODEEXT_COLOREXPINV) { |
185 | 199 | bits_xor = 0xff; | ... | ... |