};
bool
-nil_format_supports_render(struct nouveau_ws_device *dev,
- enum pipe_format format)
+nil_format_supports_color_targets(struct nouveau_ws_device *dev,
+ enum pipe_format format)
{
assert(format < PIPE_FORMAT_COUNT);
const struct nil_format_info *fmt = &nil_format_infos[format];
return fmt->czt != 0;
}
-uint32_t
-nil_format_to_render(enum pipe_format format)
+uint8_t
+nil_format_to_color_target(enum pipe_format format)
+{
+ assert(format < PIPE_FORMAT_COUNT);
+ const struct nil_format_info *fmt = &nil_format_infos[format];
+ return fmt->czt;
+}
+
+uint8_t
+nil_format_to_depth_stencil(enum pipe_format format)
{
assert(format < PIPE_FORMAT_COUNT);
const struct nil_format_info *fmt = &nil_format_infos[format];
/* We don't have our own format enum; we use PIPE_FORMAT for everything */
-bool nil_format_supports_render(struct nouveau_ws_device *dev,
- enum pipe_format format);
+bool nil_format_supports_color_targets(struct nouveau_ws_device *dev,
+ enum pipe_format format);
-uint32_t nil_format_to_render(enum pipe_format format);
+uint8_t nil_format_to_color_target(enum pipe_format format);
+
+uint8_t nil_format_to_depth_stencil(enum pipe_format format);
struct nil_tic_format {
unsigned comp_sizes:8;
P_NV9097_SET_COLOR_TARGET_HEIGHT(p, i, iview->vk.extent.height);
const enum pipe_format p_format =
vk_format_to_pipe_format(iview->vk.format);
- P_NV9097_SET_COLOR_TARGET_FORMAT(p, i, nil_format_to_render(p_format));
+ const uint8_t ct_format = nil_format_to_color_target(p_format);
+ P_NV9097_SET_COLOR_TARGET_FORMAT(p, i, ct_format);
P_NV9097_SET_COLOR_TARGET_MEMORY(p, i, {
.block_width = BLOCK_WIDTH_ONE_GOB,
.block_height = level->tiling.y_log2,
P_NV9097_SET_ZT_B(p, addr);
const enum pipe_format p_format =
vk_format_to_pipe_format(iview->vk.format);
- P_NV9097_SET_ZT_FORMAT(p, nil_format_to_render(p_format));
+ const uint8_t zs_format = nil_format_to_depth_stencil(p_format);
+ P_NV9097_SET_ZT_FORMAT(p, zs_format);
assert(image->nil.dim != NIL_IMAGE_DIM_3D);
P_NV9097_SET_ZT_BLOCK_SIZE(p, {
.width = WIDTH_ONE_GOB,