From ad09883c85043e206a115c461390db081778ca54 Mon Sep 17 00:00:00 2001 From: Ted Green Date: Mon, 11 Sep 2017 20:32:58 -0600 Subject: voodoo: Revert to using lower 16 bits of zaColor only. Fixes depth buffering from last commit for Voodoo 2 cards and greater. (nw) --- src/devices/video/voodoo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/devices/video/voodoo.cpp b/src/devices/video/voodoo.cpp index 3d717221d0d..0d6a7b761a2 100644 --- a/src/devices/video/voodoo.cpp +++ b/src/devices/video/voodoo.cpp @@ -5906,16 +5906,16 @@ void voodoo_device::raster_fastfill(void *destbase, int32_t y, const poly_extent /* fill this dest buffer row */ if (FBZMODE_AUX_BUFFER_MASK(vd->reg[fbzMode].u) && vd->fbi.auxoffs != ~0) { - uint32_t depth = vd->reg[zaColor].u; - uint64_t expanded = ((uint64_t)depth << 32) | (uint64_t)depth; + uint16_t depth = vd->reg[zaColor].u; + uint64_t expanded = ((uint64_t)depth << 48) | ((uint64_t)depth << 32) | ((uint64_t)depth << 16) | (uint64_t)depth; uint16_t *dest = (uint16_t *)(vd->fbi.ram + vd->fbi.auxoffs) + scry * vd->fbi.rowpixels; for (x = startx; x < stopx && (x & 3) != 0; x++) - dest[x] = (uint16_t) depth; + dest[x] = depth; for ( ; x < (stopx & ~3); x += 4) *(uint64_t *)&dest[x] = expanded; for ( ; x < stopx; x++) - dest[x] = (uint16_t) depth; + dest[x] = depth; } } -- cgit v1.2.3