vkd3d-proton: initial build
This commit is contained in:
parent
4b0cdd6faa
commit
8bfd5c6ee2
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,6 +20,5 @@ temp/*
|
|||||||
*.deb
|
*.deb
|
||||||
a/*
|
a/*
|
||||||
b/*
|
b/*
|
||||||
extras/vkd3d-proton/*
|
|
||||||
order.txt
|
order.txt
|
||||||
build.sh
|
build.sh
|
||||||
|
7
extras/vkd3d-proton/fix-exponent-in-build.h.patch
Normal file
7
extras/vkd3d-proton/fix-exponent-in-build.h.patch
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
--- a/vkd3d_build.h.in 2024-06-18 15:10:38.000000000 +0600
|
||||||
|
+++ b/vkd3d_build.h.in 2024-10-22 11:13:31.304081219 +0600
|
||||||
|
@@ -1,3 +1,3 @@
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
-static const uint64_t vkd3d_build = 0x@VCS_TAG@;
|
||||||
|
+static const uint64_t vkd3d_build = 0x@VCS_TAG@p0;
|
11
extras/vkd3d-proton/vkd3d-proton-includes.patch
Normal file
11
extras/vkd3d-proton/vkd3d-proton-includes.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/meson.build 2024-10-22 16:04:20.044440511 +0600
|
||||||
|
+++ b/meson.build 2024-10-22 16:15:19.215314456 +0600
|
||||||
|
@@ -53,7 +53,7 @@
|
||||||
|
add_project_arguments('-DVKD3D_ENABLE_BREADCRUMBS', language : 'c')
|
||||||
|
endif
|
||||||
|
|
||||||
|
-vkd3d_external_includes = [ './khronos/Vulkan-Headers/include', './khronos/SPIRV-Headers/include' ]
|
||||||
|
+vkd3d_external_includes = [ get_option('includedir') ]
|
||||||
|
vkd3d_public_includes = [ './include' ] + vkd3d_external_includes
|
||||||
|
vkd3d_private_includes = [ './include/private' ] + vkd3d_public_includes
|
||||||
|
|
137
extras/vkd3d-proton/vkd3d-proton.spec
Normal file
137
extras/vkd3d-proton/vkd3d-proton.spec
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
%undefine _annotated_build
|
||||||
|
|
||||||
|
%global dxil_spirv_rev 41dae24cdba6771ceede9d45dae1c8580c147ce4
|
||||||
|
|
||||||
|
Name: vkd3d-proton
|
||||||
|
Version: 2.13
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: D3D12 to Vulkan translation library
|
||||||
|
|
||||||
|
License: LGPLv2+
|
||||||
|
URL: https://github.com/HansKristian-Work/vkd3d-proton
|
||||||
|
Source0: https://github.com/HansKristian-Work/vkd3d-proton/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# git clone https://github.com/HansKristian-Work/dxil-spirv.git
|
||||||
|
# cd dxil-spirv/
|
||||||
|
# git reset --hard %{dxil_spirv_rev}
|
||||||
|
# git submodule init
|
||||||
|
# git submodule update
|
||||||
|
# cd ..
|
||||||
|
# tar -cJf dxil-spirv.tar.xz dxil-spirv/
|
||||||
|
Source2: dxil-spirv.tar.xz
|
||||||
|
|
||||||
|
Patch0: vkd3d-proton-includes.patch
|
||||||
|
Patch1: fix-exponent-in-build.h.patch
|
||||||
|
|
||||||
|
BuildRequires: clang
|
||||||
|
BuildRequires: meson
|
||||||
|
BuildRequires: ninja-build
|
||||||
|
BuildRequires: glslang
|
||||||
|
BuildRequires: vulkan-headers >= 1.3.289
|
||||||
|
BuildRequires: wine-devel
|
||||||
|
|
||||||
|
%ifnarch %ix86
|
||||||
|
BuildRequires: mingw32-filesystem >= 95
|
||||||
|
BuildRequires: mingw32-gcc >= 8.1
|
||||||
|
BuildRequires: mingw32-gcc-plugin-devel
|
||||||
|
BuildRequires: mingw32-vulkan-headers >= 1.3.289
|
||||||
|
BuildRequires: mingw-w64-tools
|
||||||
|
BuildRequires: mingw64-filesystem >= 95
|
||||||
|
BuildRequires: mingw64-gcc >= 8.1
|
||||||
|
BuildRequires: mingw64-gcc-plugin-devel
|
||||||
|
BuildRequires: mingw64-vulkan-headers >= 1.3.289
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description
|
||||||
|
vkd3d-proton is a fork of VKD3D, which aims to implement the
|
||||||
|
full Direct3D 12 API on top of Vulkan. The project serves
|
||||||
|
as the development effort for Direct3D 12 support in Proton..
|
||||||
|
|
||||||
|
|
||||||
|
%ifnarch %ix86
|
||||||
|
%package -n mingw32-%{name}
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
|
||||||
|
%description -n mingw32-%{name}
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n mingw64-%{name}
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
|
||||||
|
%description -n mingw64-%{name}
|
||||||
|
%{summary}.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Header files for %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
|
||||||
|
pushd subprojects
|
||||||
|
tar -xf %{SOURCE2}
|
||||||
|
popd
|
||||||
|
|
||||||
|
%build
|
||||||
|
export CC=clang
|
||||||
|
export CXX=clang++
|
||||||
|
|
||||||
|
CFLAGS="-I$(pwd)/subprojects/dxil-spirv/third_party/spirv-headers/include %{optflags}"
|
||||||
|
CXXFLAGS="-I$(pwd)/subprojects/dxil-spirv/third_party/spirv-headers/include %{optflags}"
|
||||||
|
|
||||||
|
# These flags are taken from Proton
|
||||||
|
CFLAGS+=" -mfpmath=sse -fwrapv -fno-strict-aliasing"
|
||||||
|
CXXFLAGS+=" -mfpmath=sse -fwrapv -fno-strict-aliasing"
|
||||||
|
|
||||||
|
export CFLAGS CXXFLAGS
|
||||||
|
export LDFLAGS="-Wl,-O1,--sort-common,--as-needed"
|
||||||
|
|
||||||
|
# Native libs
|
||||||
|
%meson --buildtype release
|
||||||
|
%ninja_build -C %{_target_platform}
|
||||||
|
|
||||||
|
%ifnarch %ix86
|
||||||
|
# Mingw x64
|
||||||
|
%mingw_meson \
|
||||||
|
-Denable_tests=false
|
||||||
|
|
||||||
|
%mingw_ninja
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%install
|
||||||
|
%ninja_install -C %{_target_platform}
|
||||||
|
|
||||||
|
%ifnarch %ix86
|
||||||
|
mkdir -p %{buildroot}%{mingw64_libdir}
|
||||||
|
mkdir -p %{buildroot}%{mingw32_libdir}
|
||||||
|
|
||||||
|
install -o root -m 0755 build_win64/libs/{d3d12/d3d12.dll,d3d12core/d3d12core.dll} %{buildroot}%{mingw64_libdir}/
|
||||||
|
install -o root -m 0755 build_win32/libs/{d3d12/d3d12.dll,d3d12core/d3d12core.dll} %{buildroot}%{mingw32_libdir}/
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%{_libdir}/libvkd3d-proton-d3d12*.so
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_includedir}/vkd3d-proton/*.h
|
||||||
|
%{_libdir}/pkgconfig/libvkd3d-proton.pc
|
||||||
|
|
||||||
|
%ifnarch %ix86
|
||||||
|
%files -n mingw64-%{name}
|
||||||
|
%license LICENSE
|
||||||
|
%{mingw64_libdir}/d3d12*.dll
|
||||||
|
|
||||||
|
%files -n mingw32-%{name}
|
||||||
|
%license LICENSE
|
||||||
|
%{mingw32_libdir}/d3d12*.dll
|
||||||
|
%endif
|
Loading…
x
Reference in New Issue
Block a user