nir/linker: remove reference to just SPIR-V linking

Several files had a initial comment about the purpose of such files,
including a reference that the NIR linker was implemented with just
ARB_gl_spirv in mind.

Since the nice job Timothy is doing to use the NIR linker on GLSL,
that is not true anymore, so let's remove that reference and also
tweak some other comments.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4081>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4081>
This commit is contained in:
Alejandro Piñeiro 2020-03-06 10:23:48 +01:00 committed by Marge Bot
parent d7a70fbb23
commit 2ba272135a
5 changed files with 19 additions and 26 deletions

View File

@ -27,10 +27,9 @@
#include "compiler/glsl/ir_uniform.h" /* for gl_uniform_storage */ #include "compiler/glsl/ir_uniform.h" /* for gl_uniform_storage */
#include "main/context.h" #include "main/context.h"
/* This file do the common link for GLSL atomic counter uniforms, using NIR, /**
* This file do the common link for GLSL atomic counter uniforms, using NIR,
* instead of IR as the counter-part glsl/link_uniforms.cpp * instead of IR as the counter-part glsl/link_uniforms.cpp
*
* Also note that this is tailored for ARB_gl_spirv needs and particularities
*/ */
struct active_atomic_counter_uniform { struct active_atomic_counter_uniform {

View File

@ -27,11 +27,11 @@
#include "linker_util.h" #include "linker_util.h"
#include "main/mtypes.h" #include "main/mtypes.h"
/* Summary: This file contains code to do a nir-based linking for uniform /**
* blocks. This includes ubos and ssbos. Note that it is tailored to * This file contains code to do a nir-based linking for uniform blocks. This
* ARB_gl_spirv needs and particularities. * includes ubos and ssbos.
* *
* More details: * For the case of ARB_gl_spirv there are some differences compared with GLSL:
* *
* 1. Linking doesn't use names: GLSL linking use names as core concept. But * 1. Linking doesn't use names: GLSL linking use names as core concept. But
* on SPIR-V, uniform block name, fields names, and other names are * on SPIR-V, uniform block name, fields names, and other names are
@ -67,8 +67,9 @@
* RESOLVED. Pick (c), but also allow debug names to be returned if an * RESOLVED. Pick (c), but also allow debug names to be returned if an
* implementation wants to." * implementation wants to."
* *
* This implemention doesn't care for the names, as the main objective is * When linking SPIR-V shaders this implemention doesn't care for the names,
* functional, and not support optional debug features. * as the main objective is functional, and not support optional debug
* features.
* *
* 2. Terminology: this file handles both UBO and SSBO, including both as * 2. Terminology: this file handles both UBO and SSBO, including both as
* "uniform blocks" analogously to what is done in the GLSL (IR) path. * "uniform blocks" analogously to what is done in the GLSL (IR) path.
@ -80,11 +81,11 @@
* <skip> * <skip>
* buffer blockN { ... } ...; -> Uniform, with BufferBlock decoration" * buffer blockN { ... } ...; -> Uniform, with BufferBlock decoration"
* *
* 3. Explicit data: The code assumes that all structure members have an * 3. Explicit data: for the SPIR-V path the code assumes that all structure
* Offset decoration, all arrays have an ArrayStride and all matrices have * members have an Offset decoration, all arrays have an ArrayStride and
* a MatrixStride, even for nested structures. That way we dont have to * all matrices have a MatrixStride, even for nested structures. That way
* worry about the different layout modes. This is explicitly required in * we dont have to worry about the different layout modes. This is
* the SPIR-V spec: * explicitly required in the SPIR-V spec:
* *
* "Composite objects in the UniformConstant, Uniform, and PushConstant * "Composite objects in the UniformConstant, Uniform, and PushConstant
* Storage Classes must be explicitly laid out. The following apply to all * Storage Classes must be explicitly laid out. The following apply to all

View File

@ -28,12 +28,9 @@
#include "main/context.h" #include "main/context.h"
#include "main/mtypes.h" #include "main/mtypes.h"
/* This file do the common link for GLSL uniforms, using NIR, instead of IR as /**
* This file do the common link for GLSL uniforms, using NIR, instead of IR as
* the counter-part glsl/link_uniforms.cpp * the counter-part glsl/link_uniforms.cpp
*
* Also note that this is tailored for ARB_gl_spirv needs and particularities
* (like need to work/link without name available, explicit location for
* normal uniforms as mandatory, and so on).
*/ */
#define UNMAPPED_UNIFORM_LOC ~0u #define UNMAPPED_UNIFORM_LOC ~0u

View File

@ -28,11 +28,8 @@
#include "main/context.h" #include "main/context.h"
#include "util/u_math.h" #include "util/u_math.h"
/* /**
* This file does the linking of GLSL transform feedback using NIR. * This file does the linking of GLSL transform feedback using NIR.
*
* Note: This linking pass is currently tailored for ARB_gl_spirv needs and
* particularities.
*/ */
void void

View File

@ -29,10 +29,9 @@
#include "main/shaderobj.h" #include "main/shaderobj.h"
#include "ir_uniform.h" /* for gl_uniform_storage */ #include "ir_uniform.h" /* for gl_uniform_storage */
/* This file included general link methods, using NIR, instead of IR as /**
* This file included general link methods, using NIR, instead of IR as
* the counter-part glsl/linker.cpp * the counter-part glsl/linker.cpp
*
* Also note that this is tailored for ARB_gl_spirv needs and particularities
*/ */
/** /**