From 8b6b327d1b9bc6f6e2053d30911c9d7888e4848d Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Wed, 8 May 2024 01:57:29 +0100 Subject: [PATCH] treewide: Cleanup unused structs vk/wsi: Remove unused struct 'wsi_headless_format' 'wsi_headless_format' appears unused, and seems to have been since initial commit. radv: Remove unused struct 'blit_region' 'blit_region' appears unused, I think since initial commit. r600: Remove unused structs 'eg_interp' and 'r600_shader_src' are unused. I think they are just leftovers from the cleanup in 20e6c31ba6. i915: Remove unused struct 'i915_tracked_hw_state' 'i915_tracked_hw_state' appears unused. I think it's just a leftover from 179cb587954ff. llvmpipe: Remove unused struct 'linear_interp' 'linear_interp' doesn't ever seem to have been used. radeonsi: Remove unused struct 'texture_orig_info' 'texture_orig_info' seems unused, I think since 46b2b3bda8d. svga: Remove unused struct 'svga_3d_invalidate_gb_image' 'svga_3d_invalidate_gb_image' appears unused since 1942c06f9c. Remove it. nir: Remove unused struct 'split_struct_state' 'split_struct_state' looks unused since the original commit. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Faith Ekstrand Part-of: --- src/amd/vulkan/meta/radv_meta_blit.c | 7 ------- src/compiler/nir/nir_split_per_member_structs.c | 6 ------ src/gallium/drivers/i915/i915_state_emit.c | 7 ------- .../drivers/llvmpipe/lp_state_fs_linear.c | 9 --------- src/gallium/drivers/r600/r600_shader.c | 16 ---------------- src/gallium/drivers/radeonsi/si_blit.c | 10 ---------- .../drivers/svga/svga_resource_buffer_upload.c | 6 ------ src/vulkan/wsi/wsi_common_headless.c | 5 ----- 8 files changed, 66 deletions(-) diff --git a/src/amd/vulkan/meta/radv_meta_blit.c b/src/amd/vulkan/meta/radv_meta_blit.c index aa2d79c09e7..9fdcd222c3c 100644 --- a/src/amd/vulkan/meta/radv_meta_blit.c +++ b/src/amd/vulkan/meta/radv_meta_blit.c @@ -9,13 +9,6 @@ #include "vk_command_pool.h" #include "vk_common_entrypoints.h" -struct blit_region { - VkOffset3D src_offset; - VkExtent3D src_extent; - VkOffset3D dst_offset; - VkExtent3D dst_extent; -}; - static VkResult build_pipeline(struct radv_device *device, VkImageAspectFlagBits aspect, enum glsl_sampler_dim tex_dim, VkFormat format, VkPipeline *pipeline); diff --git a/src/compiler/nir/nir_split_per_member_structs.c b/src/compiler/nir/nir_split_per_member_structs.c index 4d87dd39eea..17ee1079ccb 100644 --- a/src/compiler/nir/nir_split_per_member_structs.c +++ b/src/compiler/nir/nir_split_per_member_structs.c @@ -24,12 +24,6 @@ #include "nir.h" #include "nir_deref.h" -struct split_struct_state { - void *dead_ctx; - - struct hash_table *var_to_member_map; -}; - static nir_variable * find_var_member(struct nir_variable *var, unsigned member, struct hash_table *var_to_member_map) diff --git a/src/gallium/drivers/i915/i915_state_emit.c b/src/gallium/drivers/i915/i915_state_emit.c index 5b2d19c0786..399ea2bf15e 100644 --- a/src/gallium/drivers/i915/i915_state_emit.c +++ b/src/gallium/drivers/i915/i915_state_emit.c @@ -40,13 +40,6 @@ #include "util/u_math.h" #include "util/u_memory.h" -struct i915_tracked_hw_state { - const char *name; - void (*validate)(struct i915_context *, unsigned *batch_space); - void (*emit)(struct i915_context *); - unsigned dirty, batch_space; -}; - static void validate_flush(struct i915_context *i915, unsigned *batch_space) { diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs_linear.c b/src/gallium/drivers/llvmpipe/lp_state_fs_linear.c index 89aac04dc33..f0ef417bda9 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs_linear.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs_linear.c @@ -63,15 +63,6 @@ struct nearest_sampler { }; -struct linear_interp { - alignas(16) uint32_t out[64]; - __m128i a0; - __m128i dadx; - __m128i dady; - int width; /* rounded up to multiple of 4 */ - bool is_constant; -}; - /* Organize all the information needed for blending in one place. * Could have blend function pointer here, but we currently always * know which one we want to call. diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index f189e0e618f..64809b120ca 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -331,22 +331,6 @@ void r600_pipe_shader_destroy(struct pipe_context *ctx UNUSED, struct r600_pipe_ free(shader->shader.arrays); } -struct r600_shader_src { - unsigned sel; - unsigned swizzle[4]; - unsigned neg; - unsigned abs; - unsigned rel; - unsigned kc_bank; - bool kc_rel; /* true if cache bank is indexed */ - uint32_t value[4]; -}; - -struct eg_interp { - bool enabled; - unsigned ij_index; -}; - struct r600_shader_ctx { unsigned type; unsigned temp_reg; diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 4a172a9e60f..946228b6d9c 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -931,16 +931,6 @@ void si_decompress_subresource(struct pipe_context *ctx, struct pipe_resource *t } } -struct texture_orig_info { - unsigned format; - unsigned width0; - unsigned height0; - unsigned npix_x; - unsigned npix_y; - unsigned npix0_x; - unsigned npix0_y; -}; - void si_resource_copy_region(struct pipe_context *ctx, struct pipe_resource *dst, unsigned dst_level, unsigned dstx, unsigned dsty, unsigned dstz, struct pipe_resource *src, unsigned src_level, diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c index f9b3f287d8f..e0c436b6945 100644 --- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c +++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c @@ -30,12 +30,6 @@ struct svga_3d_update_gb_image { SVGA3dCmdUpdateGBImage body; }; -struct svga_3d_invalidate_gb_image { - SVGA3dCmdHeader header; - SVGA3dCmdInvalidateGBImage body; -}; - - static void svga_buffer_upload_ranges(struct svga_context *, struct svga_buffer *); diff --git a/src/vulkan/wsi/wsi_common_headless.c b/src/vulkan/wsi/wsi_common_headless.c index 136a4d11209..f907a44a88e 100644 --- a/src/vulkan/wsi/wsi_common_headless.c +++ b/src/vulkan/wsi/wsi_common_headless.c @@ -38,11 +38,6 @@ #include "drm-uapi/drm_fourcc.h" -struct wsi_headless_format { - VkFormat format; - struct u_vector modifiers; -}; - struct wsi_headless { struct wsi_interface base;