1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

Merge pull request #1496 from kd-11/rsx_textureinfo_fix

Correctly fetch correct pitch and depth for textures from RSX
This commit is contained in:
Raul Tambre 2016-02-15 11:03:48 +02:00
commit 787619cdba

View File

@ -202,12 +202,12 @@ namespace rsx
u16 texture::depth() const
{
return method_registers[NV4097_SET_TEXTURE_CONTROL3] >> 20;
return method_registers[NV4097_SET_TEXTURE_CONTROL3 + m_index] >> 20;
}
u32 texture::pitch() const
{
return method_registers[NV4097_SET_TEXTURE_CONTROL3] & 0xfffff;
return method_registers[NV4097_SET_TEXTURE_CONTROL3 + m_index] & 0xfffff;
}
void vertex_texture::init(u8 index)
@ -386,11 +386,11 @@ namespace rsx
u16 vertex_texture::depth() const
{
return method_registers[NV4097_SET_VERTEX_TEXTURE_CONTROL3] >> 20;
return method_registers[NV4097_SET_VERTEX_TEXTURE_CONTROL3 + (m_index * 8)] >> 20;
}
u32 vertex_texture::pitch() const
{
return method_registers[NV4097_SET_VERTEX_TEXTURE_CONTROL3] & 0xfffff;
return method_registers[NV4097_SET_VERTEX_TEXTURE_CONTROL3 + (m_index * 8)] & 0xfffff;
}
}