mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-10 01:18:18 +02:00
util/format: Add a util_format_get_depth_bits() helper
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39324>
This commit is contained in:
parent
53474cfef0
commit
397297e7de
1 changed files with 6 additions and 0 deletions
|
|
@ -1086,6 +1086,12 @@ util_format_get_component_shift(enum pipe_format format,
|
|||
}
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
util_format_get_depth_bits(enum pipe_format format)
|
||||
{
|
||||
return util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_ZS, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a linear RGB colorspace format, return the corresponding SRGB
|
||||
* format, or PIPE_FORMAT_NONE if none.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue