glsl: remove linker.cpp

All functionality has now been converted to NIR or moved elsewhere.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31500>
This commit is contained in:
Timothy Arceri 2024-10-03 13:35:22 +10:00 committed by Marge Bot
parent e4c3e7e0d8
commit 065b45e4dc
5 changed files with 3 additions and 102 deletions

View file

@ -4500,8 +4500,8 @@ get_variable_being_redeclared(ir_variable **var_ptr, YYLTYPE loc,
* We don't really need to do anything here, just allow the
* redeclaration. Any error on the gl_FragCoord is handled on the ast
* level at apply_layout_qualifier_to_variable using the
* ast_type_qualifier and _mesa_glsl_parse_state, or later at
* linker.cpp.
* ast_type_qualifier and _mesa_glsl_parse_state, or later in the
* linker.
*/
/* According to section 4.3.7 of the GLSL 1.30 spec,
* the following built-in varaibles can be redeclared with an

View file

@ -37,8 +37,7 @@
#include "util/perf/cpu_trace.h"
/**
* This file included general link methods, using NIR, instead of IR as
* the counter-part glsl/linker.cpp
* This file included general link methods, using NIR.
*/
void

View file

@ -1,94 +0,0 @@
/*
* Copyright © 2010 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/**
* \file linker.cpp
* GLSL linker implementation
*
* Given a set of shaders that are to be linked to generate a final program,
* there are three distinct stages.
*
* In the first stage shaders are partitioned into groups based on the shader
* type. All shaders of a particular type (e.g., vertex shaders) are linked
* together.
*
* - Undefined references in each shader are resolve to definitions in
* another shader.
* - Types and qualifiers of uniforms, outputs, and global variables defined
* in multiple shaders with the same name are verified to be the same.
* - Initializers for uniforms and global variables defined
* in multiple shaders with the same name are verified to be the same.
*
* The result, in the terminology of the GLSL spec, is a set of shader
* executables for each processing unit.
*
* After the first stage is complete, a series of semantic checks are performed
* on each of the shader executables.
*
* - Each shader executable must define a \c main function.
* - Each vertex shader executable must write to \c gl_Position.
* - Each fragment shader executable must write to either \c gl_FragData or
* \c gl_FragColor.
*
* In the final stage individual shader executables are linked to create a
* complete exectuable.
*
* - Types of uniforms defined in multiple shader stages with the same name
* are verified to be the same.
* - Initializers for uniforms defined in multiple shader stages with the
* same name are verified to be the same.
* - Types and qualifiers of outputs defined in one stage are verified to
* be the same as the types and qualifiers of inputs defined with the same
* name in a later stage.
*
* \author Ian Romanick <ian.d.romanick@intel.com>
*/
#include <ctype.h>
#include "util/strndup.h"
#include "glsl_symbol_table.h"
#include "glsl_parser_extras.h"
#include "ir.h"
#include "nir.h"
#include "program.h"
#include "program/prog_instruction.h"
#include "program/program.h"
#include "util/mesa-sha1.h"
#include "util/set.h"
#include "string_to_uint_map.h"
#include "linker_util.h"
#include "ir_optimization.h"
#include "ir_rvalue_visitor.h"
#include "builtin_functions.h"
#include "shader_cache.h"
#include "util/u_string.h"
#include "util/u_math.h"
#include "main/shaderobj.h"
#include "main/enums.h"
#include "main/mtypes.h"
#include "main/context.h"

View file

@ -168,7 +168,6 @@ files_libglsl = files(
'ir_variable_refcount.cpp',
'ir_variable_refcount.h',
'ir_visitor.h',
'linker.cpp',
'linker_util.h',
'linker_util.cpp',
'list.h',

View file

@ -127,9 +127,6 @@ _mesa_spirv_shader_binary(struct gl_context *ctx,
}
/**
* This is the equivalent to compiler/glsl/linker.cpp::link_shaders()
* but for SPIR-V programs.
*
* This method just creates the gl_linked_shader structs with a reference to
* the SPIR-V data collected during previous steps.
*