From 9fdcd217a46da5ba1365900c0f6f1e16db33ec49 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Fri, 5 Apr 2024 19:01:50 -0500 Subject: [PATCH] nil: Rename nil_tiling::gob_height_8 to gob_height_is_8 Part-of: --- src/nouveau/nil/nil.h | 4 ++-- src/nouveau/nil/nil_image.c | 16 ++++++++-------- src/nouveau/nil/nil_image_tic.c | 4 ++-- src/nouveau/vulkan/nvk_cmd_copy.c | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/nouveau/nil/nil.h b/src/nouveau/nil/nil.h index 79d73fe342ae8..2f41bced33f87 100644 --- a/src/nouveau/nil/nil.h +++ b/src/nouveau/nil/nil.h @@ -105,13 +105,13 @@ nil_offset4d_px_to_el(struct nil_offset4d offset_px, enum nil_sample_layout sample_layout); #define NIL_GOB_WIDTH_B 64 -#define NIL_GOB_HEIGHT(gob_height_8) ((gob_height_8) ? 8 : 4) +#define NIL_GOB_HEIGHT(gob_height_is_8) ((gob_height_is_8) ? 8 : 4) #define NIL_GOB_DEPTH 1 #define NIL_MAX_LEVELS 16 struct nil_tiling { bool is_tiled:1; - bool gob_height_8:1; /**< GOB height is 4 or 8 */ + bool gob_height_is_8:1; /**< GOB height is 4 or 8 */ uint8_t x_log2:3; /**< log2 of the Y tile dimension in GOBs */ uint8_t y_log2:3; /**< log2 of the Y tile dimension in GOBs */ uint8_t z_log2:3; /**< log2 of the Z tile dimension in GOBs */ diff --git a/src/nouveau/nil/nil_image.c b/src/nouveau/nil/nil_image.c index 389396296a00b..d8596fe7c9205 100644 --- a/src/nouveau/nil/nil_image.c +++ b/src/nouveau/nil/nil_image.c @@ -177,11 +177,11 @@ nil_offset4d_px_to_B(struct nil_offset4d offset_px, static struct nil_extent4d nil_extent4d_B_to_GOB(struct nil_extent4d extent_B, - bool gob_height_8) + bool gob_height_is_8) { const struct nil_extent4d gob_extent_B = { .w = NIL_GOB_WIDTH_B, - .h = NIL_GOB_HEIGHT(gob_height_8), + .h = NIL_GOB_HEIGHT(gob_height_is_8), .d = NIL_GOB_DEPTH, .a = 1, }; @@ -195,7 +195,7 @@ nil_tiling_extent_B(struct nil_tiling tiling) if (tiling.is_tiled) { return (struct nil_extent4d) { .w = NIL_GOB_WIDTH_B << tiling.x_log2, - .h = NIL_GOB_HEIGHT(tiling.gob_height_8) << tiling.y_log2, + .h = NIL_GOB_HEIGHT(tiling.gob_height_is_8) << tiling.y_log2, .d = NIL_GOB_DEPTH << tiling.z_log2, .a = 1, }; @@ -224,7 +224,7 @@ nil_tiling_clamp(struct nil_tiling tiling, struct nil_extent4d extent_B) tiling.x_log2 = 0; const struct nil_extent4d extent_GOB = - nil_extent4d_B_to_GOB(extent_B, tiling.gob_height_8); + nil_extent4d_B_to_GOB(extent_B, tiling.gob_height_is_8); tiling.y_log2 = MIN2(tiling.y_log2, util_logbase2_ceil(extent_GOB.h)); tiling.z_log2 = MIN2(tiling.z_log2, util_logbase2_ceil(extent_GOB.d)); @@ -263,7 +263,7 @@ choose_tiling(struct nil_extent4d extent_px, struct nil_tiling tiling = { .is_tiled = true, - .gob_height_8 = true, + .gob_height_is_8 = true, .y_log2 = 5, .z_log2 = 5, }; @@ -343,13 +343,13 @@ sparse_tiling(enum pipe_format format, enum nil_image_dim dim) assert(util_is_power_of_two_or_zero(sparse_block_extent_B.h)); assert(util_is_power_of_two_or_zero(sparse_block_extent_B.d)); - const bool gob_height_8 = true; + const bool gob_height_is_8 = true; const struct nil_extent4d sparse_block_extent_GOB = - nil_extent4d_B_to_GOB(sparse_block_extent_B, gob_height_8); + nil_extent4d_B_to_GOB(sparse_block_extent_B, gob_height_is_8); return (struct nil_tiling) { .is_tiled = true, - .gob_height_8 = gob_height_8, + .gob_height_is_8 = gob_height_is_8, .x_log2 = util_logbase2(sparse_block_extent_GOB.w), .y_log2 = util_logbase2(sparse_block_extent_GOB.h), .z_log2 = util_logbase2(sparse_block_extent_GOB.d), diff --git a/src/nouveau/nil/nil_image_tic.c b/src/nouveau/nil/nil_image_tic.c index 599e8115c066e..97a5e6f976c73 100644 --- a/src/nouveau/nil/nil_image_tic.c +++ b/src/nouveau/nil/nil_image_tic.c @@ -348,7 +348,7 @@ nv9097_nil_image_fill_tic(const struct nil_image *image, if (tiling->is_tiled) { TH_NV9097_SET_E(th, 2, MEMORY_LAYOUT, BLOCKLINEAR); - assert(tiling->gob_height_8); + assert(tiling->gob_height_is_8); assert(tiling->x_log2 == 0); TH_NV9097_SET_E(th, 2, GOBS_PER_BLOCK_WIDTH, ONE_GOB); TH_NV9097_SET_U(th, 2, GOBS_PER_BLOCK_HEIGHT, tiling->y_log2); @@ -448,7 +448,7 @@ nvb097_nil_image_fill_tic(struct nv_device_info *dev, TH_NVB097_SET_U(th, BL, ADDRESS_BITS31TO9, (uint32_t)layer_address >> 9); TH_NVB097_SET_U(th, BL, ADDRESS_BITS47TO32, layer_address >> 32); - assert(tiling->gob_height_8); + assert(tiling->gob_height_is_8); TH_NVB097_SET_E(th, BL, GOBS_PER_BLOCK_WIDTH, ONE_GOB); TH_NVB097_SET_U(th, BL, GOBS_PER_BLOCK_HEIGHT, tiling->y_log2); TH_NVB097_SET_U(th, BL, GOBS_PER_BLOCK_DEPTH, tiling->z_log2); diff --git a/src/nouveau/vulkan/nvk_cmd_copy.c b/src/nouveau/vulkan/nvk_cmd_copy.c index 51e590d0f2f90..dd940b09a690a 100644 --- a/src/nouveau/vulkan/nvk_cmd_copy.c +++ b/src/nouveau/vulkan/nvk_cmd_copy.c @@ -237,7 +237,7 @@ nouveau_copy_rect(struct nvk_cmd_buffer *cmd, struct nouveau_copy *copy) .width = 0, /* Tiles are always 1 GOB wide */ .height = copy->src.tiling.y_log2, .depth = copy->src.tiling.z_log2, - .gob_height = copy->src.tiling.gob_height_8 ? + .gob_height = copy->src.tiling.gob_height_is_8 ? GOB_HEIGHT_GOB_HEIGHT_FERMI_8 : GOB_HEIGHT_GOB_HEIGHT_TESLA_4, }); @@ -278,7 +278,7 @@ nouveau_copy_rect(struct nvk_cmd_buffer *cmd, struct nouveau_copy *copy) .width = 0, /* Tiles are always 1 GOB wide */ .height = copy->dst.tiling.y_log2, .depth = copy->dst.tiling.z_log2, - .gob_height = copy->dst.tiling.gob_height_8 ? + .gob_height = copy->dst.tiling.gob_height_is_8 ? GOB_HEIGHT_GOB_HEIGHT_FERMI_8 : GOB_HEIGHT_GOB_HEIGHT_TESLA_4, });