# # spec file for package glslang # # Copyright (c) 2021 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 libglslang11 Name: glslang Version: 11.4.0 Release: 1.2 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 Patch1: 0001-build-set-SOVERSION-on-all-libraries.patch BuildRequires: bison BuildRequires: cmake >= 2.8 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. %prep %autosetup -p1 %build %global _lto_cflags %{?_lto_cflags} -ffat-lto-objects # 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 %cmake_install b="%buildroot" find "$b" -type f -name "*.a" -print -delete mkdir -p "$b/%_includedir" cp -a SPIRV 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 "{}" "+" cp build/StandAlone/libglslang-default-resource-limits.so "$b/%_libdir/" # 3rd party programs use -lOGLCompiler (because pristine glslang ships .a files), # so satisfy them under our shared build. ln -s libglslang.so "$b/%_libdir/libOGLCompiler.so" ln -s libglslang.so "$b/%_libdir/libOSDependent.so" %fdupes %buildroot/%_prefix %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig %files -n %lname %_libdir/*.so.11* %files devel %_bindir/gls* %_bindir/spirv* %_libdir/cmake/ %_libdir/*resource*.so %_libdir/libHLSL.so %_libdir/libOGLCompiler.so %_libdir/libOSDependent.so %_libdir/libSPIRV.so %_libdir/libSPVRemapper.so %_libdir/libglslang.so %_includedir/* %changelog * Wed May 5 2021 Jan Engelhardt - 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 2021 Jan Engelhardt - Update to release 11.2.0 * Add support for GL_EXT_shared_memory_block * Implement GL_EXT_null_initializer * Mon Jan 18 2021 Jan Engelhardt - 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 2020 Jan Engelhardt - Add 0001-build-set-SOVERSION-on-all-libraries.patch * Thu Aug 13 2020 Jan Engelhardt - 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 2020 Jan Engelhardt - 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 2020 Antonio Larrosa - Fix build when _lto_cflags is not defined (as in SLE/Leap) * Sun Jan 19 2020 Jan Engelhardt - 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 2019 Jan Engelhardt - 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 2019 Jan Engelhardt - Drop unused static libraries, functions of libOGLCompilerDLL and libOSDependent are actually present in libglslang already. [boo#1153950] * Sat Sep 7 2019 Jan Engelhardt - Bump SOVER as needed. * Wed Aug 21 2019 Jan Engelhardt - 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 2019 Martin Liška - Use FAT LTO objects in order to provide proper static library. * Fri Jun 28 2019 Jan Engelhardt - 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 2019 Jan Engelhardt - 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 2019 Jan Engelhardt - 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 2019 Jan Engelhardt - 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 2018 Jan Engelhardt - 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 2018 Jan Engelhardt - 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 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 2018 jengelh@inai.de - Update to 6.2.2604 * SPV: Implement Vulkan 1.1 features and extensions. * Wed Feb 7 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 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 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 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 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 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 2016 jengelh@inai.de - Update to 2.3.g401 * Fix compile error involving std::isinf - Drop badcode.diff (merged upstream) * Wed Feb 17 2016 jengelh@inai.de - Initial package (version 2.3.g244) for build.opensuse.org - Add badcode.diff