rsx: Fix texture height read

This commit is contained in:
eladash 2018-10-01 13:50:43 +03:00 committed by kd-11
parent 62f97f2e5f
commit 348db050ae
2 changed files with 2 additions and 3 deletions

View File

@ -1771,7 +1771,6 @@ namespace rsx
switch (extended_dimension)
{
case rsx::texture_dimension_extended::texture_dimension_1d:
tex_height = 1;
depth = 1;
break;
case rsx::texture_dimension_extended::texture_dimension_2d:

View File

@ -258,7 +258,7 @@ namespace rsx
u16 fragment_texture::height() const
{
return ((registers[NV4097_SET_TEXTURE_IMAGE_RECT + (m_index * 8)]) & 0xffff);
return dimension() != rsx::texture_dimension::dimension1d ? ((registers[NV4097_SET_TEXTURE_IMAGE_RECT + (m_index * 8)]) & 0xffff) : 1;
}
u32 fragment_texture::border_color() const
@ -396,7 +396,7 @@ namespace rsx
u16 vertex_texture::height() const
{
return ((registers[NV4097_SET_VERTEX_TEXTURE_IMAGE_RECT + (m_index * 8)]) & 0xffff);
return dimension() != rsx::texture_dimension::dimension1d ? ((registers[NV4097_SET_VERTEX_TEXTURE_IMAGE_RECT + (m_index * 8)]) & 0xffff) : 1;
}
u32 vertex_texture::border_color() const