mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 17:50:32 +01:00
panfrost: use util_format_stencil_only()
Calling util_format_get_depth_only() just to throw the result away right away isn't great. Let's switch to util_format_stencil_only() instead, and trust that it does the right thing. This should only change results for the PIPE_FORMAT_S8_UINT_Z24_UNORM case, where we'd get PIPE_FORMAT_S8X24_UINT instead. That seens more correct, but it's kinda irrelevant, because we don't expose support for that format in the first place.
This commit is contained in:
parent
b1f0ec824e
commit
d50eb2a1e8
1 changed files with 2 additions and 26 deletions
|
|
@ -708,19 +708,7 @@ pan_preload_get_views(const struct pan_fb_info *fb, bool zs,
|
|||
|
||||
if (fb->zs.preload.s) {
|
||||
const struct pan_image_view *view = fb->zs.view.s ?: fb->zs.view.zs;
|
||||
enum pipe_format fmt = util_format_get_depth_only(view->format);
|
||||
|
||||
switch (view->format) {
|
||||
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
|
||||
fmt = PIPE_FORMAT_X24S8_UINT;
|
||||
break;
|
||||
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
|
||||
fmt = PIPE_FORMAT_X32_S8X24_UINT;
|
||||
break;
|
||||
default:
|
||||
fmt = view->format;
|
||||
break;
|
||||
}
|
||||
enum pipe_format fmt = util_format_stencil_only(view->format);
|
||||
|
||||
if (fmt != view->format) {
|
||||
*patched_s = *view;
|
||||
|
|
@ -864,19 +852,7 @@ pan_preload_emit_textures(struct pan_pool *pool, const struct pan_fb_info *fb,
|
|||
|
||||
if (fb->zs.preload.s) {
|
||||
const struct pan_image_view *view = fb->zs.view.s ?: fb->zs.view.zs;
|
||||
enum pipe_format fmt = util_format_get_depth_only(view->format);
|
||||
|
||||
switch (view->format) {
|
||||
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
|
||||
fmt = PIPE_FORMAT_X24S8_UINT;
|
||||
break;
|
||||
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
|
||||
fmt = PIPE_FORMAT_X32_S8X24_UINT;
|
||||
break;
|
||||
default:
|
||||
fmt = view->format;
|
||||
break;
|
||||
}
|
||||
enum pipe_format fmt = util_format_stencil_only(view->format);
|
||||
|
||||
#if PAN_ARCH >= 7
|
||||
struct pan_image_view *pview = &patched_views[patched_count++];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue