Mesa (master): mesa: remove unused LastUniformIndex

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Dec 18 05:12:35 UTC 2020


Module: Mesa
Branch: master
Commit: 884e84035e8a3e63725f1d8169df05665708f981
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=884e84035e8a3e63725f1d8169df05665708f981

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Dec 11 16:13:26 2020 -0500

mesa: remove unused LastUniformIndex

This is now dead code.

Reviewed-by: Zoltán Böszörményi <zboszor at gmail.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8046>

---

 src/compiler/glsl/serialize.cpp   | 2 --
 src/mesa/program/prog_parameter.c | 5 -----
 src/mesa/program/prog_parameter.h | 1 -
 3 files changed, 8 deletions(-)

diff --git a/src/compiler/glsl/serialize.cpp b/src/compiler/glsl/serialize.cpp
index f95fa8069f1..cb12253f5a2 100644
--- a/src/compiler/glsl/serialize.cpp
+++ b/src/compiler/glsl/serialize.cpp
@@ -1045,7 +1045,6 @@ write_shader_parameters(struct blob *metadata,
 
    blob_write_uint32(metadata, params->StateFlags);
    blob_write_uint32(metadata, params->UniformBytes);
-   blob_write_uint32(metadata, params->LastUniformIndex);
    blob_write_uint32(metadata, params->FirstStateVarIndex);
 }
 
@@ -1082,7 +1081,6 @@ read_shader_parameters(struct blob_reader *metadata,
 
    params->StateFlags = blob_read_uint32(metadata);
    params->UniformBytes = blob_read_uint32(metadata);
-   params->LastUniformIndex = blob_read_uint32(metadata);
    params->FirstStateVarIndex = blob_read_uint32(metadata);
 }
 
diff --git a/src/mesa/program/prog_parameter.c b/src/mesa/program/prog_parameter.c
index 40b1c10a49f..1b46c2dee48 100644
--- a/src/mesa/program/prog_parameter.c
+++ b/src/mesa/program/prog_parameter.c
@@ -141,7 +141,6 @@ _mesa_new_parameter_list(void)
       return NULL;
 
    list->UniformBytes = 0;
-   list->LastUniformIndex = -1;
    list->FirstStateVarIndex = INT_MAX;
    return list;
 }
@@ -331,8 +330,6 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList,
    }
 
    if (type == PROGRAM_UNIFORM || type == PROGRAM_CONSTANT) {
-      paramList->LastUniformIndex =
-         MAX2(paramList->LastUniformIndex, oldNum);
       paramList->UniformBytes =
          MAX2(paramList->UniformBytes, paramList->NumParameterValues * 4);
    } else if (type == PROGRAM_STATE_VAR) {
@@ -454,13 +451,11 @@ void
 _mesa_recompute_parameter_bounds(struct gl_program_parameter_list *list)
 {
    list->FirstStateVarIndex = INT_MAX;
-   list->LastUniformIndex = -1;
 
    for (int i = 0; i < (int)list->NumParameters; i++) {
       if (list->Parameters[i].Type == PROGRAM_STATE_VAR) {
          list->FirstStateVarIndex = MIN2(list->FirstStateVarIndex, i);
       } else {
-         list->LastUniformIndex = MAX2(list->LastUniformIndex, i);
          list->UniformBytes = MAX2(list->UniformBytes, list->NumParameterValues * 4);
       }
    }
diff --git a/src/mesa/program/prog_parameter.h b/src/mesa/program/prog_parameter.h
index d625897692a..013515ca69e 100644
--- a/src/mesa/program/prog_parameter.h
+++ b/src/mesa/program/prog_parameter.h
@@ -153,7 +153,6 @@ struct gl_program_parameter_list
     * which can't sort parameters.
     */
    int UniformBytes;
-   int LastUniformIndex;
    int FirstStateVarIndex;
 };
 



More information about the mesa-commit mailing list