Skip to content

Commit

Permalink
[Video] Remove voodoo.sup_32bit_tex
Browse files Browse the repository at this point in the history
  • Loading branch information
project64 committed Aug 18, 2017
1 parent ebc1a43 commit 403bca5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
3 changes: 1 addition & 2 deletions Source/Project64-video/Main.cpp
Expand Up @@ -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;

Expand Down Expand Up @@ -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(),
Expand Down
19 changes: 0 additions & 19 deletions Source/Project64-video/TexLoad32b.h
Expand Up @@ -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;
}

Expand Down
1 change: 0 additions & 1 deletion Source/Project64-video/rdp.h
Expand Up @@ -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;
Expand Down

0 comments on commit 403bca5

Please sign in to comment.