forked from pool/shaderc
This commit is contained in:
commit
98e4fcd99d
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
56
0001-Use-system-third-party-libs.patch
Normal file
56
0001-Use-system-third-party-libs.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
From: Martin Herkt <lachs0r@srsfckn.biz>
|
||||||
|
Date: Fri, 3 Nov 2017 11:58:14 +0100
|
||||||
|
Subject: [PATCH 1/2] Use system third party libs
|
||||||
|
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 8 --------
|
||||||
|
glslc/CMakeLists.txt | 2 +-
|
||||||
|
libshaderc/CMakeLists.txt | 2 ++
|
||||||
|
3 files changed, 3 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
Index: shaderc-2018.0/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- shaderc-2018.0.orig/CMakeLists.txt
|
||||||
|
+++ shaderc-2018.0/CMakeLists.txt
|
||||||
|
@@ -61,15 +61,7 @@ endif(MSVC)
|
||||||
|
|
||||||
|
# Configure subdirectories.
|
||||||
|
# We depend on these for later projects, so they should come first.
|
||||||
|
-add_subdirectory(third_party)
|
||||||
|
-
|
||||||
|
add_subdirectory(libshaderc_util)
|
||||||
|
add_subdirectory(libshaderc)
|
||||||
|
add_subdirectory(glslc)
|
||||||
|
add_subdirectory(examples)
|
||||||
|
-
|
||||||
|
-add_custom_target(build-version
|
||||||
|
- ${PYTHON_EXE}
|
||||||
|
- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
|
||||||
|
- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR}
|
||||||
|
- COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).")
|
||||||
|
Index: shaderc-2018.0/glslc/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- shaderc-2018.0.orig/glslc/CMakeLists.txt
|
||||||
|
+++ shaderc-2018.0/glslc/CMakeLists.txt
|
||||||
|
@@ -18,7 +18,7 @@ add_library(glslc STATIC
|
||||||
|
shaderc_default_compile_options(glslc)
|
||||||
|
target_include_directories(glslc PUBLIC ${glslang_SOURCE_DIR})
|
||||||
|
target_link_libraries(glslc PRIVATE glslang OSDependent OGLCompiler
|
||||||
|
- HLSL glslang SPIRV ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
+ HLSL glslang SPIRV SPVRemapper ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
target_link_libraries(glslc PRIVATE shaderc_util shaderc)
|
||||||
|
|
||||||
|
add_executable(glslc_exe src/main.cc)
|
||||||
|
Index: shaderc-2018.0/libshaderc/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- shaderc-2018.0.orig/libshaderc/CMakeLists.txt
|
||||||
|
+++ shaderc-2018.0/libshaderc/CMakeLists.txt
|
||||||
|
@@ -43,6 +43,8 @@ set(SHADERC_LIBS
|
||||||
|
shaderc_util
|
||||||
|
SPIRV # from glslang
|
||||||
|
SPIRV-Tools
|
||||||
|
+ SPVRemapper
|
||||||
|
+ HLSL
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(shaderc PRIVATE ${SHADERC_LIBS})
|
14
_service
Normal file
14
_service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<services>
|
||||||
|
<service name="tar_scm" mode="disabled">
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="url">git://github.com/google/shaderc</param>
|
||||||
|
<param name="revision">v2018.0</param>
|
||||||
|
<param name="parent-tag">v2018.0</param>
|
||||||
|
<param name="versionformat">2018.0</param>
|
||||||
|
</service>
|
||||||
|
<service name="recompress" mode="disabled">
|
||||||
|
<param name="file">*.tar</param>
|
||||||
|
<param name="compression">xz</param>
|
||||||
|
</service>
|
||||||
|
<service name="set_version" mode="disabled"/>
|
||||||
|
</services>
|
3
shaderc-2018.0.tar.xz
Normal file
3
shaderc-2018.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1af380ec0a5b442b6e8bd0e076e4d8b24ef3630f60158eba63cfe26ea1d34ba9
|
||||||
|
size 152284
|
76
shaderc.changes
Normal file
76
shaderc.changes
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 14 23:08:14 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Update to new upstream release 2018.0
|
||||||
|
* Support -fhlsl_functionality1 (also -fhlsl-functionality1)
|
||||||
|
* Support NVIDIA Turing extensions. Requires updated Glslang
|
||||||
|
and SPIRV-Tools.
|
||||||
|
* Use SPIR-V optimization and HLSL legalization recipes from
|
||||||
|
SPIRV-Tools.
|
||||||
|
* Pass target environment into SPIRV-Tools code, e.g. from
|
||||||
|
--target-env vulkan1.1 .
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Mar 31 16:32:38 UTC 2018 - 9+suse@cirno.systems
|
||||||
|
|
||||||
|
- Update to version 20180329.g2a0f3a3:
|
||||||
|
* Use standard SPIRV-Tools transformation recipes
|
||||||
|
* Locate clang for Linux buildbots. (#446)
|
||||||
|
* Support setting target environment version, e.g. Vulkan 1.1
|
||||||
|
* Re-enable the Windows continuous Debug builds. (#444)
|
||||||
|
* Add build result badges to README. (#439)
|
||||||
|
* Glslang generator version 6
|
||||||
|
* Glslang generator version 5
|
||||||
|
* Update glslc README for -fauto-map-locations
|
||||||
|
* Add glslc tests for -fauto-map-locations
|
||||||
|
* Fix setting of debug DLL name for AppVeyor
|
||||||
|
* Adding kokoro build configurations. (#429)
|
||||||
|
* AppVeyor packaging: debug DLL name no longer has extra "d"
|
||||||
|
* Start v2018.0-dev
|
||||||
|
* Finalize v2017.2
|
||||||
|
* copyright check: Skip auto-generated CMakeFiles
|
||||||
|
* Update CHANGES for -fauto-map-locations
|
||||||
|
* Glslang now requires bindings on resources
|
||||||
|
* Add -fauto-map-locations option
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 23 02:20:35 UTC 2018 - 9+suse@cirno.systems
|
||||||
|
|
||||||
|
- Update to version 20180207.g563bc6e:
|
||||||
|
* Add a virtual destructor, otherwise Clang 6.0complains about delete being called on an abstract class.
|
||||||
|
* Skip Debug builds for VS 2013 and VS 2015
|
||||||
|
* Glslang updated its generator version number to 4
|
||||||
|
* Android.mk: add glslang/MachineIndependent/attribute.cpp
|
||||||
|
* Make tests resilient to better SPIR-V optimizations
|
||||||
|
* Travis CI: install pip and set clone depth to 1
|
||||||
|
* Adapt to Glslang codegen version update
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 23 21:57:06 UTC 2017 - 9@cirno.systems
|
||||||
|
|
||||||
|
- Update to version 20171030.g98ab88b:
|
||||||
|
* glslc tests: Relax version word check
|
||||||
|
* Avoid -fPIC for MinGW builds
|
||||||
|
* Allow override of SPVTOOLS_LOCAL_PATH
|
||||||
|
* Move spirv-tools build from third_party/Android.mk
|
||||||
|
* Update CHANGES
|
||||||
|
* Adapt to Glslang generator version number change
|
||||||
|
* Travis CI: use make to build
|
||||||
|
* Add HLSL legalization passes to compiler.cc
|
||||||
|
* Add SPIRV-Tools optimizer files for linker
|
||||||
|
* Added more opt passes to PassId enum
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 22 14:00:28 UTC 2017 - 9@cirno.systems
|
||||||
|
|
||||||
|
- Re-add explicit version dependencies
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 20 22:21:12 UTC 2017 - 9@cirno.systems
|
||||||
|
|
||||||
|
- Drop explicit version dependency on spirv-tools
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 3 13:01:32 UTC 2017 - 9@cirno.systems
|
||||||
|
|
||||||
|
- init
|
90
shaderc.spec
Normal file
90
shaderc.spec
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
#
|
||||||
|
# spec file for package shaderc
|
||||||
|
#
|
||||||
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# 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/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: shaderc
|
||||||
|
%define lname libshaderc_shared1
|
||||||
|
Version: 2018.0
|
||||||
|
Release: 0
|
||||||
|
Summary: A collection of tools, libraries and tests for shader compilation
|
||||||
|
License: Apache-2.0
|
||||||
|
Group: Development/Tools/Other
|
||||||
|
Url: https://github.com/google/shaderc
|
||||||
|
Source: %name-%version.tar.xz
|
||||||
|
Patch1: 0001-Use-system-third-party-libs.patch
|
||||||
|
BuildRequires: c++_compiler
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: python-xml
|
||||||
|
BuildRequires: spirv-tools-devel >= 2017.0.g103
|
||||||
|
BuildRequires: spirv-headers >= 1.2
|
||||||
|
BuildRequires: glslang-devel >= 3.0.g1685
|
||||||
|
|
||||||
|
%description
|
||||||
|
A collection of tools, libraries and tests for shader compilation.
|
||||||
|
At the moment, included are:
|
||||||
|
|
||||||
|
* glslc, a command line compiler for GLSL/HLSL to SPIR-V, and
|
||||||
|
* libshaderc, a library API for doing the same.
|
||||||
|
|
||||||
|
Shaderc wraps around core functionality in glslang and SPIRV-Tools.
|
||||||
|
|
||||||
|
%package -n %lname
|
||||||
|
Summary: SPIR-V shader compiler library
|
||||||
|
Group: System/Libraries
|
||||||
|
|
||||||
|
%description -n %lname
|
||||||
|
A compiler library for GLSL/HLSL to SPIR-V.
|
||||||
|
|
||||||
|
Shaderc wraps around core functionality in glslang and SPIRV-Tools
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Header files for the shaderc library
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Requires: %lname = %version
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
A compiler library for GLSL/HLSL to SPIR-V.
|
||||||
|
|
||||||
|
Shaderc wraps around core functionality in glslang and SPIRV-Tools
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
echo '"${version}"' >glslc/src/build-version.inc
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cmake -DSHADERC_SKIP_TESTS=ON
|
||||||
|
%make_jobs
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cmake_install
|
||||||
|
rm %buildroot/%_libdir/*.a
|
||||||
|
|
||||||
|
%post -n %lname -p /sbin/ldconfig
|
||||||
|
%postun -n %lname -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc LICENSE
|
||||||
|
%_bindir/glslc
|
||||||
|
|
||||||
|
%files -n %lname
|
||||||
|
%_libdir/libshaderc_shared.so.1*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%_includedir/shaderc/
|
||||||
|
%_libdir/libshaderc_shared.so
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue
Block a user