summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStelios Tsampas2024-03-05 20:15:27 +0200
committerStelios Tsampas2024-03-05 20:15:27 +0200
commit37a9220a5e3cf334a72fa44b03d9d8446606ecf1 (patch)
tree0d5de1e5b6504a2e6b4b93dfff12164023b99b45
parent611e3072f2937d1b7b2d317c4f38ab2d8499c1d3 (diff)
downloadaur-dxvk-nvapi-mingw-git.tar.gz
[dxvk-nvapi-mingw-git] Set mtune=generic and allow avx to be enabled
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD35
2 files changed, 15 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 547a92da95bc..13f03a73a8c2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = dxvk-nvapi-mingw-git
pkgdesc = Alternative NVAPI implementation on top of DXVK
- pkgver = 0.6.4.r48.g0951afb
+ pkgver = 0.6.4.r57.gb54c9fe
pkgrel = 1
url = https://github.com/jp7677/dxvk-nvapi
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 0164d45a0c7b..2dee0309e88f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: loathingkernel <loathingkernel @at gmail .dot com>
pkgname=dxvk-nvapi-mingw-git
-pkgver=0.6.4.r48.g0951afb
+pkgver=0.6.4.r57.gb54c9fe
pkgrel=1
pkgdesc='Alternative NVAPI implementation on top of DXVK'
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() {
--prefix "/usr/share/dxvk-nvapi/x64" \
--bindir "" --libdir "" \
--buildtype "plain" \
- --strip \
- -Denable_tests=false
+ -Denable_tests=false \
+ --strip
ninja -C "build/x64" -v
meson setup dxvk-nvapi "build/x32" \