panfrost: Inline panfrost_get_z_internal_format
Trivial, get it out of the way so pan_format can focus on the tables. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
This commit is contained in:
committed by
Marge Bot
parent
616d7d0905
commit
fc49ff9a8c
@@ -28,6 +28,7 @@
|
||||
#define __PAN_ENCODER_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "util/format/u_format.h"
|
||||
#include "pan_bo.h"
|
||||
#include "midgard_pack.h"
|
||||
|
||||
@@ -214,4 +215,23 @@ panfrost_pack_work_groups_compute(
|
||||
}
|
||||
}
|
||||
|
||||
/* Format conversion */
|
||||
static inline enum mali_z_internal_format
|
||||
panfrost_get_z_internal_format(enum pipe_format fmt)
|
||||
{
|
||||
switch (fmt) {
|
||||
case PIPE_FORMAT_Z16_UNORM:
|
||||
case PIPE_FORMAT_Z16_UNORM_S8_UINT:
|
||||
return MALI_Z_INTERNAL_FORMAT_D16;
|
||||
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
|
||||
case PIPE_FORMAT_Z24X8_UNORM:
|
||||
return MALI_Z_INTERNAL_FORMAT_D24;
|
||||
case PIPE_FORMAT_Z32_FLOAT:
|
||||
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
|
||||
return MALI_Z_INTERNAL_FORMAT_D32;
|
||||
default:
|
||||
unreachable("Unsupported depth/stencil format.");
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -714,21 +714,3 @@ panfrost_format_to_bifrost_blend(const struct panfrost_device *dev,
|
||||
return dev->formats[format].hw;
|
||||
}
|
||||
}
|
||||
|
||||
enum mali_z_internal_format
|
||||
panfrost_get_z_internal_format(enum pipe_format fmt)
|
||||
{
|
||||
switch (fmt) {
|
||||
case PIPE_FORMAT_Z16_UNORM:
|
||||
case PIPE_FORMAT_Z16_UNORM_S8_UINT:
|
||||
return MALI_Z_INTERNAL_FORMAT_D16;
|
||||
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
|
||||
case PIPE_FORMAT_Z24X8_UNORM:
|
||||
return MALI_Z_INTERNAL_FORMAT_D24;
|
||||
case PIPE_FORMAT_Z32_FLOAT:
|
||||
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
|
||||
return MALI_Z_INTERNAL_FORMAT_D32;
|
||||
default:
|
||||
unreachable("Unsupported depth/stencil format.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "midgard_pack.h"
|
||||
#include "pan_bo.h"
|
||||
#include "pan_device.h"
|
||||
#include "pan_util.h"
|
||||
|
||||
#define PAN_MODIFIER_COUNT 4
|
||||
extern uint64_t pan_best_modifiers[PAN_MODIFIER_COUNT];
|
||||
@@ -186,9 +187,6 @@ extern const struct pan_blendable_format panfrost_blendable_formats[PIPE_FORMAT_
|
||||
extern const struct panfrost_format panfrost_pipe_format_v6[PIPE_FORMAT_COUNT];
|
||||
extern const struct panfrost_format panfrost_pipe_format_v7[PIPE_FORMAT_COUNT];
|
||||
|
||||
enum mali_z_internal_format
|
||||
panfrost_get_z_internal_format(enum pipe_format fmt);
|
||||
|
||||
unsigned
|
||||
panfrost_translate_swizzle_4(const unsigned char swizzle[4]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user