Sync from SUSE:SLFO:Main glslang revision 9fcf997280cddd6e6ed0fe0c16c385cd

This commit is contained in:
Adrian Schröter 2024-05-03 12:55:55 +02:00
commit aaaa513a1c
5 changed files with 682 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
12.1.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

1
baselibs.conf Normal file
View File

@ -0,0 +1 @@
libglslang12

505
glslang.changes Normal file
View File

@ -0,0 +1,505 @@
-------------------------------------------------------------------
Tue Apr 11 18:40:49 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
- Add StandAlone/ to glslang-nonstd-devel
-------------------------------------------------------------------
Tue Mar 28 18:53:03 UTC 2023 - Enrico Belleri <idesmi@protonmail.com>
- Update to release 12.1.0:
* Reject non-float inputs/outputs for version less than 120
* Fix invalid BufferBlock decoration for SPIR-V 1.3 and above
* Add HLSL relaxed-precision float/int matrix expansions
* Block decorate Vulkan structs with RuntimeArrays
* Support InterlockedAdd on float types
- Delete 0001-build-set-SOVERSION-on-all-libraries.patch:
fixed upstream
- Split part of glslang-devel to glslang-nonstd-devel.
-------------------------------------------------------------------
Sun Jan 29 12:53:11 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
- Update to release 12
* Add support for GL_NV_shader_invocation_reorder.
* Support extension ARB_bindless_texture.
- Delete abibreak_bump.diff
-------------------------------------------------------------------
Thu Dec 15 14:11:52 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Update to release 11.13
* Fix incorrect parse message of mesh shader
* Test for spv1.6 + memory model HelperInvocation
* Add EliminateDeadOutputStores to API.
* GL_ARM_shader_core_builtins support
-------------------------------------------------------------------
Mon Oct 24 19:30:21 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Update to release 11.12
* Add support for GL_EXT_mesh_shader
* Add support for NonSemantic.Shader.DebugInfo.100
* Make OpEmitMeshTasksEXT a terminal instruction
* Make gl_SubGroupARB a flat in int in Vulkan
* Add support for GL_EXT_opacity_micromap
* Add preamble support to C interface
- Add abibreak_bump.diff
-------------------------------------------------------------------
Fri Sep 9 10:35:49 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
- Adjust the cmake support files to use the shared libraries added
from the latest changes
-------------------------------------------------------------------
Wed Sep 7 09:20:41 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Rework static library removal & building procedure to identify
new static libs. (libGenericCodeGen.so and
libMachineIndependent.so are now added)
-------------------------------------------------------------------
Mon Aug 22 23:01:23 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Update to release 11.11.0
* CInterface: Add OpSource support.
* Add SPV_AMD_shader_early_and_late_fragment_tests
* Avoid double-free in functions cloned for vulkan relaxed mode
-------------------------------------------------------------------
Wed Jun 15 17:12:04 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Update to release 11.10.0
* Generate OpLine before OpFunction
* Add support for VK_EXT_fragment_shader_barycentric
* Add whitelist filtering for debug comments in SPIRV-Remap
* Add support for GL_EXT_ray_cull_mask
-------------------------------------------------------------------
Mon Apr 18 23:15:08 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Update to release 11.9.0
* Add GLSL version override functionality
* Add eliminate-dead-input-components to -Os
* Add enhanced-msgs option
-------------------------------------------------------------------
Mon Mar 21 08:02:20 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Enable baselibs, for use by ffmpeg.
-------------------------------------------------------------------
Sun Jan 30 13:08:43 UTC 2022 - Enrico Belleri <idesmi@protonmail.com>
- Update to release 11.8.0
* Add support for SPIR-V 1.6
* Add support for Vulkan 1.3
* Add --hlsl-dx-position-w option
- Delete glslang-big-endian_1.patch, glslang-big-endian_2.patch,
glslang-big-endian_3.patch (merged)
-------------------------------------------------------------------
Thu Dec 9 19:18:39 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Add patches to fix issues on big endian platforms
(Needed to fix https://bugreports.qt.io/browse/QTBUG-93101)
* glslang-big-endian_1.patch
* glslang-big-endian_2.patch
* glslang-big-endian_3.patch
-------------------------------------------------------------------
Sat Nov 27 14:11:19 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Update to release 11.7.1
* Accept gl_ViewportMask in version 430 and later
* Remove support for double trig, pow, exp and log
* Add the GL_EXT_shader_integer_mix Preamble for glsl
* Add support for targeting Vulkan 1.2 in the C API
-------------------------------------------------------------------
Sun Sep 5 11:09:40 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Update to release 11.6.0
* Atomic memory function only for shader storage block member
or shared variable
* Add support for gl_MaxVaryingVectors for ogl
* Fix loading bool arrays from interface blocks
* Generate separate stores for partially swizzled memory stores
* Allow layout(std430) uniform with GL_EXT_scalar_block_layout
* Support for pragma STDGL invariant(all)
* Support for GL_NV_ray_tracing_motion_blur
-------------------------------------------------------------------
Tue Jul 6 08:16:36 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Update to release 11.5.0
* Implement GLSL_EXT_shader_atomic_float2
* Implement GL_EXT_spirv_intrinsics
* Fixed SPIR-V remapper not remapping OpExtInst
instruction set IDs
* Only declare compatibility gl_ variables in compatibility mode
* Add support for float spec const vector initialization
* Implement GL_EXT_subgroup_uniform_control_flow.
* Fix arrays dimensioned with spec constant-sized
gl_WorkGroupSize
* Add support for 64bit integer scalar and vector types to
bitCount() builtin
- Drop 0001-Fix-OOB-write-in-matrix-constructor.patch (merged)
-------------------------------------------------------------------
Wed May 5 08:30:17 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Update to release 11.4.0
* Added --depfile and --auto-sampled-textures options
* Now supports InterpolateAt-based functions
* Supports cross-stage automatic IO mapping
* Supports GL_EXT_vulkan_glsl_relaxed (-R option)
-------------------------------------------------------------------
Mon Mar 1 06:59:55 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Update to release 11.2.0
* Add support for GL_EXT_shared_memory_block
* Implement GL_EXT_null_initializer
-------------------------------------------------------------------
Mon Jan 18 16:51:58 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Update to release 11.1.0
* Add new SpirvToolsDisassemble API interface.
* SPV: Add NonUniform decorations for stores, for constructors
and for OpImages created during lowering.
* SPIRV: Add disassembly support for multiple literal strings.
* Add support for GL_EXT_fragment_shading_rate,
GL_EXT_shader_image_int64.
* Updates for final Vulkan ray tracing extensions.
* Add ray query capability if acceleration structure or ray
query types declared.
-------------------------------------------------------------------
Tue Aug 18 15:06:11 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Add 0001-build-set-SOVERSION-on-all-libraries.patch
-------------------------------------------------------------------
Thu Aug 13 07:32:15 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Update to release 10.15.3847 (6c7beeafa)
* Add support for EXT_ray_flags_primitive_culling,
GL_ARB_shader_bit_encoding, GL_ARB_shader_image_size,
GL_ARB_shader_storage_buffer_object,
GL_ARB_shading_language_packing, GL_ARB_texture_query_lod,
GL_ARB_vertex_attrib_64bit,
GL_EXT_shader_implicit_conversions,
GL_EXT_shader_integer_mix, GL_EXT_blend_func_extended
* Add support for primitive culling layout qualifier
* GlslangToSpv: offer a -g0 command line argument similar to gcc
* libglslang is now built with -fvisibility and exports
- Drop ver.diff (issue resolved upstream)
-------------------------------------------------------------------
Wed Apr 8 10:42:02 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Update to snapshot 8.13.3727+git4 (9c3204a1)
* Add constant expression with mod.
* Add Tess machine dependent built-in variables initialization
for GLES 3.2.
* Added original glslang_c_interface implementation.
* SPV_AMD_shader_image_load_store_lod is now validated by
spirv-tools.
* GL_EXT_debug_printf implementation.
* SPV headers: Bump up to the latest header.
* Add support for GLSL_EXT_ray_tracing.
-------------------------------------------------------------------
Mon Feb 3 10:09:18 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
- Fix build when _lto_cflags is not defined (as in SLE/Leap)
-------------------------------------------------------------------
Sun Jan 19 11:38:09 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Update to snapshot 8.13.3559+git20 (b0ada803)
* SPIR-V: Aggressively prune unreachable merge, continue target.
* INTEL_shader_integer_functions2: Add basic extension
tracking, add compiler front-end support, add SPIR-V
generation.
* Add support for ARB_sample_shading, ARB_texture_multisample,
ARB_uniform_buffer_object, ARB_gpu_shader_fp64.
* SPV/Vulkan: Add support for Vulkan 1.2, which defaults to
SPIR-V 1.5.
-------------------------------------------------------------------
Thu Nov 7 08:25:53 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Update to release 7.13.3496
* GL_NV_integer_cooperative_matrix support
* Add support for GL_ARB_explicit_uniform_location
* SPV 1.5: Switch to the 1.5 header, for SPIR-V 1.5.
* Add GL_EXT_shader_subgroup_extended_types support
* SPV_KHR_physical_storage_buffer/SPV:
Add GL_EXT_buffer_reference_uvec2
* Emit SPV_EXT_physical_storage_buffer, not the KHR form.
* Promote SPV_EXT_physical_storage_buffer to KHR when required.
-------------------------------------------------------------------
Mon Oct 14 21:01:23 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Drop unused static libraries, functions of libOGLCompilerDLL and
libOSDependent are actually present in libglslang already.
[boo#1153950]
-------------------------------------------------------------------
Sat Sep 7 15:57:52 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Bump SOVER as needed.
-------------------------------------------------------------------
Wed Aug 21 07:23:09 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Update to new upstream release 7.12.3352
* Add interface symbol and uniform symbol location auto mapping
for OpenGL shader.
* Handle SPIR-V type mismatch when constructing a composite.
* Implement GL_EXT_demote_to_helper_invocation.
* Avoid generating 8/16-bit constants when 8/16-bit arithmetic
extensions are not enabled.
* Add support for SPV_KHR_shader_clock.
-------------------------------------------------------------------
Fri Aug 2 07:00:29 UTC 2019 - Martin Liška <mliska@suse.cz>
- Use FAT LTO objects in order to provide proper static library.
-------------------------------------------------------------------
Fri Jun 28 07:50:03 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Update to new snapshot 7.11.3276.git10 (4162de4)
* Add Float16/Int8/Int16 capabilities for private variables and
function parameters.
* Use spvValidatorOptionsSetBeforeHlslLegalization for
pre-legalized HLSL.
* Add support for GL_NV_shader_sm_builtins.
* Add gl_SemanticsVolatile to GL_KHR_memory_scope_semantics,
and make volatile-qualified atomics generate
MemorySemanticsVolatile when using the Vulkan memory model.
* Add missing GL_ARB_shader_ballot builtins to Geometry and
Tessellation shaders.
* SPV: Add a switch for favoring non-NaN operands in min, max,
and clamp.
- Remove nodate.diff (upstreamed)
-------------------------------------------------------------------
Wed Jun 5 10:31:35 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Update to new snapshot 7.11.3214.git16 (2f4a8dfd)
* GLSL: Fix tessellation control shader bounding box support.
* GLSL: Add error check for an argument dropping the
"restrict" qualifier.
* Add support for GL_EXT_buffer_reference2.
* SPV: Move to the SPIR-V 1.4 header.
* Support GL_ARB_fragment_shader_interlock.
-------------------------------------------------------------------
Sat Mar 16 18:40:53 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Update to new upstream snapshot 7.11.3113.git55 (f925eefb)
to be in line with spirv-headers.
* Implement GL_NV_cooperative_matrix
* Fixup leak of TString
* Add option to reflect all block members, inactive or active.
* Add option to reflect buffer blocks & variables separately to
uniforms.
* Reflect array stride, top-level array stride, and block
member count.
* Reflect pipeline outputs as well as inputs, optionally from
other stages.
* Add an option to report array variables with trailing [0]
suffix.
* Include array index in reflected uniform names more
consistently.
* Add options to control how reflection information is built
* Move TObjectReflection into public interface to clean up
reflection.
-------------------------------------------------------------------
Tue Feb 19 09:48:37 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Update to new upstream release 7.11.3113
* Implement GL_EXT_scalar_block_layout
* GLSL: Increase supported sizes of XBF strides and offsets
* Update to newer SPIRV-Tools, including VK_EXT_scalar_block_layout
* Implement GL_EXT_fragment_invocation_density
* SPV: Generate OpArrayLength with no signedness
* SPV: For GLSL only, bitcast OpArrayLength result back to int
* Rename GL_KHX_shader_explicit_arithmetic_types to
GL_EXT_shader_explicit_arithmetic_types
* Add support for GL_EXT_YUV_target
-------------------------------------------------------------------
Tue Dec 4 09:10:17 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
- Update to new upstream release 7.10.2984
* Updated type conversion rules for HLSL frontend
* HLSL: implemented c register handling
* HLSL: fix invalid spir-v vector * scalar for float1
-------------------------------------------------------------------
Mon Nov 12 16:12:41 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
- Update to new upstream release 7.9.2933
* Add a SPIRV-Tools validator
* GLSL: Remove use of "__" in the implementation of keywords
having "__".
* Add GL_EXT_shader_atomic_int64
* Add ES 320 support and additional error checks for
SPV_NV_mesh_shader.
-------------------------------------------------------------------
Fri Aug 24 07:02:34 UTC 2018 - jengelh@inai.de
- Update to new upstream release 7.8.2853
* Link/SPV: Correct symbol IDs on merging ASTs to a single coherent space.
* Add missing OpExtension SPV_EXT_descriptor_indexing for dynamic indexing
capabilities.
* GLSL/Vulkan: Warn about arrays of arrays of resources that need bindings.
* GLSL/SPV: Implement SPV_EXT_descriptor_indexing and
GL_EXT_nonuniform_qualifier.
* Implement GL_NV_shader_subgroup_partitioned.
* Add support for GL_NV_shader_noperspective_interpolation.
- Add ver.diff.
-------------------------------------------------------------------
Thu Mar 8 00:39:46 UTC 2018 - jengelh@inai.de
- Update to 6.2.2604
* SPV: Implement Vulkan 1.1 features and extensions.
-------------------------------------------------------------------
Wed Feb 7 22:51:46 UTC 2018 - jengelh@inai.de
- Update to new snapshot 3.0.g1817
* HLSL: Include built-in processing for vertex input and fragment output flattening.
* HLSL: Flatten structs for all non-arrayed I/O interfaces.
* SPV: Implement extension SPV_EXT_shader_stencil_export
* HLSL: handle clip and cull distance input builtin type conversion
* SPV: 1st pass implementation of SPV_EXT_shader_viewport_index_layer.
* HLSL: add geometry stage support for clip/cull distance
* Add support for GL_OES_EGL_image_external_essl3
* Implement the extension GL_AMD_shader_fragment_mask
* Add implementation of SPV_EXT_fragment_fully_covered
* GLSL: Implement GL_EXT_control_flow_attributes.
-------------------------------------------------------------------
Mon Aug 7 18:14:24 UTC 2017 - jengelh@inai.de
- Update to new snapshot 3.0.g1516
* SPV: Handle nested opaque types as function parameters.
* SPV: Implement new extensions GL_KHX_device_group and
GL_KHX_multiview.
* HLSL: Fix #747: accept 'struct' in front of previously
user-defined type name.
* Rename KHX to EXT to match the released specs.
* PP: Recognize the '::' token, and translate appropriately to
GLSL/HLSL token.
* Added 'GL_core_profile' and 'GL_compatibility_profile' macro
definition to preamble.
* HLSL: Add scoping operator, accept static member functions,
and support calling them.
* HLSL: require tessellation factors to be fixed size arrays
* HLSL: Add namespace grammar and some basic semantics.
* Implement the SPV_KHR_16bit_storage,
GL_AMD_texture_gather_bias_lod, GL_AMD_gpu_shader_int16,
GL_EXT_shadow_samplers, GL_ARB_shader_stencil_export,
GL_OVR_multiview, GL_OVR_multiview2
SPV_KHR_post_depth_coverage extensions.
* Fix NULL pointer dereference in TParseContext::builtInOpCheck.
* GLSL 4.6: Implement atomic counter ops and
SPV_KHR_shader_atomic_counter_ops.
* GLSL 4.6: Implement draw parameters.
* GLSL 4.6: Implement shader group vote.
- Add nodate.diff
-------------------------------------------------------------------
Mon Feb 20 15:12:17 UTC 2017 - jengelh@inai.de
- Update to 3.0.g1115
* Added --vn option to generate a C header file containing a
variable assigned to the hex representation of the shader.
* HLSL: Type sanitization: create non-IO types for var decl and
fn param/ret.
- Drop gccwarn.diff (resolved upstream)
-------------------------------------------------------------------
Sat Feb 4 23:45:26 UTC 2017 - jengelh@inai.de
- Update to 3.0.g1077
* Support SPV_NV_viewport_array2 and SPV_NV_stereo_view_rendering
* Implement SPV_KHR_subgroup_vote
* Add EOpD3DCOLORtoUBYTE4 decomposition
* Add support for SPV_NV_geometry_shader_passthrough and
SPV_NV_sample_mask_override_coverage
* Add UAV (image) binding offset and HLSL register support
- Add gccwarn.diff
-------------------------------------------------------------------
Mon Oct 31 22:28:28 UTC 2016 - jengelh@inai.de
- Update to 3.0g900
* Added -x option to save SPIR-V as 32-bit hexadecimal numbers to
a text file.
* Add decompositions for some HLSL intrinsics.
* HLSL: Support semantics in function parameter declarations.
* HLSL: Map parameter qualifiers from generic to function-specific
and entry-point specific.
* HLSL: Add texture Load method & decomposition
* HLSL: Add SampleLevel method
* HLSL: Add gather, improve proto generator machine for upcoming
2DMS/Shadow
* HLSL: add 2DMS texture formats, and matching Load / GetDimensions
support
* HLSL: Add shape conversions for scalar -> vector assigments.
* HLSL: Add string basic type and recognize string declaration
grammar.
* HLSL: allow multi-dimensional arrays
-------------------------------------------------------------------
Sun Jun 12 14:06:11 UTC 2016 - jengelh@inai.de
- Update to 2.3g537
* HLSL: Implement proper nesting of symbol-table scopes and
identifier searching.
* HLSL: Add all int/float/bool/uint matrix types, void for
functions, and a few others.
* Types: Add an isOpaque() helper
* remapper: do not eliminate interface variables in dce by default
* Initial implementation of direct-mapped subset of HLSL intrinsics
with type subset.
* SPV: Don't shadow sampler parameters when performing function calls
* Check for linking multiple ES shaders to the same stage
* Vulkan: Finish semantics for what creates spec-const-semantics.
* HLSL: Add more matrix types to the grammar.
* Full stack: distinguish between a scalar and a vector of size 1.
* SPV: Don't emit memory barrier for ESSL barrier(), but still do
for GLSL barrier().
* Add support for querying vertex attributes in reflection API
* SPV: Don't add clip/cull distance capabilities unless used.
* Tests: Add a set of gtest-file-based HLSL tests.
* SPV: Handle matrix's OpFConvert vector by vector.
* HLSL: Add function call syntax and AST building.
* SPV: Add capability ImageGatherExtended if necessary.
* SPIR-V do not decorate: members of plain structs with location;
non-top level members with interp.
-------------------------------------------------------------------
Tue Apr 26 18:35:34 UTC 2016 - jengelh@inai.de
- Update to 2.3.g401
* Fix compile error involving std::isinf
- Drop badcode.diff (merged upstream)
-------------------------------------------------------------------
Wed Feb 17 11:06:24 UTC 2016 - jengelh@inai.de
- Initial package (version 2.3.g244) for build.opensuse.org
- Add badcode.diff

150
glslang.spec Normal file
View File

@ -0,0 +1,150 @@
#
# spec file for package glslang
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define lname libglslang12
Name: glslang
Version: 12.1.0
Release: 0
Summary: OpenGL and OpenGL ES shader front end and validator
License: BSD-3-Clause
Group: Development/Libraries/C and C++
URL: https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
#Git-URL: https://github.com/KhronosGroup/glslang
Source: https://github.com/KhronosGroup/glslang/archive/%version.tar.gz
Source3: baselibs.conf
BuildRequires: bison
BuildRequires: cmake >= 3.14.0
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: python3-base
%description
glslang is a compiler front end for the OpenGL ES and OpenGL shading
languages. It implements a strict interpretation of the
specifications for these languages.
%package -n %lname
Summary: OpenGL and OpenGL ES shader front end implementation
Group: System/Libraries
%description -n %lname
glslang is a compiler front end for the OpenGL ES and OpenGL shading
languages. It implements a strict interpretation of the
specifications for these languages.
%package devel
Summary: OpenGL and OpenGL ES shader front end and validator
Group: Development/Libraries/C and C++
Requires: %lname = %version
%description devel
glslang is a compiler front end for the OpenGL ES and OpenGL shading
languages. It implements a strict interpretation of the
specifications for these languages.
spirv-remap is a utility to improve compression of SPIR-V binary
files via entropy reduction, plus optional stripping of debug
information and load/store optimization. It transforms SPIR-V to
SPIR-V, remapping IDs. The resulting modules have an increased ID
range (IDs are not as tightly packed around zero), but will compress
better when multiple modules are compressed together, since
compressor's dictionary can find better cross module commonality.
%package nonstd-devel
Summary: Secondary set of header files for glslang
Group: Development/Libraries/C and C++
Requires: %lname = %version
BuildArch: noarch
%description nonstd-devel
glslang is a compiler front end for the OpenGL ES and OpenGL shading
languages. It implements a strict interpretation of the
specifications for these languages.
This package contains additional headers that are not officially installed,
but which some downstream packages rely on.
%prep
%autosetup -p1
%build
%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
echo "V_%version { global: *; };" >/tmp/z.sym
# Trim -Wl,--no-undefined for now (https://github.com/KhronosGroup/glslang/issues/1484)
%cmake -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now"
%make_build
%install
%global _lto_cflags %_lto_cflags -ffat-lto-objects
od="$PWD"
%cmake_install
b="%buildroot"
pushd "$b"
(
find usr/include -mindepth 1 -type d -printf "%%%%dir /%p\n"
find usr/include "(" -type f -o -type l ")" -printf "/%p\n"
) | sort >"$od/devel.files"
popd
mkdir -p "$b/%_includedir"
cp -a SPIRV StandAlone glslang "$b/%_includedir/"
find "$b/%_includedir/" -type f ! -iname "*.h" -a ! -iname "*.hpp" -print -delete
ln -s SPIRV/spirv.hpp "$b/%_includedir/"
find "$b/%_includedir/" -type f -exec chmod a-x "{}" "+"
pushd "$b"
(
find usr/include -mindepth 1 -type d -printf "%%%%dir /%p\n"
find usr/include "(" -type f -o -type l ")" -printf "/%p\n"
) | sort >"$od/devel_full.files"
popd
comm -13 "$od/devel.files" "$od/devel_full.files" >"$od/devel2.files"
# 3rd party programs use -lOGLCompiler (because pristine glslang shipped .a files),
# so satisfy them under our shared build.
for i in libOGLCompiler libOSDependent libGenericCodeGen libMachineIndependent; do
ln -s libglslang.so "$b/%_libdir/$i.so"
rm -f "$b/%_libdir/$i.a"
done
%fdupes %buildroot/%_prefix
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%_libdir/*.so.12*
%files devel -f devel.files
%_bindir/gls*
%_bindir/spirv*
%_libdir/cmake/
%_libdir/*resource*.so
%_libdir/libGenericCodeGen.so
%_libdir/libHLSL.so
%_libdir/libMachineIndependent.so
%_libdir/libOGLCompiler.so
%_libdir/libOSDependent.so
%_libdir/libSPIRV.so
%_libdir/libSPVRemapper.so
%_libdir/libglslang.so
%files nonstd-devel -f devel2.files
%changelog