From 1df242d9bb7a456a33e9b81393986cdab5a60465 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 26 Jun 2024 23:07:59 +0200 Subject: [PATCH] MGA: Fix texture filtering completely on G100. --- src/video/vid_mga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/vid_mga.c b/src/video/vid_mga.c index 79d669bdc..f6f38b4de 100644 --- a/src/video/vid_mga.c +++ b/src/video/vid_mga.c @@ -5111,8 +5111,8 @@ texture_read(mystique_t *mystique, int *tex_r, int *tex_g, int *tex_b, int *atra s = (int32_t) mystique->dwgreg.tmr[6] >> s_shift; t = (int32_t) mystique->dwgreg.tmr[7] >> t_shift; - s_frac = (((int32_t) mystique->dwgreg.tmr[6] >> s_shift) & ((1 << s_shift) - 1)) / (double)(1 << s_shift); - t_frac = (((int32_t) mystique->dwgreg.tmr[7] >> t_shift) & ((1 << t_shift) - 1)) / (double)(1 << t_shift); + s_frac = (((int32_t) mystique->dwgreg.tmr[6]) & ((1 << s_shift) - 1)) / (double)(1 << s_shift); + t_frac = (((int32_t) mystique->dwgreg.tmr[7]) & ((1 << t_shift) - 1)) / (double)(1 << t_shift); } else { const int s_shift = (20 + 16) - (mystique->dwgreg.texwidth & TEXWIDTH_TW_MASK); const int t_shift = (20 + 16) - (mystique->dwgreg.texheight & TEXHEIGHT_TH_MASK);