Even more sonarlint work
This commit is contained in:
@@ -152,16 +152,19 @@ void
|
||||
voodoo_v2_blit_start(voodoo_t *voodoo)
|
||||
{
|
||||
uint64_t dat64;
|
||||
int size_x = ABS(voodoo->bltSizeX), size_y = ABS(voodoo->bltSizeY);
|
||||
int size_x = ABS(voodoo->bltSizeX);
|
||||
int size_y = ABS(voodoo->bltSizeY);
|
||||
int x_dir = (voodoo->bltSizeX > 0) ? 1 : -1;
|
||||
int y_dir = (voodoo->bltSizeY > 0) ? 1 : -1;
|
||||
int dst_x;
|
||||
int src_y = voodoo->bltSrcY & 0x7ff, dst_y = voodoo->bltDstY & 0x7ff;
|
||||
int src_y = voodoo->bltSrcY & 0x7ff;
|
||||
int dst_y = voodoo->bltDstY & 0x7ff;
|
||||
int src_stride = (voodoo->bltCommand & BLTCMD_SRC_TILED) ? ((voodoo->bltSrcXYStride & 0x3f) * 32 * 2) : (voodoo->bltSrcXYStride & 0xff8);
|
||||
int dst_stride = (voodoo->bltCommand & BLTCMD_DST_TILED) ? ((voodoo->bltDstXYStride & 0x3f) * 32 * 2) : (voodoo->bltDstXYStride & 0xff8);
|
||||
uint32_t src_base_addr = (voodoo->bltCommand & BLTCMD_SRC_TILED) ? ((voodoo->bltSrcBaseAddr & 0x3ff) << 12) : (voodoo->bltSrcBaseAddr & 0x3ffff8);
|
||||
uint32_t dst_base_addr = (voodoo->bltCommand & BLTCMD_DST_TILED) ? ((voodoo->bltDstBaseAddr & 0x3ff) << 12) : (voodoo->bltDstBaseAddr & 0x3ffff8);
|
||||
int x, y;
|
||||
int x;
|
||||
int y;
|
||||
|
||||
/* voodooblt_log("blit_start: command=%08x srcX=%i srcY=%i dstX=%i dstY=%i sizeX=%i sizeY=%i color=%04x,%04x\n",
|
||||
voodoo->bltCommand, voodoo->bltSrcX, voodoo->bltSrcY, voodoo->bltDstX, voodoo->bltDstY, voodoo->bltSizeX, voodoo->bltSizeY, voodoo->bltColorFg, voodoo->bltColorBg);*/
|
||||
@@ -173,7 +176,8 @@ voodoo_v2_blit_start(voodoo_t *voodoo)
|
||||
for (y = 0; y <= size_y; y++) {
|
||||
uint16_t *src = (uint16_t *) &voodoo->fb_mem[src_base_addr + src_y * src_stride];
|
||||
uint16_t *dst = (uint16_t *) &voodoo->fb_mem[dst_base_addr + dst_y * dst_stride];
|
||||
int src_x = voodoo->bltSrcX, dst_x = voodoo->bltDstX;
|
||||
int src_x = voodoo->bltSrcX;
|
||||
int dst_x = voodoo->bltDstX;
|
||||
|
||||
for (x = 0; x <= size_x; x++) {
|
||||
uint16_t src_dat = src[src_x];
|
||||
@@ -316,8 +320,11 @@ voodoo_v2_blit_data(voodoo_t *voodoo, uint32_t data)
|
||||
}
|
||||
|
||||
while (src_bits && voodoo->blt.cur_x <= voodoo->blt.size_x) {
|
||||
int r = 0, g = 0, b = 0;
|
||||
uint16_t src_dat = 0, dst_dat;
|
||||
int r = 0;
|
||||
int g = 0;
|
||||
int b = 0;
|
||||
uint16_t src_dat = 0;
|
||||
uint16_t dst_dat;
|
||||
int x = (voodoo->blt.x_dir > 0) ? (voodoo->blt.dst_x + voodoo->blt.cur_x) : (voodoo->blt.dst_x - voodoo->blt.cur_x);
|
||||
int rop = 0;
|
||||
|
||||
@@ -438,7 +445,8 @@ void
|
||||
voodoo_fastfill(voodoo_t *voodoo, voodoo_params_t *params)
|
||||
{
|
||||
int y;
|
||||
int low_y, high_y;
|
||||
int low_y;
|
||||
int high_y;
|
||||
|
||||
if (params->fbzMode & (1 << 17)) {
|
||||
int y_origin = (voodoo->type >= VOODOO_BANSHEE) ? (voodoo->y_origin_swap + 1) : voodoo->v_disp;
|
||||
@@ -451,7 +459,9 @@ voodoo_fastfill(voodoo_t *voodoo, voodoo_params_t *params)
|
||||
}
|
||||
|
||||
if (params->fbzMode & FBZ_RGB_WMASK) {
|
||||
int r, g, b;
|
||||
int r;
|
||||
int g;
|
||||
int b;
|
||||
uint16_t col;
|
||||
|
||||
r = ((params->color1 >> 16) >> 3) & 0x1f;
|
||||
@@ -462,26 +472,23 @@ voodoo_fastfill(voodoo_t *voodoo, voodoo_params_t *params)
|
||||
if (SLI_ENABLED) {
|
||||
for (y = low_y; y < high_y; y += 2) {
|
||||
uint16_t *cbuf = (uint16_t *) &voodoo->fb_mem[(params->draw_offset + (y >> 1) * voodoo->row_width) & voodoo->fb_mask];
|
||||
int x;
|
||||
|
||||
for (x = params->clipLeft; x < params->clipRight; x++)
|
||||
for (int x = params->clipLeft; x < params->clipRight; x++)
|
||||
cbuf[x] = col;
|
||||
}
|
||||
} else {
|
||||
for (y = low_y; y < high_y; y++) {
|
||||
if (voodoo->col_tiled) {
|
||||
uint16_t *cbuf = (uint16_t *) &voodoo->fb_mem[(params->draw_offset + (y >> 5) * voodoo->row_width + (y & 31) * 128) & voodoo->fb_mask];
|
||||
int x;
|
||||
|
||||
for (x = params->clipLeft; x < params->clipRight; x++) {
|
||||
for (int x = params->clipLeft; x < params->clipRight; x++) {
|
||||
int x2 = (x & 63) | ((x >> 6) * 128 * 32 / 2);
|
||||
cbuf[x2] = col;
|
||||
}
|
||||
} else {
|
||||
uint16_t *cbuf = (uint16_t *) &voodoo->fb_mem[(params->draw_offset + y * voodoo->row_width) & voodoo->fb_mask];
|
||||
int x;
|
||||
|
||||
for (x = params->clipLeft; x < params->clipRight; x++)
|
||||
for (int x = params->clipLeft; x < params->clipRight; x++)
|
||||
cbuf[x] = col;
|
||||
}
|
||||
}
|
||||
@@ -491,26 +498,23 @@ voodoo_fastfill(voodoo_t *voodoo, voodoo_params_t *params)
|
||||
if (SLI_ENABLED) {
|
||||
for (y = low_y; y < high_y; y += 2) {
|
||||
uint16_t *abuf = (uint16_t *) &voodoo->fb_mem[(params->aux_offset + (y >> 1) * voodoo->row_width) & voodoo->fb_mask];
|
||||
int x;
|
||||
|
||||
for (x = params->clipLeft; x < params->clipRight; x++)
|
||||
for (int x = params->clipLeft; x < params->clipRight; x++)
|
||||
abuf[x] = params->zaColor & 0xffff;
|
||||
}
|
||||
} else {
|
||||
for (y = low_y; y < high_y; y++) {
|
||||
if (voodoo->aux_tiled) {
|
||||
uint16_t *abuf = (uint16_t *) &voodoo->fb_mem[(params->aux_offset + (y >> 5) * voodoo->aux_row_width + (y & 31) * 128) & voodoo->fb_mask];
|
||||
int x;
|
||||
|
||||
for (x = params->clipLeft; x < params->clipRight; x++) {
|
||||
for (int x = params->clipLeft; x < params->clipRight; x++) {
|
||||
int x2 = (x & 63) | ((x >> 6) * 128 * 32 / 2);
|
||||
abuf[x2] = params->zaColor & 0xffff;
|
||||
}
|
||||
} else {
|
||||
uint16_t *abuf = (uint16_t *) &voodoo->fb_mem[(params->aux_offset + y * voodoo->aux_row_width) & voodoo->fb_mask];
|
||||
int x;
|
||||
|
||||
for (x = params->clipLeft; x < params->clipRight; x++)
|
||||
for (int x = params->clipLeft; x < params->clipRight; x++)
|
||||
abuf[x] = params->zaColor & 0xffff;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user