mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 13:20:14 +01:00
amdgpu/addrlib: Always returns pixelPitch in original pixels
This commit is contained in:
parent
eb3036ed46
commit
4dd4700612
1 changed files with 10 additions and 14 deletions
|
|
@ -381,14 +381,11 @@ ADDR_E_RETURNCODE Lib::ComputeSurfaceInfo(
|
|||
if (localIn.format != ADDR_FMT_INVALID)
|
||||
{
|
||||
//
|
||||
// 96 bits surface of level 1+ requires element pitch of 32 bits instead
|
||||
// In hwl function we skip multiplication of 3 then we should skip division of 3
|
||||
// We keep pitch that represents 32 bit element instead of 96 bits since we
|
||||
// will get an odd number if divided by 3.
|
||||
// Note: For 96 bit surface, the pixelPitch returned might be an odd number, but it
|
||||
// is okay to program texture pitch as HW's mip calculator would multiply 3 first,
|
||||
// then do the appropriate paddings (linear alignment requirement and possible the
|
||||
// nearest power-of-two for mipmaps), which results in the original pitch.
|
||||
//
|
||||
if (!((expandX == 3) && (localIn.mipLevel > 0)))
|
||||
{
|
||||
|
||||
GetElemLib()->RestoreSurfaceInfo(elemMode,
|
||||
expandX,
|
||||
expandY,
|
||||
|
|
@ -396,7 +393,6 @@ ADDR_E_RETURNCODE Lib::ComputeSurfaceInfo(
|
|||
&pOut->pixelPitch,
|
||||
&pOut->pixelHeight);
|
||||
}
|
||||
}
|
||||
|
||||
if (localIn.flags.qbStereo)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue