From 76e27d2d0dca7ad0d2c281c54478ee584395667d Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Tue, 29 Apr 2025 13:32:58 +0100 Subject: [PATCH] v3d/compiler: remove return_channels from the shader key This isn't used anywhere. Reviewed-by: Iago Toral Quiroga Part-of: --- src/broadcom/compiler/v3d_compiler.h | 1 - src/broadcom/vulkan/v3dv_pipeline.c | 3 --- src/gallium/drivers/v3d/v3d_program.c | 11 ----------- 3 files changed, 15 deletions(-) diff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h index d55b4a95483..9c9aaeb88de 100644 --- a/src/broadcom/compiler/v3d_compiler.h +++ b/src/broadcom/compiler/v3d_compiler.h @@ -413,7 +413,6 @@ struct v3d_key { } tex[V3D_MAX_TEXTURE_SAMPLERS]; struct { uint8_t return_size; - uint8_t return_channels; } sampler[V3D_MAX_TEXTURE_SAMPLERS]; uint8_t num_tex_used; diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c index 52d84407156..022374eaed0 100644 --- a/src/broadcom/vulkan/v3dv_pipeline.c +++ b/src/broadcom/vulkan/v3dv_pipeline.c @@ -980,9 +980,6 @@ pipeline_populate_v3d_key(struct v3d_key *key, sampler_idx++) { key->sampler[sampler_idx].return_size = sampler_map->return_size[sampler_idx]; - - key->sampler[sampler_idx].return_channels = - key->sampler[sampler_idx].return_size == 32 ? 4 : 2; } switch (p_stage->stage) { diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c index a0813d204ea..c466baea0fa 100644 --- a/src/gallium/drivers/v3d/v3d_program.c +++ b/src/gallium/drivers/v3d/v3d_program.c @@ -588,16 +588,6 @@ v3d_setup_shared_key(struct v3d_context *v3d, struct v3d_key *key, key->sampler[i].return_size = v3d_get_tex_return_size(devinfo, sampler->format); - /* For 16-bit, we set up the sampler to always return 2 - * channels (meaning no recompiles for most statechanges), - * while for 32 we actually scale the returns with channels. - */ - if (key->sampler[i].return_size == 16) { - key->sampler[i].return_channels = 2; - } else { - key->sampler[i].return_channels = 4; - } - /* We let the sampler state handle the swizzle. */ key->tex[i].swizzle[0] = PIPE_SWIZZLE_X; @@ -634,7 +624,6 @@ v3d_setup_shared_precompile_key(struct v3d_uncompiled_shader *uncompiled, */ for (int i = 0; i < s->info.num_textures; i++) { key->sampler[i].return_size = 16; - key->sampler[i].return_channels = 2; key->tex[i].swizzle[0] = PIPE_SWIZZLE_X; key->tex[i].swizzle[1] = PIPE_SWIZZLE_Y;