mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 09:35:32 -07:00
Merge pull request #6688 from AITUS95/master
Fix Voodoo 1 dirty_line tracking in single buffer mode
This commit is contained in:
@@ -516,6 +516,7 @@ voodoo_writel(uint32_t addr, uint32_t val, void *priv)
|
||||
break;
|
||||
case SST_fbiInit0:
|
||||
if (voodoo->initEnable & 0x01) {
|
||||
int old_vga_pass = voodoo->fbiInit0 & FBIINIT0_VGA_PASS;
|
||||
voodoo->fbiInit0 = val;
|
||||
thread_wait_mutex(voodoo->force_blit_mutex);
|
||||
voodoo->can_blit = (voodoo->fbiInit0 & FBIINIT0_VGA_PASS) ? 1 : 0;
|
||||
@@ -523,6 +524,10 @@ voodoo_writel(uint32_t addr, uint32_t val, void *priv)
|
||||
voodoo->force_blit_count = 0;
|
||||
thread_release_mutex(voodoo->force_blit_mutex);
|
||||
|
||||
/* When VGA pass-through becomes active, mark all lines dirty to force full refresh */
|
||||
if (!old_vga_pass && (val & FBIINIT0_VGA_PASS))
|
||||
memset(voodoo->dirty_line, 1, sizeof(voodoo->dirty_line));
|
||||
|
||||
if (voodoo->set->nr_cards == 2)
|
||||
svga_set_override(voodoo->svga, (voodoo->set->voodoos[0]->fbiInit0 | voodoo->set->voodoos[1]->fbiInit0) & 1);
|
||||
else
|
||||
|
||||
@@ -506,6 +506,9 @@ voodoo_fastfill(voodoo_t *voodoo, voodoo_params_t *params)
|
||||
for (int x = params->clipLeft; x < params->clipRight; x++)
|
||||
cbuf[x] = col;
|
||||
}
|
||||
/* Mark line dirty for single buffer mode */
|
||||
if (params->draw_offset == params->front_offset && y < 2048)
|
||||
voodoo->dirty_line[y] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1389,10 +1389,9 @@ skip_pixel:
|
||||
voodoo->texel_count[odd_even] += state->texel_count;
|
||||
voodoo->fbiPixelsIn += state->pixel_count;
|
||||
|
||||
if (voodoo->params.draw_offset == voodoo->params.front_offset) {
|
||||
int dirty_idx = SLI_ENABLED ? (real_y >> 1) : real_y;
|
||||
if (dirty_idx < 2048)
|
||||
voodoo->dirty_line[dirty_idx] = 1;
|
||||
if (voodoo->params.draw_offset == voodoo->params.front_offset && !SLI_ENABLED) {
|
||||
if (real_y < 2048)
|
||||
voodoo->dirty_line[real_y] = 1;
|
||||
}
|
||||
|
||||
next_line:
|
||||
|
||||
Reference in New Issue
Block a user