mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-05 15:40:10 +00:00
more rsx texture (control1)
and fixed crash of rsx debugger
This commit is contained in:
parent
bc38af04a5
commit
48115b153e
@ -158,10 +158,10 @@ public:
|
|||||||
|
|
||||||
if(format != 0x81 && format != 0x94)
|
if(format != 0x81 && format != 0x94)
|
||||||
{
|
{
|
||||||
u8 remap_a = tex.m_remap & 0x3;
|
u8 remap_a = tex.GetRemap() & 0x3;
|
||||||
u8 remap_r = (tex.m_remap >> 2) & 0x3;
|
u8 remap_r = (tex.GetRemap() >> 2) & 0x3;
|
||||||
u8 remap_g = (tex.m_remap >> 4) & 0x3;
|
u8 remap_g = (tex.GetRemap() >> 4) & 0x3;
|
||||||
u8 remap_b = (tex.m_remap >> 6) & 0x3;
|
u8 remap_b = (tex.GetRemap() >> 6) & 0x3;
|
||||||
|
|
||||||
static const int gl_remap[] =
|
static const int gl_remap[] =
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
RSXTexture::RSXTexture()
|
RSXTexture::RSXTexture()
|
||||||
: m_bias(0)
|
: m_bias(0)
|
||||||
, m_remap(0xE4)
|
|
||||||
, m_min_filter(1)
|
, m_min_filter(1)
|
||||||
, m_mag_filter(2)
|
, m_mag_filter(2)
|
||||||
{
|
{
|
||||||
@ -12,7 +11,6 @@ RSXTexture::RSXTexture()
|
|||||||
|
|
||||||
RSXTexture::RSXTexture(u8 index)
|
RSXTexture::RSXTexture(u8 index)
|
||||||
: m_bias(0)
|
: m_bias(0)
|
||||||
, m_remap(0xE4)
|
|
||||||
, m_min_filter(1)
|
, m_min_filter(1)
|
||||||
, m_mag_filter(2)
|
, m_mag_filter(2)
|
||||||
{
|
{
|
||||||
@ -140,6 +138,11 @@ bool RSXTexture::IsAlphaKillEnabled() const
|
|||||||
return ((methodRegisters[NV4097_SET_TEXTURE_CONTROL0 + (m_index*4)] >> 2) & 0x1);
|
return ((methodRegisters[NV4097_SET_TEXTURE_CONTROL0 + (m_index*4)] >> 2) & 0x1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 RSXTexture::GetRemap() const
|
||||||
|
{
|
||||||
|
return (methodRegisters[NV4097_SET_TEXTURE_CONTROL1 + (m_index*4)]);
|
||||||
|
}
|
||||||
|
|
||||||
u16 RSXTexture::GetWidth() const
|
u16 RSXTexture::GetWidth() const
|
||||||
{
|
{
|
||||||
return ((methodRegisters[NV4097_SET_TEXTURE_IMAGE_RECT + (m_index*4)] >> 16) & 0xffff);
|
return ((methodRegisters[NV4097_SET_TEXTURE_IMAGE_RECT + (m_index*4)] >> 16) & 0xffff);
|
||||||
@ -150,15 +153,6 @@ u16 RSXTexture::GetHeight() const
|
|||||||
return ((methodRegisters[NV4097_SET_TEXTURE_IMAGE_RECT + (m_index*4)]) & 0xffff);
|
return ((methodRegisters[NV4097_SET_TEXTURE_IMAGE_RECT + (m_index*4)]) & 0xffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RSXTexture::SetControl0(const bool enable, const u16 minlod, const u16 maxlod, const u8 maxaniso)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void RSXTexture::SetControl1(u32 remap)
|
|
||||||
{
|
|
||||||
m_remap = remap;
|
|
||||||
}
|
|
||||||
|
|
||||||
void RSXTexture::SetControl3(u16 depth, u32 pitch)
|
void RSXTexture::SetControl3(u16 depth, u32 pitch)
|
||||||
{
|
{
|
||||||
m_depth = depth;
|
m_depth = depth;
|
||||||
|
@ -205,13 +205,6 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, mem32_ptr_t& args, const u3
|
|||||||
|
|
||||||
case_16(NV4097_SET_TEXTURE_CONTROL0, 0x20):
|
case_16(NV4097_SET_TEXTURE_CONTROL0, 0x20):
|
||||||
{
|
{
|
||||||
RSXTexture& tex = m_textures[index];
|
|
||||||
u32 a0 = ARGS(0);
|
|
||||||
bool enable = a0 >> 31 ? true : false;
|
|
||||||
u16 minlod = (a0 >> 19) & 0xfff;
|
|
||||||
u16 maxlod = (a0 >> 7) & 0xfff;
|
|
||||||
u8 maxaniso = (a0 >> 2) & 0x7;
|
|
||||||
tex.SetControl0(enable, minlod, maxlod, maxaniso);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -280,8 +273,6 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, mem32_ptr_t& args, const u3
|
|||||||
|
|
||||||
case_16(NV4097_SET_TEXTURE_CONTROL1, 0x20):
|
case_16(NV4097_SET_TEXTURE_CONTROL1, 0x20):
|
||||||
{
|
{
|
||||||
RSXTexture& tex = m_textures[index];
|
|
||||||
tex.SetControl1(ARGS(0));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -31,8 +31,6 @@ public:
|
|||||||
u8 m_g_signed;
|
u8 m_g_signed;
|
||||||
u8 m_b_signed;
|
u8 m_b_signed;
|
||||||
|
|
||||||
u32 m_remap;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RSXTexture();
|
RSXTexture();
|
||||||
RSXTexture(u8 index);
|
RSXTexture(u8 index);
|
||||||
@ -66,12 +64,13 @@ public:
|
|||||||
u8 GetMaxAniso() const;
|
u8 GetMaxAniso() const;
|
||||||
bool IsAlphaKillEnabled() const;
|
bool IsAlphaKillEnabled() const;
|
||||||
|
|
||||||
|
// Control1
|
||||||
|
u32 GetRemap() const;
|
||||||
|
|
||||||
// Image Rect
|
// Image Rect
|
||||||
u16 GetWidth() const;
|
u16 GetWidth() const;
|
||||||
u16 GetHeight() const;
|
u16 GetHeight() const;
|
||||||
|
|
||||||
void SetControl0(const bool enable, const u16 minlod, const u16 maxlod, const u8 maxaniso);
|
|
||||||
void SetControl1(u32 remap);
|
|
||||||
void SetControl3(u16 depth, u32 pitch);
|
void SetControl3(u16 depth, u32 pitch);
|
||||||
void SetFilter(u16 bias, u8 min, u8 mag, u8 conv, u8 a_signed, u8 r_signed, u8 g_signed, u8 b_signed);
|
void SetFilter(u16 bias, u8 min, u8 mag, u8 conv, u8 a_signed, u8 r_signed, u8 g_signed, u8 b_signed);
|
||||||
};
|
};
|
||||||
|
@ -483,6 +483,8 @@ void RSXDebugger::GetTexture()
|
|||||||
m_list_texture->DeleteAllItems();
|
m_list_texture->DeleteAllItems();
|
||||||
|
|
||||||
for(uint i=0; i<RSXThread::m_textures_count; ++i)
|
for(uint i=0; i<RSXThread::m_textures_count; ++i)
|
||||||
|
{
|
||||||
|
if(render.m_textures[i].IsEnabled())
|
||||||
{
|
{
|
||||||
m_list_texture->InsertItem(i, wxString::Format("%d", i));
|
m_list_texture->InsertItem(i, wxString::Format("%d", i));
|
||||||
m_list_texture->SetItem(i, 1, wxString::Format("0x%x", GetAddress(render.m_textures[i].GetOffset(), render.m_textures[i].GetLocation())));
|
m_list_texture->SetItem(i, 1, wxString::Format("0x%x", GetAddress(render.m_textures[i].GetOffset(), render.m_textures[i].GetLocation())));
|
||||||
@ -499,6 +501,7 @@ void RSXDebugger::GetTexture()
|
|||||||
m_list_texture->SetItemBackgroundColour(i, wxColour(m_cur_texture == i ? "Wheat" : "White"));
|
m_list_texture->SetItemBackgroundColour(i, wxColour(m_cur_texture == i ? "Wheat" : "White"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void RSXDebugger::GetSettings()
|
void RSXDebugger::GetSettings()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user