summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/voodoo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/voodoo.cpp')
-rw-r--r--src/devices/video/voodoo.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/devices/video/voodoo.cpp b/src/devices/video/voodoo.cpp
index f0b029ebda0..0881a1aa9a9 100644
--- a/src/devices/video/voodoo.cpp
+++ b/src/devices/video/voodoo.cpp
@@ -1432,7 +1432,7 @@ inline int32_t voodoo_device::tmu_state::prepare()
#else
double tmpTex = texdx;
lodbase = new_log2(tmpTex);
- return (lodbase + (12 << 8)) / 2;
+ return (lodbase + (12 << 8) - (56 << 8)) / 2;
#endif
}
@@ -3319,8 +3319,8 @@ int32_t voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, uint32_t data, ui
//PIXEL_PIPELINE_BEGIN(v, stats, x, y, vd->reg[fbzColorPath].u, vd->reg[fbzMode].u, iterz, iterw);
// Start PIXEL_PIPE_BEGIN copy
//#define PIXEL_PIPELINE_BEGIN(VV, STATS, XX, YY, FBZCOLORPATH, FBZMODE, ITERZ, ITERW)
- int32_t fogdepth, biasdepth;
- int32_t r, g, b, a;
+ int32_t biasdepth;
+ int32_t r, g, b;
(stats)->pixels_in++;
@@ -3355,25 +3355,29 @@ int32_t voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, uint32_t data, ui
// End PIXEL_PIPELINE_BEGIN COPY
// Depth testing value for lfb pipeline writes is directly from write data, no biasing is used
- fogdepth = biasdepth = (uint32_t) sz[pix];
+ biasdepth = (uint32_t) sz[pix];
/* Perform depth testing */
- if (!depthTest((uint16_t) vd->reg[zaColor].u, stats, depth[x], vd->reg[fbzMode].u, biasdepth))
- goto nextpixel;
+ if (FBZMODE_ENABLE_DEPTHBUF(vd->reg[fbzMode].u))
+ if (!depthTest((uint16_t) vd->reg[zaColor].u, stats, depth[x], vd->reg[fbzMode].u, biasdepth))
+ goto nextpixel;
/* use the RGBA we stashed above */
color.set(sa[pix], sr[pix], sg[pix], sb[pix]);
/* handle chroma key */
- if (!chromaKeyTest(vd, stats, vd->reg[fbzMode].u, color))
- goto nextpixel;
+ if (FBZMODE_ENABLE_CHROMAKEY(vd->reg[fbzMode].u))
+ if (!chromaKeyTest(vd, stats, vd->reg[fbzMode].u, color))
+ goto nextpixel;
/* handle alpha mask */
- if (!alphaMaskTest(stats, vd->reg[fbzMode].u, color.get_a()))
- goto nextpixel;
+ if (FBZMODE_ENABLE_ALPHA_MASK(vd->reg[fbzMode].u))
+ if (!alphaMaskTest(stats, vd->reg[fbzMode].u, color.get_a()))
+ goto nextpixel;
/* handle alpha test */
- if (!alphaTest(vd, stats, vd->reg[alphaMode].u, color.get_a()))
- goto nextpixel;
+ if (ALPHAMODE_ALPHATEST(vd->reg[alphaMode].u))
+ if (!alphaTest(vd, stats, vd->reg[alphaMode].u, color.get_a()))
+ goto nextpixel;
/* wait for any outstanding work to finish */
@@ -3382,7 +3386,7 @@ int32_t voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, uint32_t data, ui
/* pixel pipeline part 2 handles color blending, fog, alpha, and final output */
PIXEL_PIPELINE_END(vd, stats, dither, dither4, dither_lookup, x, dest, depth,
vd->reg[fbzMode].u, vd->reg[fbzColorPath].u, vd->reg[alphaMode].u, vd->reg[fogMode].u,
- iterz, iterw, iterargb) { };
+ iterz, iterw, iterargb, biasdepth) { };
nextpixel:
/* advance our pointers */
x++;