mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-23 06:40:49 +00:00
GL: Small simplification.
This commit is contained in:
parent
0978a1348e
commit
b58320d7dc
@ -83,9 +83,11 @@ public:
|
||||
void Init(RSXTexture& tex)
|
||||
{
|
||||
Bind();
|
||||
if(!Memory.IsGoodAddr(GetAddress(tex.GetOffset(), tex.GetLocation())))
|
||||
|
||||
const u64 texaddr = GetAddress(tex.GetOffset(), tex.GetLocation());
|
||||
if (!Memory.IsGoodAddr(texaddr))
|
||||
{
|
||||
ConLog.Error("Bad texture address=0x%x", GetAddress(tex.GetOffset(), tex.GetLocation()));
|
||||
ConLog.Error("Bad texture address=0x%x", texaddr);
|
||||
return;
|
||||
}
|
||||
//ConLog.Warning("texture addr = 0x%x, width = %d, height = %d, max_aniso=%d, mipmap=%d, remap=0x%x, zfunc=0x%x, wraps=0x%x, wrapt=0x%x, wrapr=0x%x, minlod=0x%x, maxlod=0x%x",
|
||||
@ -96,7 +98,7 @@ public:
|
||||
int format = tex.GetFormat() & ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN);
|
||||
bool is_swizzled = !(tex.GetFormat() & CELL_GCM_TEXTURE_LN);
|
||||
|
||||
u8* pixels = (u8*)Memory.GetMemFromAddr(GetAddress(tex.GetOffset(), tex.GetLocation()));
|
||||
const u8 *pixels = const_cast<const u8 *>(Memory.GetMemFromAddr(texaddr));
|
||||
u8 *unswizzledPixels;
|
||||
static const GLint glRemapStandard[4] = {GL_ALPHA, GL_RED, GL_GREEN, GL_BLUE};
|
||||
// NOTE: This must be in ARGB order in all forms below.
|
||||
|
Loading…
x
Reference in New Issue
Block a user