mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
pan: make S8_UINT code behave like the rest
There's no reason why the S8_UINT check should be written in a different way than the other checks here; let's make this consistent. Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Eric R. Smith <eric.smith@collabora.com> Tested-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38848>
This commit is contained in:
parent
6e92720ece
commit
b925c4be4a
1 changed files with 6 additions and 3 deletions
|
|
@ -567,6 +567,11 @@ pan_afbc_format(unsigned arch, enum pipe_format format, unsigned plane_idx)
|
|||
return PAN_AFBC_MODE_INVALID;
|
||||
else
|
||||
break;
|
||||
case PIPE_FORMAT_S8_UINT:
|
||||
if (arch < 9)
|
||||
return PAN_AFBC_MODE_INVALID;
|
||||
else
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -592,9 +597,7 @@ pan_afbc_format(unsigned arch, enum pipe_format format, unsigned plane_idx)
|
|||
case PIPE_FORMAT_X24S8_UINT: return PAN_AFBC_MODE_R8G8B8A8;
|
||||
case PIPE_FORMAT_Z24_UNORM_PACKED: return PAN_AFBC_MODE_R8G8B8;
|
||||
|
||||
/* AFBC(S8) only supported on v9+ */
|
||||
case PIPE_FORMAT_S8_UINT:
|
||||
return arch >= 9 ? PAN_AFBC_MODE_R8 : PAN_AFBC_MODE_INVALID;
|
||||
case PIPE_FORMAT_S8_UINT: return PAN_AFBC_MODE_R8;
|
||||
|
||||
case PIPE_FORMAT_R16_UNORM: return PAN_AFBC_MODE_R16;
|
||||
case PIPE_FORMAT_R16G16_UNORM: return PAN_AFBC_MODE_R16G16;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue