Accepting request 576479 from home:mimi_vx:branches:X11:XOrg
- add u_glsl-linker-error.patch * fix fdo#104777 - Attaching multiple shader objects for the same stage to a GLSL program triggers a linker error when a package has been patched - add u_glsl-linker-error.patch * fix fdo#104777 - Attaching multiple shader objects for the same stage to a GLSL program triggers a linker error OBS-URL: https://build.opensuse.org/request/show/576479 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=700
This commit is contained in:
parent
de9388e7e1
commit
b1b86261ef
@ -1,8 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 12 12:32:21 UTC 2018 - joop.boonen@opensuse.org
|
||||
Wed Feb 14 09:48:41 UTC 2018 - mimi.vx@gmail.com
|
||||
|
||||
- add u_glsl-linker-error.patch
|
||||
* fix fdo#104777 - Attaching multiple shader objects for the same
|
||||
stage to a GLSL program triggers a linker error
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 12 12:31:05 UTC 2018 - joop.boonen@opensuse.org
|
||||
|
||||
- Added %{release} so the correct package release is used
|
||||
when a package has been patched
|
||||
when a package has been patched
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 9 13:45:16 UTC 2018 - sndirsch@suse.com
|
||||
|
@ -142,6 +142,7 @@ Patch32: archlinux_glvnd-fix-gl-dot-pc.patch
|
||||
# Upstream
|
||||
Patch43: u_mesa-python3-only.patch
|
||||
Patch45: n_Disable-AMDGPU-GFX9-Vega-on-LLVM-lessthan-6.0.0.patch
|
||||
Patch46: u_glsl-linker-error.patch
|
||||
|
||||
BuildRequires: autoconf >= 2.60
|
||||
BuildRequires: automake
|
||||
@ -750,6 +751,7 @@ rm -rf docs/README.{VMS,WIN32,OS2}
|
||||
|
||||
%patch43 -p1
|
||||
%patch45 -p1
|
||||
%patch46 -p1
|
||||
|
||||
# Remove requires to libglvnd/libglvnd-devel from baselibs.conf when
|
||||
# disabling libglvnd build; ugly ...
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 14 09:48:41 UTC 2018 - mimi.vx@gmail.com
|
||||
|
||||
- add u_glsl-linker-error.patch
|
||||
* fix fdo#104777 - Attaching multiple shader objects for the same
|
||||
stage to a GLSL program triggers a linker error
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 12 12:31:05 UTC 2018 - joop.boonen@opensuse.org
|
||||
|
||||
|
@ -141,6 +141,7 @@ Patch32: archlinux_glvnd-fix-gl-dot-pc.patch
|
||||
# Upstream
|
||||
Patch43: u_mesa-python3-only.patch
|
||||
Patch45: n_Disable-AMDGPU-GFX9-Vega-on-LLVM-lessthan-6.0.0.patch
|
||||
Patch46: u_glsl-linker-error.patch
|
||||
|
||||
BuildRequires: autoconf >= 2.60
|
||||
BuildRequires: automake
|
||||
@ -749,6 +750,7 @@ rm -rf docs/README.{VMS,WIN32,OS2}
|
||||
|
||||
%patch43 -p1
|
||||
%patch45 -p1
|
||||
%patch46 -p1
|
||||
|
||||
# Remove requires to libglvnd/libglvnd-devel from baselibs.conf when
|
||||
# disabling libglvnd build; ugly ...
|
||||
|
115
u_glsl-linker-error.patch
Normal file
115
u_glsl-linker-error.patch
Normal file
@ -0,0 +1,115 @@
|
||||
From 4195eed961ccfe404ae81b9112189fc93a254ded Mon Sep 17 00:00:00 2001
|
||||
From: "Juan A. Suarez Romero" <jasuarez@igalia.com>
|
||||
Date: Mon, 5 Feb 2018 17:38:39 +0100
|
||||
Subject: glsl/linker: check same name is not used in block and outside
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
According with OpenGL GLSL 3.20 spec, section 4.3.9:
|
||||
|
||||
"It is a link-time error if any particular shader interface
|
||||
contains:
|
||||
- two different blocks, each having no instance name, and each
|
||||
having a member of the same name, or
|
||||
- a variable outside a block, and a block with no instance name,
|
||||
where the variable has the same name as a member in the block."
|
||||
|
||||
This fixes a previous commit 9b894c8 ("glsl/linker: link-error using the
|
||||
same name in unnamed block and outside") that covered this case, but
|
||||
did not take in account that precision qualifiers are ignored when
|
||||
comparing blocks with no instance name.
|
||||
|
||||
With this commit, the original tests
|
||||
KHR-GL*.shaders.uniform_block.common.name_matching keep fixed, and also
|
||||
dEQP-GLES31.functional.shaders.linkage.uniform.block.differing_precision
|
||||
regression is fixed, which was broken by previous commit.
|
||||
|
||||
v2: use helper varibles (Matteo Bruni)
|
||||
|
||||
Fixes: 9b894c8 ("glsl/linker: link-error using the same name in unnamed block and outside")
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104668
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104777
|
||||
CC: Mark Janes <mark.a.janes@intel.com>
|
||||
CC: "18.0" <mesa-stable@lists.freedesktop.org>
|
||||
Tested-by: Matteo Bruni <matteo.mystral@gmail.com>
|
||||
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
|
||||
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
|
||||
---
|
||||
src/compiler/glsl/linker.cpp | 53 +++++++++++++++++++++++++-------------------
|
||||
1 file changed, 30 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
|
||||
index ce10193..d3d18c2 100644
|
||||
--- a/src/compiler/glsl/linker.cpp
|
||||
+++ b/src/compiler/glsl/linker.cpp
|
||||
@@ -1111,29 +1111,6 @@ cross_validate_globals(struct gl_shader_program *prog,
|
||||
return;
|
||||
}
|
||||
|
||||
- /* In OpenGL GLSL 4.20 spec, section 4.3.9, page 57:
|
||||
- *
|
||||
- * "It is a link-time error if any particular shader interface
|
||||
- * contains:
|
||||
- *
|
||||
- * - two different blocks, each having no instance name, and each
|
||||
- * having a member of the same name, or
|
||||
- *
|
||||
- * - a variable outside a block, and a block with no instance name,
|
||||
- * where the variable has the same name as a member in the block."
|
||||
- */
|
||||
- if (var->data.mode == existing->data.mode &&
|
||||
- var->get_interface_type() != existing->get_interface_type()) {
|
||||
- linker_error(prog, "declarations for %s `%s` are in "
|
||||
- "%s and %s\n",
|
||||
- mode_string(var), var->name,
|
||||
- existing->get_interface_type() ?
|
||||
- existing->get_interface_type()->name : "outside a block",
|
||||
- var->get_interface_type() ?
|
||||
- var->get_interface_type()->name : "outside a block");
|
||||
-
|
||||
- return;
|
||||
- }
|
||||
/* Only in GLSL ES 3.10, the precision qualifier should not match
|
||||
* between block members defined in matched block names within a
|
||||
* shader interface.
|
||||
@@ -1155,6 +1132,36 @@ cross_validate_globals(struct gl_shader_program *prog,
|
||||
mode_string(var), var->name);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ /* In OpenGL GLSL 3.20 spec, section 4.3.9:
|
||||
+ *
|
||||
+ * "It is a link-time error if any particular shader interface
|
||||
+ * contains:
|
||||
+ *
|
||||
+ * - two different blocks, each having no instance name, and each
|
||||
+ * having a member of the same name, or
|
||||
+ *
|
||||
+ * - a variable outside a block, and a block with no instance name,
|
||||
+ * where the variable has the same name as a member in the block."
|
||||
+ */
|
||||
+ const glsl_type *var_itype = var->get_interface_type();
|
||||
+ const glsl_type *existing_itype = existing->get_interface_type();
|
||||
+ if (var_itype != existing_itype) {
|
||||
+ if (!var_itype || !existing_itype) {
|
||||
+ linker_error(prog, "declarations for %s `%s` are inside block "
|
||||
+ "`%s` and outside a block",
|
||||
+ mode_string(var), var->name,
|
||||
+ var_itype ? var_itype->name : existing_itype->name);
|
||||
+ return;
|
||||
+ } else if (strcmp(var_itype->name, existing_itype->name) != 0) {
|
||||
+ linker_error(prog, "declarations for %s `%s` are inside blocks "
|
||||
+ "`%s` and `%s`",
|
||||
+ mode_string(var), var->name,
|
||||
+ existing_itype->name,
|
||||
+ var_itype->name);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
} else
|
||||
variables->add_variable(var);
|
||||
}
|
||||
--
|
||||
cgit v1.1
|
||||
|
Loading…
Reference in New Issue
Block a user