summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorStelios Tsampas2024-03-05 20:16:04 +0200
committerStelios Tsampas2024-03-05 20:16:04 +0200
commitbf6321ed6d2ef80f12ec3bbd58e073f3df1f1911 (patch)
tree3ce4e775d8153dd4ff527b57927f48e099c7c220 /PKGBUILD
parent2c500b63f1f301bff013fb9f170a56eb1cf67b31 (diff)
downloadaur-vkd3d-proton-mingw-git.tar.gz
[vkd3d-proton-mingw-git] Set mtune=generic and allow avx to be enabled
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD35
1 files changed, 14 insertions, 21 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b8269f45f23d..c3a6e412f3a5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: loathingkernel <loathingkernel @at gmail .dot com>
pkgname=vkd3d-proton-mingw-git
-pkgver=2.11.1.r37.g730933dc
+pkgver=2.11.1.r120.gf1f18996
pkgrel=1
pkgdesc='Fork of VKD3D. Development branches for Protons Direct3D 12 implementation'
arch=('x86_64')
@@ -43,31 +43,24 @@ prepare() {
local -A flags
for opt in "${split[@]}"; do flags["${opt%%=*}"]="${opt##*=}"; done
local march="${flags["-march"]:-nocona}"
- local mtune="${flags["-mtune"]:-core-avx2}"
+ local mtune="generic" #"${flags["-mtune"]:-core-avx2}"
- export CFLAGS="-O2 -march=$march -mtune=$mtune -pipe"
- export CXXFLAGS="-O2 -march=$march -mtune=$mtune -pipe"
- export LDFLAGS="-Wl,-O1,--sort-common,--as-needed"
+ CFLAGS="-O3 -march=$march -mtune=$mtune -pipe"
+ CXXFLAGS="-O3 -march=$march -mtune=$mtune -pipe"
+ LDFLAGS="-Wl,-O1,--sort-common,--as-needed"
# These flags are taken from Proton
CFLAGS+=" -mfpmath=sse -fwrapv -fno-strict-aliasing"
CXXFLAGS+=" -mfpmath=sse -fwrapv -fno-strict-aliasing -std=c++17"
LDFLAGS+=" -Wl,--file-alignment,4096"
- # If using -march= with a CPU that supports supports AVX, launching a 32bit
- # d3d9 game can cause an Unhandled exception. The cause seems to be the
- # combination of AVX instructions and tree vectorization (implied by O3),
- # all tested archictures from sandybridge to haswell are affected.
- # Disabling AVX (and AVX2 as a side-effect).
- # Since Wine 5.16 AVX is supported. Testing showed 32bit applications
- # crashing with AVX regardless, but 64bit applications worked just fine.
- # So disable AVX only for the 32bit binaries and AVX2 for the 64bit.
- # AVX2 seems to degrade performance. So disregard the above.
- # Relevant Wine issues
- # https://bugs.winehq.org/show_bug.cgi?id=45289
- # https://bugs.winehq.org/show_bug.cgi?id=43516
- CFLAGS+=" -mno-avx2 -mno-avx"
- CXXFLAGS+=" -mno-avx2 -mno-avx"
+ # AVX is "hard" disabled for 32bit in any case.
+ # AVX/AVX2 for 64bit is disabled below.
+ # Seems unnecessery for 64bit if -mtune=generic is used
+ #CFLAGS+=" -mno-avx2 -mno-avx"
+ #CXXFLAGS+=" -mno-avx2 -mno-avx"
+
+ export CFLAGS CXXFLAGS LDFLAGS
local cross_ldflags="$LDFLAGS"
@@ -92,8 +85,8 @@ build() {
--cross-file vkd3d-proton/build-win64.txt \
--bindir "" --libdir "" \
--buildtype "plain" \
- --strip \
- -Denable_tests=false
+ -Denable_tests=false \
+ --strip
ninja -C "build/x64" -v
meson setup vkd3d-proton "build/x86" \