glsl: remove now unused NumUniformRemapTable
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36997>
This commit is contained in:
Timothy Arceri 2025-08-25 12:15:27 +10:00 committed by Marge Bot
parent e052254066
commit 11a434f3df
5 changed files with 2 additions and 17 deletions

View file

@ -2016,9 +2016,6 @@ gl_nir_link_uniforms(const struct gl_constants *consts,
assert(prog->data->spirv || prog->data->NumUniformStorage == storage_size);
if (prog->data->spirv)
prog->NumUniformRemapTable = state.max_uniform_location;
setup_uniform_remap_tables(consts, prog);
gl_nir_set_uniform_initializers(consts, prog);

View file

@ -2844,8 +2844,6 @@ reserve_explicit_locations(struct gl_shader_program *prog,
*var_name);
return -1;
}
prog->NumUniformRemapTable += slots;
}
/* Check if location is already used. */

View file

@ -576,11 +576,9 @@ enum uniform_remap_type
static void
write_uniform_remap_list(struct blob *metadata,
unsigned num_uniform_remap_table,
gl_uniform_storage *uniform_storage,
struct list_head *uniform_remap_list)
{
blob_write_uint32(metadata, num_uniform_remap_table);
blob_write_uint32(metadata, list_length(uniform_remap_list));
list_for_each_entry_safe(struct range_entry, entry, uniform_remap_list, node) {
@ -646,8 +644,7 @@ static void
write_uniform_remap_tables(struct blob *metadata,
struct gl_shader_program *prog)
{
write_uniform_remap_list(metadata, prog->NumUniformRemapTable,
prog->data->UniformStorage,
write_uniform_remap_list(metadata, prog->data->UniformStorage,
prog->UniformRemapTable);
for (unsigned i = 0; i < MESA_SHADER_MESH_STAGES; i++) {
@ -664,13 +661,9 @@ write_uniform_remap_tables(struct blob *metadata,
static void
read_uniform_remap_list(struct blob_reader *metadata,
struct gl_shader_program *prog,
unsigned *num_entries,
struct list_head *remap_list,
gl_uniform_storage *uniform_storage)
{
unsigned num = blob_read_uint32(metadata);
*num_entries = num;
unsigned num_list_entries = blob_read_uint32(metadata);
for (unsigned i = 0; i < num_list_entries; i++) {
@ -733,8 +726,7 @@ static void
read_uniform_remap_tables(struct blob_reader *metadata,
struct gl_shader_program *prog)
{
read_uniform_remap_list(metadata, prog, &prog->NumUniformRemapTable,
prog->UniformRemapTable,
read_uniform_remap_list(metadata, prog, prog->UniformRemapTable,
prog->data->UniformStorage);
for (unsigned i = 0; i < MESA_SHADER_MESH_STAGES; i++) {

View file

@ -161,7 +161,6 @@ _mesa_clear_shader_program_data(struct gl_context *ctx,
shProg->data->NumUniformStorage = 0;
shProg->data->UniformStorage = NULL;
shProg->NumUniformRemapTable = 0;
shProg->UniformRemapTable =
util_reset_range_remap(shProg->UniformRemapTable);

View file

@ -439,7 +439,6 @@ struct gl_shader_program
* UniformStorage entries. Arrays will have multiple contiguous slots
* in the UniformRemapTable, all pointing to the same UniformStorage entry.
*/
unsigned NumUniformRemapTable;
struct list_head *UniformRemapTable;
/**