From 403bca5f05b1710ba9cc7bd891d1365ac56a301f Mon Sep 17 00:00:00 2001 From: zilmar Date: Fri, 18 Aug 2017 18:02:38 +1000 Subject: [PATCH] [Video] Remove voodoo.sup_32bit_tex --- Source/Project64-video/Main.cpp | 3 +-- Source/Project64-video/TexLoad32b.h | 19 ------------------- Source/Project64-video/rdp.h | 1 - 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/Source/Project64-video/Main.cpp b/Source/Project64-video/Main.cpp index bb845024a7..fe765a76e6 100644 --- a/Source/Project64-video/Main.cpp +++ b/Source/Project64-video/Main.cpp @@ -460,7 +460,6 @@ int InitGfx() voodoo.tex_min_addr[0] = voodoo.tex_min_addr[1] = gfxTexMinAddress(GFX_TMU0); voodoo.tex_max_addr[0] = voodoo.tex_max_addr[1] = gfxTexMaxAddress(GFX_TMU0); - voodoo.sup_32bit_tex = TRUE; voodoo.gamma_correction = 0; voodoo.gamma_table_size = 256; @@ -552,7 +551,7 @@ int InitGfx() g_ghq_use = (int)ext_ghq_init(2048, // max texture width supported by hardware 2048, // max texture height supported by hardware - voodoo.sup_32bit_tex ? 32 : 16, // max texture bpp supported by hardware + 32, // max texture bpp supported by hardware options, g_settings->ghq_cache_size() * 1024 * 1024, // cache texture to system memory g_settings->texture_dir(), diff --git a/Source/Project64-video/TexLoad32b.h b/Source/Project64-video/TexLoad32b.h index 7fcbdda0d9..3d9108dcef 100644 --- a/Source/Project64-video/TexLoad32b.h +++ b/Source/Project64-video/TexLoad32b.h @@ -43,25 +43,6 @@ uint32_t Load32bRGBA(uintptr_t dst, uintptr_t src, int wid_64, int height, int l } tex += ext; } - int id = tile - rdp.cur_tile; - uint32_t mod = (id == 0) ? cmb.mod_0 : cmb.mod_1; - if (mod || !voodoo.sup_32bit_tex) - { - //convert to ARGB_4444 - const uint32_t tex_size = real_width * height; - tex = (uint32_t *)dst; - uint16_t *tex16 = (uint16_t*)dst; - uint16_t a, r, g, b; - for (uint32_t i = 0; i < tex_size; i++) { - c = tex[i]; - a = (c >> 28) & 0xF; - r = (c >> 20) & 0xF; - g = (c >> 12) & 0xF; - b = (c >> 4) & 0xF; - tex16[i] = (a << 12) | (r << 8) | (g << 4) | b; - } - return (1 << 16) | GFX_TEXFMT_ARGB_4444; - } return (2 << 16) | GFX_TEXFMT_ARGB_8888; } diff --git a/Source/Project64-video/rdp.h b/Source/Project64-video/rdp.h index 56d8768cee..9681f9d9b7 100644 --- a/Source/Project64-video/rdp.h +++ b/Source/Project64-video/rdp.h @@ -120,7 +120,6 @@ typedef struct { typedef struct { - int sup_32bit_tex; int has_2mb_tex_boundary; int gamma_correction; int32_t gamma_table_size;