mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 07:10:15 +01:00
util: Handle more formats in get_plane_(width|height)
Required by RADV to use PIPE_FORMAT_G8_B8R8_420_UNORM and PIPE_FORMAT_G8_B8_R8_420_UNORM. Reviewed-by: Valentine Burley <valentine.burley@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30459>
This commit is contained in:
parent
fd1f798292
commit
3316bc3e88
1 changed files with 4 additions and 0 deletions
|
|
@ -1320,6 +1320,8 @@ util_format_get_plane_width(enum pipe_format format, unsigned plane,
|
|||
case PIPE_FORMAT_P012:
|
||||
case PIPE_FORMAT_P016:
|
||||
case PIPE_FORMAT_P030:
|
||||
case PIPE_FORMAT_G8_B8R8_420_UNORM:
|
||||
case PIPE_FORMAT_G8_B8_R8_420_UNORM:
|
||||
case PIPE_FORMAT_Y8_U8_V8_422_UNORM:
|
||||
case PIPE_FORMAT_Y8_U8V8_422_UNORM:
|
||||
case PIPE_FORMAT_Y16_U16_V16_420_UNORM:
|
||||
|
|
@ -1344,6 +1346,8 @@ util_format_get_plane_height(enum pipe_format format, unsigned plane,
|
|||
case PIPE_FORMAT_P012:
|
||||
case PIPE_FORMAT_P016:
|
||||
case PIPE_FORMAT_P030:
|
||||
case PIPE_FORMAT_G8_B8R8_420_UNORM:
|
||||
case PIPE_FORMAT_G8_B8_R8_420_UNORM:
|
||||
case PIPE_FORMAT_Y16_U16_V16_420_UNORM:
|
||||
case PIPE_FORMAT_Y8_U8_V8_440_UNORM:
|
||||
return !plane ? height : (height + 1) / 2;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue