nil: Move to a single header file

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
This commit is contained in:
Faith Ekstrand 2024-04-05 17:13:56 -05:00 committed by Marge Bot
parent cdaa8e67e3
commit 299f32736a
12 changed files with 37 additions and 58 deletions

View File

@ -2,10 +2,9 @@
# SPDX-License-Identifier: MIT
libnil_files = files(
'nil.h',
'nil_format.c',
'nil_format.h',
'nil_image.c',
'nil_image.h',
'nil_image_tic.c',
)

View File

@ -2,8 +2,8 @@
* Copyright © 2022 Collabora Ltd.
* SPDX-License-Identifier: MIT
*/
#ifndef NIL_IMAGE_H
#define NIL_IMAGE_H
#ifndef NIL_H
#define NIL_H
#include <assert.h>
#include <stdbool.h>
@ -14,6 +14,33 @@
struct nv_device_info;
/* We don't have our own format enum; we use PIPE_FORMAT for everything */
bool nil_format_supports_texturing(struct nv_device_info *dev,
enum pipe_format format);
bool nil_format_supports_filtering(struct nv_device_info *dev,
enum pipe_format format);
bool nil_format_supports_buffer(struct nv_device_info *dev,
enum pipe_format format);
bool nil_format_supports_storage(struct nv_device_info *dev,
enum pipe_format format);
bool nil_format_supports_color_targets(struct nv_device_info *dev,
enum pipe_format format);
bool nil_format_supports_blending(struct nv_device_info *dev,
enum pipe_format format);
bool nil_format_supports_depth_stencil(struct nv_device_info *dev,
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);
enum ENUM_PACKED nil_image_dim {
NIL_IMAGE_DIM_1D = 1,
NIL_IMAGE_DIM_2D = 2,
@ -292,4 +319,4 @@ nil_sparse_block_extent_px(enum pipe_format format,
enum nil_image_dim dim,
enum nil_sample_layout sample_layout);
#endif /* NIL_IMAGE_H */
#endif /* NIL_H */

View File

@ -2,7 +2,7 @@
* Copyright © 2022 Collabora Ltd.
* SPDX-License-Identifier: MIT
*/
#include "nil_format.h"
#include "nil.h"
#include "nil_format_table.h"
#include "nouveau_device.h"

View File

@ -1,43 +0,0 @@
/*
* Copyright © 2022 Collabora Ltd.
* SPDX-License-Identifier: MIT
*/
#ifndef NIL_FORMAT_H
#define NIL_FORMAT_H
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include "util/format/u_format.h"
struct nv_device_info;
/* We don't have our own format enum; we use PIPE_FORMAT for everything */
bool nil_format_supports_texturing(struct nv_device_info *dev,
enum pipe_format format);
bool nil_format_supports_filtering(struct nv_device_info *dev,
enum pipe_format format);
bool nil_format_supports_buffer(struct nv_device_info *dev,
enum pipe_format format);
bool nil_format_supports_storage(struct nv_device_info *dev,
enum pipe_format format);
bool nil_format_supports_color_targets(struct nv_device_info *dev,
enum pipe_format format);
bool nil_format_supports_blending(struct nv_device_info *dev,
enum pipe_format format);
bool nil_format_supports_depth_stencil(struct nv_device_info *dev,
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);
#endif /* NIL_FORMAT_H */

View File

@ -2,7 +2,7 @@
* Copyright © 2022 Collabora Ltd.
* SPDX-License-Identifier: MIT
*/
#include "nil_image.h"
#include "nil.h"
#include "util/u_math.h"

View File

@ -2,7 +2,7 @@
* Copyright © 2022 Collabora Ltd.
* SPDX-License-Identifier: MIT
*/
#include "nil_image.h"
#include "nil.h"
#include "nil_format_table.h"
#include "util/bitpack_helpers.h"

View File

@ -4,8 +4,7 @@
*/
#include "nvk_buffer_view.h"
#include "nil_format.h"
#include "nil_image.h"
#include "nil.h"
#include "nvk_buffer.h"
#include "nvk_entrypoints.h"
#include "nvk_device.h"

View File

@ -11,7 +11,6 @@
#include "nvk_mme.h"
#include "nvk_physical_device.h"
#include "nil_format.h"
#include "vk_format.h"
#include "nvk_cl9097.h"

View File

@ -13,7 +13,6 @@
#include "nvk_physical_device.h"
#include "nvk_shader.h"
#include "nil_format.h"
#include "util/bitpack_helpers.h"
#include "vk_format.h"
#include "vk_render_pass.h"

View File

@ -10,7 +10,6 @@
#include "nvk_format.h"
#include "nvk_physical_device.h"
#include "nil_format.h"
#include "vk_format.h"
#include "clb097.h"

View File

@ -9,7 +9,7 @@
#include "vk_image.h"
#include "nil_image.h"
#include "nil.h"
/* Because small images can end up with an array_stride_B that is less than
* the sparse block size (in bytes), we have to set SINGLE_MIPTAIL_BIT when

View File

@ -9,7 +9,7 @@
#include "vk_image.h"
#include "nil_image.h"
#include "nil.h"
struct nvk_device;