mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
rsx: Minor hot-fix
- Pitch 0 makes sense if width == 1 and height == 1
This commit is contained in:
parent
95245bdd83
commit
89c9c54743
1 changed files with 11 additions and 1 deletions
|
@ -590,7 +590,17 @@ static size_t get_texture_size(u32 format, u16 width, u16 height, u16 depth, u32
|
||||||
const bool packed = !(format & CELL_GCM_TEXTURE_LN);
|
const bool packed = !(format & CELL_GCM_TEXTURE_LN);
|
||||||
const auto texel_rows_per_line = get_format_texel_rows_per_line(gcm_format);
|
const auto texel_rows_per_line = get_format_texel_rows_per_line(gcm_format);
|
||||||
|
|
||||||
verify(HERE), packed || pitch;
|
if (!pitch && !packed)
|
||||||
|
{
|
||||||
|
if (width > 1 || height > 1)
|
||||||
|
{
|
||||||
|
// If width == 1, the scanning just returns texel 0, so it is a valid setup
|
||||||
|
LOG_ERROR(RSX, "Invalid texture pitch setup, width=%d, height=%d, format=0x%x(0x%x)",
|
||||||
|
width, height, format, gcm_format);
|
||||||
|
}
|
||||||
|
|
||||||
|
pitch = get_format_packed_pitch(gcm_format, width);
|
||||||
|
}
|
||||||
|
|
||||||
u32 size = 0;
|
u32 size = 0;
|
||||||
if (!packed)
|
if (!packed)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue