tgsi: remove unused tgsi_shader_info.num_tokens
authorThomas H.P. Andersen <phomes@gmail.com>
Tue, 11 Jul 2023 16:22:09 +0000 (18:22 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 19 Jul 2023 12:41:26 +0000 (12:41 +0000)
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>

src/gallium/auxiliary/nir/nir_to_tgsi_info.c
src/gallium/auxiliary/tgsi/tgsi_scan.c
src/gallium/auxiliary/tgsi/tgsi_scan.h

index d8d5d0e..fdb576a 100644 (file)
@@ -166,7 +166,6 @@ static void scan_instruction(const struct nir_shader *nir,
                              struct tgsi_shader_info *info,
                              const nir_instr *instr)
 {
-   info->num_tokens = 2; /* indicate that the shader is non-empty */
    info->num_instructions = 2;
 
    if (instr->type == nir_instr_type_alu) {
@@ -391,7 +390,6 @@ void nir_tgsi_scan_shader(const struct nir_shader *nir,
    unsigned i;
 
    info->processor = pipe_shader_type_from_mesa(nir->info.stage);
-   info->num_tokens = 1; /* Presume empty */
    info->num_instructions = 1;
 
    info->properties[TGSI_PROPERTY_NEXT_SHADER] =
index 5ac133f..fb59975 100644 (file)
@@ -899,7 +899,6 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
           procType == PIPE_SHADER_TESS_EVAL ||
           procType == PIPE_SHADER_COMPUTE);
    info->processor = procType;
-   info->num_tokens = tgsi_num_tokens(parse.Tokens);
 
    if (procType == PIPE_SHADER_GEOMETRY)
       info->properties[TGSI_PROPERTY_GS_INVOCATIONS] = 1;
index 2c3795c..a207273 100644 (file)
@@ -42,8 +42,6 @@ extern "C" {
  */
 struct tgsi_shader_info
 {
-   unsigned num_tokens;
-
    uint8_t num_inputs;
    uint8_t num_outputs;
    uint8_t input_semantic_name[PIPE_MAX_SHADER_INPUTS]; /**< TGSI_SEMANTIC_x */