From b40a3234fc1526471083076fb4e825f11ed2f926 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:31:00 +0000 Subject: import vulkan-1.0.61.1-2.el7 --- diff --git a/.gitignore b/.gitignore index 79e7775..9881847 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -SOURCES/SPIRV-Headers-c470b68225a04965bf87d35e143ae92f831e8110.tar.gz -SOURCES/SPIRV-Tools-37422e9dba1a3a8cb8028b779dd546d43add6ef8.tar.gz -SOURCES/Vulkan-LoaderAndValidationLayers-sdk-1.0.39.1.tar.gz -SOURCES/glslang-807a0d9e2f4e176f75d62ac3c179c81800ec2608.tar.gz +SOURCES/SPIRV-Headers-2bb92e6fe2c6aa410152fc6c63443f452acb1a65.tar.gz +SOURCES/SPIRV-Tools-7e2d26c77b606b21af839b37fd21381c4a669f23.tar.gz +SOURCES/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1.tar.gz +SOURCES/glslang-3a21c880500eac21cdf79bef5b80f970a55ac6af.tar.gz diff --git a/.vulkan.metadata b/.vulkan.metadata index cbc41cd..4afb9d6 100644 --- a/.vulkan.metadata +++ b/.vulkan.metadata @@ -1,4 +1,4 @@ -a8a9d1aa6bb7dd64c59da85f0490cc934919872a SOURCES/SPIRV-Headers-c470b68225a04965bf87d35e143ae92f831e8110.tar.gz -1a04d2d9b8c4e291c9bf6053ef66e24997ad012d SOURCES/SPIRV-Tools-37422e9dba1a3a8cb8028b779dd546d43add6ef8.tar.gz -0e2e99d0989413f9a8d6b6e69c11dc0b68b71347 SOURCES/Vulkan-LoaderAndValidationLayers-sdk-1.0.39.1.tar.gz -4d60db54f2f38ae4c7b2a22f18ab47a5f1d5f3f8 SOURCES/glslang-807a0d9e2f4e176f75d62ac3c179c81800ec2608.tar.gz +f808e444c00018d4d69bf249b5890860cd3cb379 SOURCES/SPIRV-Headers-2bb92e6fe2c6aa410152fc6c63443f452acb1a65.tar.gz +eff9b5c3aa101d792971fa4db144104d72c5c687 SOURCES/SPIRV-Tools-7e2d26c77b606b21af839b37fd21381c4a669f23.tar.gz +5fae48e2cf2f615c1788cddb2ffdc510b291a29e SOURCES/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1.tar.gz +744345efadecd66fc4c071dedea560f337458bcc SOURCES/glslang-3a21c880500eac21cdf79bef5b80f970a55ac6af.tar.gz diff --git a/SOURCES/0001-loader-Fix-TEXTREL-on-32-bit-linux-loader.patch b/SOURCES/0001-loader-Fix-TEXTREL-on-32-bit-linux-loader.patch new file mode 100644 index 0000000..b3491cd --- /dev/null +++ b/SOURCES/0001-loader-Fix-TEXTREL-on-32-bit-linux-loader.patch @@ -0,0 +1,26 @@ +From 560f9cdf78d3d03dbf97be638becd1a7df5fa154 Mon Sep 17 00:00:00 2001 +From: Lenny Komow +Date: Fri, 6 Oct 2017 11:13:15 -0600 +Subject: [PATCH] loader: Fix TEXTREL on 32-bit linux loader + +Change-Id: I5fc568ce0ad17c280c484f37b2797eead08169b3 +--- + loader/unknown_ext_chain_gas.asm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/loader/unknown_ext_chain_gas.asm b/loader/unknown_ext_chain_gas.asm +index 798760b..aca92ea 100644 +--- a/loader/unknown_ext_chain_gas.asm ++++ b/loader/unknown_ext_chain_gas.asm +@@ -89,7 +89,7 @@ vkPhysDevExtTermin\num: + terminError\num: + mov eax, [eax + INSTANCE_OFFSET_ICD_TERM] # Load the loader_instance into eax + push [eax + (HASH_OFFSET_INSTANCE + (HASH_SIZE * \num) + FUNC_NAME_OFFSET_HASH)] # Push the func name (fifth arg) +- push offset termin_error_string # Push the error string (fourth arg) ++ push offset termin_error_string@GOT # Push the error string (fourth arg) + push 0 # Push zero (third arg) + push VK_DEBUG_REPORT_ERROR_BIT_EXT # Push the error logging bit (second arg) + push eax # Push the loader_instance (first arg) +-- +2.9.5 + diff --git a/SOURCES/0003-layers-Don-t-set-an-rpath.patch b/SOURCES/0003-layers-Don-t-set-an-rpath.patch index d914827..edab110 100644 --- a/SOURCES/0003-layers-Don-t-set-an-rpath.patch +++ b/SOURCES/0003-layers-Don-t-set-an-rpath.patch @@ -1,13 +1,13 @@ --- a/tests/layers/CMakeLists.txt +++ b/tests/layers/CMakeLists.txt @@ -4,9 +4,6 @@ - VkLayer_wrap_objects + VkLayer_device_profile_api VkLayer_test ) - -set(VK_LAYER_RPATH /usr/lib/x86_64-linux-gnu/vulkan/layer:/usr/lib/i386-linux-gnu/vulkan/layer) -set(CMAKE_INSTALL_RPATH ${VK_LAYER_RPATH}) - macro(run_vk_xml_generate dependency output) - add_custom_command(OUTPUT ${output} + if (WIN32) + if (NOT (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)) diff --git a/SOURCES/0008-demos-Don-t-build-tri-or-cube.patch b/SOURCES/0008-demos-Don-t-build-tri-or-cube.patch index 6d36ce1..82ff259 100644 --- a/SOURCES/0008-demos-Don-t-build-tri-or-cube.patch +++ b/SOURCES/0008-demos-Don-t-build-tri-or-cube.patch @@ -1,12 +1,9 @@ --- a/demos/CMakeLists.txt +++ b/demos/CMakeLists.txt -@@ -58,48 +58,7 @@ - set (LIBRARIES "${API_LOWERCASE}-${MAJOR}") - elseif(UNIX) - set (LIBRARIES "${API_LOWERCASE}") --else() --endif() -- +@@ -63,46 +63,6 @@ + else() + endif() + -if(WIN32) - # For Windows, since 32-bit and 64-bit items can co-exist, we build each in its own build directory. - # 32-bit target data goes in build32, and 64-bit target data goes into build. So, include/link the @@ -46,11 +43,11 @@ - DEPENDS cube.frag ${GLSLANG_VALIDATOR} - ) - endif() -+else() - endif() +-endif() if(WIN32) -@@ -114,44 +73,6 @@ + include_directories ( +@@ -116,38 +76,6 @@ add_executable(${API_LOWERCASE}info vulkaninfo.c) target_link_libraries(${API_LOWERCASE}info ${LIBRARIES}) @@ -86,13 +83,7 @@ - target_link_libraries(cubepp ${LIBRARIES}) -endif() - --if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})) -- if ((DEMOS_WSI_SELECTION STREQUAL "XCB") OR (DEMOS_WSI_SELECTION STREQUAL "WAYLAND") OR WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "Android")) -- add_subdirectory(smoke) -- endif() --endif() -- - if(UNIX) - install(TARGETS ${API_LOWERCASE}info DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() + if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})) + if ((DEMOS_WSI_SELECTION STREQUAL "XCB") OR (DEMOS_WSI_SELECTION STREQUAL "WAYLAND") OR WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "Android")) + add_subdirectory(smoke) diff --git a/SOURCES/hacked-python2.patch b/SOURCES/hacked-python2.patch index 1a54ffa..fcef20b 100644 --- a/SOURCES/hacked-python2.patch +++ b/SOURCES/hacked-python2.patch @@ -1,6 +1,6 @@ -diff -up Vulkan-LoaderAndValidationLayers-sdk-1.0.39.1/CMakeLists.txt.hackedpy Vulkan-LoaderAndValidationLayers-sdk-1.0.39.1/CMakeLists.txt ---- Vulkan-LoaderAndValidationLayers-sdk-1.0.39.1/CMakeLists.txt.hackedpy 2017-02-21 12:49:19.461906550 +1000 -+++ Vulkan-LoaderAndValidationLayers-sdk-1.0.39.1/CMakeLists.txt 2017-02-21 12:49:27.379949182 +1000 +diff -up Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/CMakeLists.txt.da Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/CMakeLists.txt +--- Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/CMakeLists.txt.da 2017-09-21 02:31:10.000000000 +1000 ++++ Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/CMakeLists.txt 2017-10-04 08:46:02.569350449 +1000 @@ -13,7 +13,6 @@ set(MAJOR "1") string(TOLOWER ${API_NAME} API_LOWERCASE) @@ -8,13 +8,37 @@ diff -up Vulkan-LoaderAndValidationLayers-sdk-1.0.39.1/CMakeLists.txt.hackedpy V -find_package(PythonInterp 3 REQUIRED) if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - include(FindPkgConfig) -diff -up Vulkan-LoaderAndValidationLayers-sdk-1.0.39.1/scripts/lvl_genvk.py.hackedpy Vulkan-LoaderAndValidationLayers-sdk-1.0.39.1/scripts/lvl_genvk.py ---- Vulkan-LoaderAndValidationLayers-sdk-1.0.39.1/scripts/lvl_genvk.py.hackedpy 2017-02-21 13:15:37.565419937 +1000 -+++ Vulkan-LoaderAndValidationLayers-sdk-1.0.39.1/scripts/lvl_genvk.py 2017-02-21 13:15:48.423478704 +1000 + set(FALLBACK_CONFIG_DIRS "/etc/xdg" CACHE STRING +diff -up Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/scripts/lvl_genvk.py.da Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/scripts/lvl_genvk.py +--- Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/scripts/lvl_genvk.py.da 2017-09-21 02:31:10.000000000 +1000 ++++ Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/scripts/lvl_genvk.py 2017-10-04 08:46:02.569350449 +1000 @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/python # # Copyright (c) 2013-2017 The Khronos Group Inc. - # Copyright (c) 2015-2017 LunarG, Inc. + # +diff -up Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/scripts/object_tracker_generator.py.da Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/scripts/object_tracker_generator.py +--- Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/scripts/object_tracker_generator.py.da 2017-10-04 12:25:30.838968488 +1000 ++++ Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/scripts/object_tracker_generator.py 2017-10-04 12:25:39.967216211 +1000 +@@ -242,7 +242,7 @@ class ObjectTrackerOutputGenerator(Outpu + ] + for vuid_filename in vuid_filename_locations: + if os.path.isfile(vuid_filename): +- self.vuid_file = open(vuid_filename, "r", encoding="utf8") ++ self.vuid_file = open(vuid_filename, "r") + break + if self.vuid_file == None: + print("Error: Could not find vk_validation_error_messages.h") +diff -up Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/scripts/parameter_validation_generator.py.da Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/scripts/parameter_validation_generator.py +--- Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/scripts/parameter_validation_generator.py.da 2017-10-04 12:25:34.090056715 +1000 ++++ Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/scripts/parameter_validation_generator.py 2017-10-04 12:25:46.741400047 +1000 +@@ -197,7 +197,7 @@ class ParameterValidationOutputGenerator + ] + for vuid_filename in vuid_filename_locations: + if os.path.isfile(vuid_filename): +- self.vuid_file = open(vuid_filename, "r", encoding="utf8") ++ self.vuid_file = open(vuid_filename, "r") + break + if self.vuid_file == None: + print("Error: Could not find vk_validation_error_messages.h") diff --git a/SOURCES/no-smoke-demo.patch b/SOURCES/no-smoke-demo.patch new file mode 100644 index 0000000..93a0d8a --- /dev/null +++ b/SOURCES/no-smoke-demo.patch @@ -0,0 +1,16 @@ +diff -up Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/demos/CMakeLists.txt.da Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/demos/CMakeLists.txt +--- Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/demos/CMakeLists.txt.da 2017-10-04 12:35:15.939846919 +1000 ++++ Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/demos/CMakeLists.txt 2017-10-04 12:35:22.140015179 +1000 +@@ -76,12 +76,6 @@ endif() + add_executable(${API_LOWERCASE}info vulkaninfo.c) + target_link_libraries(${API_LOWERCASE}info ${LIBRARIES}) + +-if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})) +- if ((DEMOS_WSI_SELECTION STREQUAL "XCB") OR (DEMOS_WSI_SELECTION STREQUAL "WAYLAND") OR WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "Android")) +- add_subdirectory(smoke) +- endif() +-endif() +- + if(UNIX) + if(INSTALL_LVL_FILES) + install(TARGETS ${API_LOWERCASE}info DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/SPECS/vulkan.spec b/SPECS/vulkan.spec index f5e6aef..941a0c1 100644 --- a/SPECS/vulkan.spec +++ b/SPECS/vulkan.spec @@ -1,25 +1,22 @@ %global use_git 0 -%global use_layers 1 %global commit d4cd34fd49caa759cf01cafa5fa271401b17c3b9 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global srcname Vulkan-LoaderAndValidationLayers -%if 0%{?use_layers} -%global commit1 807a0d9e2f4e176f75d62ac3c179c81800ec2608 +%global commit1 3a21c880500eac21cdf79bef5b80f970a55ac6af %global srcname1 glslang -%global commit2 37422e9dba1a3a8cb8028b779dd546d43add6ef8 -%global srcname2 SPIRV-Tools +%global commit2 2bb92e6fe2c6aa410152fc6c63443f452acb1a65 +%global srcname2 SPIRV-Headers -%global commit3 c470b68225a04965bf87d35e143ae92f831e8110 -%global srcname3 SPIRV-Headers -%endif +%global commit3 7e2d26c77b606b21af839b37fd21381c4a669f23 +%global srcname3 SPIRV-Tools Name: vulkan -Version: 1.0.39.1 +Version: 1.0.61.1 %if 0%{?use_git} -Release: 0.2.git%{shortcommit}%{?dist} +Release: 0.1.git%{shortcommit}%{?dist} %else Release: 2%{?dist} %endif @@ -33,18 +30,15 @@ Source0: %url/%{srcname}/archive/%{commit}.tar.gz#/%{srcname}-%{commit}.t %else Source0: %url/%{srcname}/archive/sdk-%{version}.tar.gz#/%{srcname}-sdk-%{version}.tar.gz %endif -%if 0%{?use_layers} Source1: %url/%{srcname1}/archive/%{commit1}.tar.gz#/%{srcname1}-%{commit1}.tar.gz Source2: %url/%{srcname2}/archive/%{commit2}.tar.gz#/%{srcname2}-%{commit2}.tar.gz Source3: %url/%{srcname3}/archive/%{commit3}.tar.gz#/%{srcname3}-%{commit3}.tar.gz -%else -Source4: https://raw.githubusercontent.com/KhronosGroup/glslang/master/SPIRV/spirv.hpp -%endif -# All patches taken from ajax's repo -# https://github.com/nwnk/Vulkan-LoaderAndValidationLayers/tree/sdk-1.0.3-fedora + Patch0: 0003-layers-Don-t-set-an-rpath.patch Patch1: 0008-demos-Don-t-build-tri-or-cube.patch Patch2: hacked-python2.patch +Patch3: no-smoke-demo.patch +Patch4: 0001-loader-Fix-TEXTREL-on-32-bit-linux-loader.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -100,19 +94,15 @@ Filesystem for Vulkan. %else %autosetup -p1 -n %{srcname}-sdk-%{version} %endif -%if 0%{?use_layers} + mkdir -p build/ external/glslang/build/install external/spirv-tools/build/ external/spirv-tools/external/spirv-headers tar -xf %{SOURCE1} -C external/glslang --strip 1 -tar -xf %{SOURCE2} -C external/spirv-tools --strip 1 -tar -xf %{SOURCE3} -C external/spirv-tools/external/spirv-headers --strip 1 +tar -xf %{SOURCE2} -C external/spirv-tools/external/spirv-headers --strip 1 +tar -xf %{SOURCE3} -C external/spirv-tools --strip 1 # fix spurious-executable-perm chmod 0644 README.md chmod 0644 external/glslang/SPIRV/spirv.hpp chmod +x scripts/lvl_genvk.py -%else -mkdir -p build/ -cp %{SOURCE4} . -%endif # fix wrong-script-end-of-line-encoding sed -i 's/\r//' README.md @@ -120,37 +110,31 @@ sed -i 's/\r//' README.md sed -i 's/inttypes.h/cinttypes/' layers/*.{cpp,h} %build -%if 0%{?use_layers} pushd external/glslang/build/ CFLAGS="$RPM_OPT_FLAGS" ; export CFLAGS ; CXXFLAGS="$RPM_OPT_FLAGS" ; export CXXFLAGS ; LDFLAGS="$RPM_LD_FLAGS" ; export LDFLAGS ; -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. %make_build make install popd + pushd external/spirv-tools/build/ cmake -DSPIRV_WERROR=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. %make_build popd -%endif + pushd build/ %cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=yes \ -DCMAKE_SKIP_RPATH:BOOL=yes \ -DBUILD_VKJSON=OFF \ - -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \ + -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_datadir} \ -DBUILD_WSI_MIR_SUPPORT=OFF \ %if 0%{?rhel} -DBUILD_WSI_WAYLAND_SUPPORT=OFF \ %endif -%if 0%{?use_layers} .. -%else - -DGLSLANG_SPIRV_INCLUDE_DIR=./ \ - -DBUILD_TESTS=OFF \ - -DBUILD_LAYERS=OFF .. -%endif %make_build popd @@ -159,16 +143,14 @@ pushd build/ %{make_install} popd -%if 0%{?use_layers} -mkdir -p %{buildroot}%{_datadir}/vulkan/implicit_layer.d -mv %{buildroot}%{_sysconfdir}/vulkan/explicit_layer.d/ %{buildroot}%{_datadir}/vulkan/ -%endif +# create the filesystem +mkdir -p %{buildroot}%{_sysconfdir}/vulkan/{explicit,implicit}_layer.d/ \ +%{buildroot}%{_datadir}/vulkan/{explicit,implicit}_layer.d/ \ +%{buildroot}{%{_sysconfdir},%{_datadir}}/vulkan/icd.d # remove RPATH chrpath -d %{buildroot}%{_bindir}/vulkaninfo -mkdir -p %{buildroot}%{_sysconfdir}/vulkan/icd.d - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -176,26 +158,33 @@ mkdir -p %{buildroot}%{_sysconfdir}/vulkan/icd.d %license LICENSE.txt COPYRIGHT.txt %doc README.md CONTRIBUTING.md %{_bindir}/vulkaninfo -%if 0%{?use_layers} %{_datadir}/vulkan/explicit_layer.d/*.json %{_libdir}/libVkLayer_*.so -%endif -%{_libdir}/lib%{name}.so.* +%{_libdir}/libvulkan.so.* %files devel -%{_includedir}/%{name}/ -%{_libdir}/lib%{name}.so +%{_includedir}/vulkan/ +%{_libdir}/pkgconfig/vulkan.pc +%{_libdir}/libvulkan.so %files filesystem -%dir %{_sysconfdir}/vulkan -%dir %{_sysconfdir}/vulkan/icd.d -%if 0%{?use_layers} -%dir %{_datadir}/%{name} -%dir %{_datadir}/%{name}/explicit_layer.d -%dir %{_datadir}/%{name}/implicit_layer.d -%endif +%dir %{_sysconfdir}/vulkan/ +%dir %{_sysconfdir}/vulkan/explicit_layer.d/ +%dir %{_sysconfdir}/vulkan/icd.d/ +%dir %{_sysconfdir}/vulkan/implicit_layer.d/ +%dir %{_datadir}/vulkan/ +%dir %{_datadir}/vulkan/explicit_layer.d/ +%dir %{_datadir}/vulkan/icd.d/ +%dir %{_datadir}/vulkan/implicit_layer.d/ %changelog +* Tue Oct 10 2017 Dave Airlie - 1.0.61.1-2 +- fix 32-bit textrels + +* Thu Sep 21 2017 Dave Airlie - 1.0.61.1-1 +- Update to 1.0.61.1 release +- bring spec updates in from Fedora spec. + * Sat Feb 11 2017 Fedora Release Engineering - 1.0.39.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild