summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStelios Tsampas2021-10-18 23:15:20 +0300
committerStelios Tsampas2021-10-19 16:46:00 +0300
commitb9a5bb3327bd4fdb3e6483adc3df893527966864 (patch)
tree4c46803654e55fb6d16868e19a523992b3c4eda4
parentd258542bc2ad824195a6565135b81a7b774c5a2d (diff)
downloadaur-b9a5bb3327bd4fdb3e6483adc3df893527966864.tar.gz
Use proper DXVK patch
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD20
-rw-r--r--dxvk-async.patch523
-rw-r--r--proton-disable_lock.patch61
4 files changed, 35 insertions, 575 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6f0d8ce278c6..d3668ecf02f6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -219,9 +219,9 @@ pkgbase = proton-native
source = https://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86.tar.xz
source = https://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86_64.tar.xz
source = https://github.com/madewokherd/wine-mono/releases/download/wine-mono-6.3.0/wine-mono-6.3.0-x86.tar.xz
+ source = https://raw.githubusercontent.com/Sporif/dxvk-async/1.9.2/dxvk-async.patch
source = wine-winevulkan_fsr.patch
source = wine-more_8x5_res.patch
- source = dxvk-async.patch
source = proton-unfuck_makefile.patch
source = proton-disable_lock.patch
source = proton-user_compat_data.patch
@@ -244,11 +244,11 @@ pkgbase = proton-native
sha256sums = 8fab46ea2110b2b0beed414e3ebb4e038a3da04900e7a28492ca3c3ccf9fea94
sha256sums = b4476706a4c3f23461da98bed34f355ff623c5d2bb2da1e2fa0c6a310bc33014
sha256sums = eb67426ff60ed6395b70437e838883ee08b6189cad84faf036b1a4d7366a34e2
+ sha256sums = 9212a9c42ac8c9c7b9ba7378685b27e7ea0e7a8a8aaac1f3f4d37590ada3e991
sha256sums = b4e9c0c4959fcb3f7b7f25e35e5e0577dac5d54fe18e6edb15852a2a4196f2a2
sha256sums = 9005d8169266ba0b93be30e1475fe9a3697464796f553886c155ec1d77d71215
- sha256sums = acdb652830d642829057a035ebc69481697078a734f57ac974ee5b54454470ff
sha256sums = 8399d0684a9c732bf405a37f1f3cc779435f2c68a8d042382e9e0538576ab854
- sha256sums = 8263a3ffb7f8e7a5d81bfbffe1843d6f84502d3443fe40f065bcae02b36ba954
+ sha256sums = 8be5e0ae9f71d686c72ac094a4eaca14ea288276195d4c0c217a4f3974fbcc70
sha256sums = 20f7cd3e70fad6f48d2f1a26a485906a36acf30903bf0eefbf82a7c400e248f3
pkgname = proton-native
diff --git a/PKGBUILD b/PKGBUILD
index 4b88b877c3b2..3e8775d4db7c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,6 +6,7 @@ _commit=
pkgver=${_srctag//-/.}
_geckover=2.47.2
_monover=6.3.0
+_dxvkver=1.9.2
pkgrel=1
epoch=1
pkgdesc="Compatibility tool for Steam Play based on Wine and additional components. Monolithic distribution"
@@ -121,9 +122,9 @@ source=(
Vulkan-Headers::git+https://github.com/KhronosGroup/Vulkan-Headers.git
https://dl.winehq.org/wine/wine-gecko/${_geckover}/wine-gecko-${_geckover}-x86{,_64}.tar.xz
https://github.com/madewokherd/wine-mono/releases/download/wine-mono-${_monover}/wine-mono-${_monover}-x86.tar.xz
+ https://raw.githubusercontent.com/Sporif/dxvk-async/${_dxvkver}/dxvk-async.patch
wine-winevulkan_fsr.patch
wine-more_8x5_res.patch
- dxvk-async.patch
proton-unfuck_makefile.patch
proton-disable_lock.patch
proton-user_compat_data.patch
@@ -192,6 +193,7 @@ prepare() {
popd
pushd media-converter
+ export RUSTUP_TOOLCHAIN=stable
export CARGO_HOME="${srcdir}"/build/.cargo
cargo update
cargo fetch --locked --target "i686-unknown-linux-gnu"
@@ -205,11 +207,11 @@ prepare() {
patch -p1 -i "$srcdir"/wine-more_8x5_res.patch
popd
- # Uncomment to enable dxvk async patch.
- # Enable at your own risk. If you don't know what it is,
- # and its implications, leave it as is. You have been warned.
- # I am not liable if anything happens to you by using it.
pushd dxvk
+ # Uncomment to enable dxvk async patch.
+ # Enable at your own risk. If you don't know what it is,
+ # and its implications, leave it as is. You have been warned.
+ # I am not liable if anything happens to you by using it.
patch -p1 -i "$srcdir"/dxvk-async.patch
popd
@@ -270,6 +272,7 @@ build() {
# MingW Wine builds fail with relro
export LDFLAGS="${LDFLAGS/,-z,relro/}"
+ export RUSTUP_TOOLCHAIN=stable
export WINEESYNC=0
export WINEFSYNC=0
SUBJOBS=$([[ "$MAKEFLAGS" =~ -j\ *([1-9][0-9]*) ]] && echo "${BASH_REMATCH[1]}" || echo "$(nproc)") \
@@ -329,10 +332,9 @@ sha256sums=('SKIP'
'8fab46ea2110b2b0beed414e3ebb4e038a3da04900e7a28492ca3c3ccf9fea94'
'b4476706a4c3f23461da98bed34f355ff623c5d2bb2da1e2fa0c6a310bc33014'
'eb67426ff60ed6395b70437e838883ee08b6189cad84faf036b1a4d7366a34e2'
+ '9212a9c42ac8c9c7b9ba7378685b27e7ea0e7a8a8aaac1f3f4d37590ada3e991'
'b4e9c0c4959fcb3f7b7f25e35e5e0577dac5d54fe18e6edb15852a2a4196f2a2'
'9005d8169266ba0b93be30e1475fe9a3697464796f553886c155ec1d77d71215'
- 'acdb652830d642829057a035ebc69481697078a734f57ac974ee5b54454470ff'
'8399d0684a9c732bf405a37f1f3cc779435f2c68a8d042382e9e0538576ab854'
- '8263a3ffb7f8e7a5d81bfbffe1843d6f84502d3443fe40f065bcae02b36ba954'
- '20f7cd3e70fad6f48d2f1a26a485906a36acf30903bf0eefbf82a7c400e248f3'
-)
+ '8be5e0ae9f71d686c72ac094a4eaca14ea288276195d4c0c217a4f3974fbcc70'
+ '20f7cd3e70fad6f48d2f1a26a485906a36acf30903bf0eefbf82a7c400e248f3')
diff --git a/dxvk-async.patch b/dxvk-async.patch
deleted file mode 100644
index 016f8f06a122..000000000000
--- a/dxvk-async.patch
+++ /dev/null
@@ -1,523 +0,0 @@
-diff --git a/meson.build b/meson.build
-index 8fa3ce61..5e4d32d1 100644
---- a/meson.build
-+++ b/meson.build
-@@ -103,7 +103,7 @@ else
- endif
-
- dxvk_version = vcs_tag(
-- command: ['git', 'describe', '--dirty=+'],
-+ command: ['git', 'describe', '--dirty=-async'],
- input: 'version.h.in',
- output: 'version.h')
-
-diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp
-index 797c4e20..bda90275 100644
---- a/src/dxvk/dxvk_context.cpp
-+++ b/src/dxvk/dxvk_context.cpp
-@@ -3837,7 +3837,9 @@ namespace dxvk {
- : DxvkContextFlag::GpDirtyStencilRef);
-
- // Retrieve and bind actual Vulkan pipeline handle
-- m_gpActivePipeline = m_state.gp.pipeline->getPipelineHandle(m_state.gp.state, m_state.om.framebuffer->getRenderPass());
-+ m_gpActivePipeline = m_state.gp.pipeline->getPipelineHandle(m_state.gp.state,
-+ m_state.om.framebuffer->getRenderPass(),
-+ this->checkAsyncCompilationCompat());
-
- if (unlikely(!m_gpActivePipeline))
- return false;
-@@ -4093,7 +4095,7 @@ namespace dxvk {
- }
-
-
-- void DxvkContext::updateFramebuffer() {
-+ void DxvkContext::updateFramebuffer(bool isDraw) {
- if (m_flags.test(DxvkContextFlag::GpDirtyFramebuffer)) {
- m_flags.clr(DxvkContextFlag::GpDirtyFramebuffer);
-
-@@ -4114,6 +4116,11 @@ namespace dxvk {
- m_state.gp.state.omSwizzle[i] = DxvkOmAttachmentSwizzle(mapping);
- }
-
-+ if (isDraw) {
-+ for (uint32_t i = 0; i < fb->numAttachments(); i++)
-+ fb->getAttachment(i).view->setRtBindingFrameId(m_device->getCurrentFrameId());
-+ }
-+
- m_flags.set(DxvkContextFlag::GpDirtyPipelineState);
- }
- }
-@@ -4343,7 +4350,7 @@ namespace dxvk {
- }
-
- if (m_flags.test(DxvkContextFlag::GpDirtyFramebuffer))
-- this->updateFramebuffer();
-+ this->updateFramebuffer(true);
-
- if (!m_flags.test(DxvkContextFlag::GpRenderPassBound))
- this->startRenderPass();
-@@ -4772,6 +4779,14 @@ namespace dxvk {
- }
- }
-
-+ bool DxvkContext::checkAsyncCompilationCompat() {
-+ bool fbCompat = true;
-+ for (uint32_t i = 0; fbCompat && i < m_state.om.framebuffer->numAttachments(); i++) {
-+ const auto& attachment = m_state.om.framebuffer->getAttachment(i);
-+ fbCompat &= attachment.view->getRtBindingAsyncCompilationCompat();
-+ }
-+ return fbCompat;
-+ }
-
- DxvkGraphicsPipeline* DxvkContext::lookupGraphicsPipeline(
- const DxvkGraphicsPipelineShaders& shaders) {
-diff --git a/src/dxvk/dxvk_context.h b/src/dxvk/dxvk_context.h
-index 2456b20a..d58f1021 100644
---- a/src/dxvk/dxvk_context.h
-+++ b/src/dxvk/dxvk_context.h
-@@ -1159,7 +1159,7 @@ namespace dxvk {
- VkDescriptorSet set,
- const DxvkPipelineLayout* layout);
-
-- void updateFramebuffer();
-+ void updateFramebuffer(bool isDraw = false);
-
- void updateIndexBufferBinding();
- void updateVertexBufferBindings();
-@@ -1211,6 +1211,8 @@ namespace dxvk {
-
- void trackDrawBuffer();
-
-+ bool checkAsyncCompilationCompat();
-+
- DxvkGraphicsPipeline* lookupGraphicsPipeline(
- const DxvkGraphicsPipelineShaders& shaders);
-
-diff --git a/src/dxvk/dxvk_graphics.cpp b/src/dxvk/dxvk_graphics.cpp
-index 192e340b..96826600 100644
---- a/src/dxvk/dxvk_graphics.cpp
-+++ b/src/dxvk/dxvk_graphics.cpp
-@@ -62,17 +62,21 @@ namespace dxvk {
-
- VkPipeline DxvkGraphicsPipeline::getPipelineHandle(
- const DxvkGraphicsPipelineStateInfo& state,
-- const DxvkRenderPass* renderPass) {
-+ const DxvkRenderPass* renderPass,
-+ bool async) {
- DxvkGraphicsPipelineInstance* instance = nullptr;
-
-- { std::lock_guard<sync::Spinlock> lock(m_mutex);
-+ { //std::lock_guard<sync::Spinlock> lock(m_mutex);
-
- instance = this->findInstance(state, renderPass);
-
- if (instance)
- return instance->pipeline();
-
-- instance = this->createInstance(state, renderPass);
-+ if (async && m_pipeMgr->m_compiler != nullptr)
-+ m_pipeMgr->m_compiler->queueCompilation(this, state, renderPass);
-+ else
-+ instance = this->createInstance(state, renderPass);
- }
-
- if (!instance)
-@@ -83,13 +87,13 @@ namespace dxvk {
- }
-
-
-- void DxvkGraphicsPipeline::compilePipeline(
-+ bool DxvkGraphicsPipeline::compilePipeline(
- const DxvkGraphicsPipelineStateInfo& state,
- const DxvkRenderPass* renderPass) {
- std::lock_guard<sync::Spinlock> lock(m_mutex);
-
-- if (!this->findInstance(state, renderPass))
-- this->createInstance(state, renderPass);
-+ return (this->findInstance(state, renderPass) == nullptr) &&
-+ (this->createInstance(state, renderPass) != nullptr);
- }
-
-
-@@ -103,6 +107,7 @@ namespace dxvk {
-
- VkPipeline newPipelineHandle = this->createPipeline(state, renderPass);
-
-+ std::lock_guard<sync::Spinlock> lock(m_mutex2);
- m_pipeMgr->m_numGraphicsPipelines += 1;
- return &m_pipelines.emplace_back(state, renderPass, newPipelineHandle);
- }
-@@ -111,6 +116,7 @@ namespace dxvk {
- DxvkGraphicsPipelineInstance* DxvkGraphicsPipeline::findInstance(
- const DxvkGraphicsPipelineStateInfo& state,
- const DxvkRenderPass* renderPass) {
-+ std::lock_guard<sync::Spinlock> lock(m_mutex2);
- for (auto& instance : m_pipelines) {
- if (instance.isCompatible(state, renderPass))
- return &instance;
-diff --git a/src/dxvk/dxvk_graphics.h b/src/dxvk/dxvk_graphics.h
-index 4194599d..c48ee3ed 100644
---- a/src/dxvk/dxvk_graphics.h
-+++ b/src/dxvk/dxvk_graphics.h
-@@ -185,11 +185,13 @@ namespace dxvk {
- * state. If necessary, a new pipeline will be created.
- * \param [in] state Pipeline state vector
- * \param [in] renderPass The render pass
-+ * \param [in] async Compile asynchronously
- * \returns Pipeline handle
- */
- VkPipeline getPipelineHandle(
- const DxvkGraphicsPipelineStateInfo& state,
-- const DxvkRenderPass* renderPass);
-+ const DxvkRenderPass* renderPass,
-+ bool async);
-
- /**
- * \brief Compiles a pipeline
-@@ -198,11 +200,16 @@ namespace dxvk {
- * and stores the result for future use.
- * \param [in] state Pipeline state vector
- * \param [in] renderPass The render pass
-+ * \returns \c true if compile succeeded
- */
-- void compilePipeline(
-+ bool compilePipeline(
- const DxvkGraphicsPipelineStateInfo& state,
- const DxvkRenderPass* renderPass);
-
-+ void writePipelineStateToCache(
-+ const DxvkGraphicsPipelineStateInfo& state,
-+ const DxvkRenderPassFormat& format) const;
-+
- private:
-
- Rc<vk::DeviceFn> m_vkd;
-@@ -221,6 +228,7 @@ namespace dxvk {
-
- // List of pipeline instances, shared between threads
- alignas(CACHE_LINE_SIZE) sync::Spinlock m_mutex;
-+ alignas(CACHE_LINE_SIZE) sync::Spinlock m_mutex2;
- std::vector<DxvkGraphicsPipelineInstance> m_pipelines;
-
- DxvkGraphicsPipelineInstance* createInstance(
-@@ -248,10 +256,6 @@ namespace dxvk {
- bool validatePipelineState(
- const DxvkGraphicsPipelineStateInfo& state) const;
-
-- void writePipelineStateToCache(
-- const DxvkGraphicsPipelineStateInfo& state,
-- const DxvkRenderPassFormat& format) const;
--
- void logPipelineState(
- LogLevel level,
- const DxvkGraphicsPipelineStateInfo& state) const;
-diff --git a/src/dxvk/dxvk_image.h b/src/dxvk/dxvk_image.h
-index 19b5d85f..3da24c49 100644
---- a/src/dxvk/dxvk_image.h
-+++ b/src/dxvk/dxvk_image.h
-@@ -465,6 +465,37 @@ namespace dxvk {
- return result;
- }
-
-+ /**
-+ * \brief Sets render target usage frame number
-+ *
-+ * The image view will track internally when
-+ * it was last used as a render target. This
-+ * info is used for async shader compilation.
-+ * \param [in] frameId Frame number
-+ */
-+ void setRtBindingFrameId(uint32_t frameId) {
-+ if (frameId != m_rtBindingFrameId) {
-+ if (frameId == m_rtBindingFrameId + 1)
-+ m_rtBindingFrameCount += 1;
-+ else
-+ m_rtBindingFrameCount = 0;
-+
-+ m_rtBindingFrameId = frameId;
-+ }
-+ }
-+
-+ /**
-+ * \brief Checks for async pipeline compatibility
-+ *
-+ * Asynchronous pipeline compilation may be enabled if the
-+ * render target has been drawn to in the previous frames.
-+ * \param [in] frameId Current frame ID
-+ * \returns \c true if async compilation is supported
-+ */
-+ bool getRtBindingAsyncCompilationCompat() const {
-+ return m_rtBindingFrameCount >= 5;
-+ }
-+
- private:
-
- Rc<vk::DeviceFn> m_vkd;
-@@ -473,6 +504,9 @@ namespace dxvk {
- DxvkImageViewCreateInfo m_info;
- VkImageView m_views[ViewCount];
-
-+ uint32_t m_rtBindingFrameId = 0;
-+ uint32_t m_rtBindingFrameCount = 0;
-+
- void createView(VkImageViewType type, uint32_t numLayers);
-
- };
-diff --git a/src/dxvk/dxvk_options.cpp b/src/dxvk/dxvk_options.cpp
-index 73dd69d1..c3da6bb5 100644
---- a/src/dxvk/dxvk_options.cpp
-+++ b/src/dxvk/dxvk_options.cpp
-@@ -10,6 +10,8 @@ namespace dxvk {
- useRawSsbo = config.getOption<Tristate>("dxvk.useRawSsbo", Tristate::Auto);
- useEarlyDiscard = config.getOption<Tristate>("dxvk.useEarlyDiscard", Tristate::Auto);
- hud = config.getOption<std::string>("dxvk.hud", "");
-+ enableAsync = config.getOption<bool> ("dxvk.enableAsync", false);
-+ numAsyncThreads = config.getOption<int32_t> ("dxvk.numAsyncThreads", 0);
- }
-
- }
-\ No newline at end of file
-diff --git a/src/dxvk/dxvk_options.h b/src/dxvk/dxvk_options.h
-index 3c5dde91..52a7be04 100644
---- a/src/dxvk/dxvk_options.h
-+++ b/src/dxvk/dxvk_options.h
-@@ -21,6 +21,13 @@ namespace dxvk {
- /// when using the state cache
- int32_t numCompilerThreads;
-
-+ // Enable async pipelines
-+ bool enableAsync;
-+
-+ /// Number of compiler threads
-+ /// when using async pipelines
-+ int32_t numAsyncThreads;
-+
- /// Shader-related options
- Tristate useRawSsbo;
- Tristate useEarlyDiscard;
-diff --git a/src/dxvk/dxvk_pipecompiler.cpp b/src/dxvk/dxvk_pipecompiler.cpp
-new file mode 100644
-index 00000000..40218acd
---- /dev/null
-+++ b/src/dxvk/dxvk_pipecompiler.cpp
-@@ -0,0 +1,76 @@
-+#include "dxvk_device.h"
-+#include "dxvk_graphics.h"
-+#include "dxvk_pipecompiler.h"
-+
-+namespace dxvk {
-+
-+ DxvkPipelineCompiler::DxvkPipelineCompiler(const DxvkDevice* device) {
-+ uint32_t numCpuCores = dxvk::thread::hardware_concurrency();
-+ uint32_t numWorkers = ((std::max(1u, numCpuCores) - 1) * 5) / 7;
-+
-+ if (numWorkers < 1) numWorkers = 1;
-+ if (numWorkers > 32) numWorkers = 32;
-+
-+ if (device->config().numAsyncThreads > 0)
-+ numWorkers = device->config().numAsyncThreads;
-+
-+ Logger::info(str::format("DXVK: Using ", numWorkers, " async compiler threads"));
-+
-+ // Start the compiler threads
-+ m_compilerThreads.resize(numWorkers);
-+
-+ for (uint32_t i = 0; i < numWorkers; i++) {
-+ m_compilerThreads.at(i) = dxvk::thread(
-+ [this] { this->runCompilerThread(); });
-+ }
-+ }
-+
-+
-+ DxvkPipelineCompiler::~DxvkPipelineCompiler() {
-+ { std::lock_guard<std::mutex> lock(m_compilerLock);
-+ m_compilerStop.store(true);
-+ }
-+
-+ m_compilerCond.notify_all();
-+ for (auto& thread : m_compilerThreads)
-+ thread.join();
-+ }
-+
-+
-+ void DxvkPipelineCompiler::queueCompilation(
-+ DxvkGraphicsPipeline* pipeline,
-+ const DxvkGraphicsPipelineStateInfo& state,
-+ const DxvkRenderPass* renderPass) {
-+ std::lock_guard<std::mutex> lock(m_compilerLock);
-+ m_compilerQueue.push({ pipeline, state, renderPass });
-+ m_compilerCond.notify_one();
-+ }
-+
-+
-+ void DxvkPipelineCompiler::runCompilerThread() {
-+ env::setThreadName("dxvk-pcompiler");
-+
-+ while (!m_compilerStop.load()) {
-+ PipelineEntry entry;
-+
-+ { std::unique_lock<std::mutex> lock(m_compilerLock);
-+
-+ m_compilerCond.wait(lock, [this] {
-+ return m_compilerStop.load()
-+ || m_compilerQueue.size() != 0;
-+ });
-+
-+ if (m_compilerQueue.size() != 0) {
-+ entry = std::move(m_compilerQueue.front());
-+ m_compilerQueue.pop();
-+ }
-+ }
-+
-+ if (entry.pipeline != nullptr && entry.renderPass != nullptr &&
-+ entry.pipeline->compilePipeline(entry.state, entry.renderPass)) {
-+ entry.pipeline->writePipelineStateToCache(entry.state, entry.renderPass->format());
-+ }
-+ }
-+ }
-+
-+}
-diff --git a/src/dxvk/dxvk_pipecompiler.h b/src/dxvk/dxvk_pipecompiler.h
-new file mode 100644
-index 00000000..d7fcc2cf
---- /dev/null
-+++ b/src/dxvk/dxvk_pipecompiler.h
-@@ -0,0 +1,61 @@
-+#pragma once
-+
-+#include <atomic>
-+#include <condition_variable>
-+#include <mutex>
-+#include <queue>
-+
-+#include "../util/thread.h"
-+#include "dxvk_include.h"
-+
-+namespace dxvk {
-+
-+ class DxvkDevice;
-+ class DxvkGraphicsPipeline;
-+ class DxvkGraphicsPipelineStateInfo;
-+
-+ /**
-+ * \brief Pipeline compiler
-+ *
-+ * Asynchronous pipeline compiler
-+ */
-+ class DxvkPipelineCompiler : public RcObject {
-+
-+ public:
-+
-+ DxvkPipelineCompiler(const DxvkDevice* device);
-+ ~DxvkPipelineCompiler();
-+
-+ /**
-+ * \brief Compiles a pipeline asynchronously
-+ *
-+ * This should be used to compile graphics
-+ * pipeline instances asynchronously.
-+ * \param [in] pipeline The pipeline object
-+ * \param [in] state The pipeline state info object
-+ * \param [in] renderPass
-+ */
-+ void queueCompilation(
-+ DxvkGraphicsPipeline* pipeline,
-+ const DxvkGraphicsPipelineStateInfo& state,
-+ const DxvkRenderPass* renderPass);
-+
-+ private:
-+
-+ struct PipelineEntry {
-+ DxvkGraphicsPipeline* pipeline = nullptr;
-+ DxvkGraphicsPipelineStateInfo state;
-+ const DxvkRenderPass* renderPass = nullptr;
-+ };
-+
-+ std::atomic<bool> m_compilerStop = { false };
-+ std::mutex m_compilerLock;
-+ std::condition_variable m_compilerCond;
-+ std::queue<PipelineEntry> m_compilerQueue;
-+ std::vector<dxvk::thread> m_compilerThreads;
-+
-+ void runCompilerThread();
-+
-+ };
-+
-+}
-diff --git a/src/dxvk/dxvk_pipemanager.cpp b/src/dxvk/dxvk_pipemanager.cpp
-index 2e29202e..1e767381 100644
---- a/src/dxvk/dxvk_pipemanager.cpp
-+++ b/src/dxvk/dxvk_pipemanager.cpp
-@@ -9,7 +9,11 @@ namespace dxvk {
- DxvkRenderPassPool* passManager)
- : m_device (device),
- m_cache (new DxvkPipelineCache(device->vkd())) {
-+ std::string useAsync = env::getEnvVar("DXVK_ASYNC");
- std::string useStateCache = env::getEnvVar("DXVK_STATE_CACHE");
-+
-+ if (useAsync == "1" || device->config().enableAsync)
-+ m_compiler = new DxvkPipelineCompiler(device);
-
- if (useStateCache != "0" && device->config().enableStateCache)
- m_stateCache = new DxvkStateCache(device, this, passManager);
-diff --git a/src/dxvk/dxvk_pipemanager.h b/src/dxvk/dxvk_pipemanager.h
-index 858928ca..4c12a4dc 100644
---- a/src/dxvk/dxvk_pipemanager.h
-+++ b/src/dxvk/dxvk_pipemanager.h
-@@ -6,6 +6,7 @@
-
- #include "dxvk_compute.h"
- #include "dxvk_graphics.h"
-+#include "dxvk_pipecompiler.h"
-
- namespace dxvk {
-
-@@ -95,6 +96,7 @@ namespace dxvk {
- const DxvkDevice* m_device;
- Rc<DxvkPipelineCache> m_cache;
- Rc<DxvkStateCache> m_stateCache;
-+ Rc<DxvkPipelineCompiler> m_compiler;
-
- std::atomic<uint32_t> m_numComputePipelines = { 0 };
- std::atomic<uint32_t> m_numGraphicsPipelines = { 0 };
-diff --git a/src/dxvk/meson.build b/src/dxvk/meson.build
-index 1dc113c3..003fb1a7 100644
---- a/src/dxvk/meson.build
-+++ b/src/dxvk/meson.build
-@@ -83,6 +83,7 @@ dxvk_src = files([
- 'dxvk_openvr.cpp',
- 'dxvk_options.cpp',
- 'dxvk_pipecache.cpp',
-+ 'dxvk_pipecompiler.cpp',
- 'dxvk_pipelayout.cpp',
- 'dxvk_pipemanager.cpp',
- 'dxvk_queue.cpp',
-diff --git a/dxvk.conf b/dxvk.conf
-index 9ca21a5e..abf0f2bf 100644
---- a/dxvk.conf
-+++ b/dxvk.conf
-@@ -214,6 +214,24 @@
- # dxvk.hud =
-
-
-+# Compile pipelines asynchronously if possible. This may reduce stuttering
-+# in some games, but may also introduce rendering issues that might become
-+# apparent over time. Do not report bugs with this option enabled.
-+#
-+# Supported values: True, False
-+
-+# dxvk.enableAsync = True
-+
-+
-+# Sets number of async compiler threads.
-+#
-+# Supported values:
-+# - 0 to automatically determine the number of threads to use
-+# - any positive number to enforce the thread count
-+
-+# dxvk.numAsyncThreads = 0
-+
-+
- # Reported shader model
- #
- # The shader model to state that we support in the device
diff --git a/proton-disable_lock.patch b/proton-disable_lock.patch
index 4341658471d8..25feb94cb148 100644
--- a/proton-disable_lock.patch
+++ b/proton-disable_lock.patch
@@ -1,8 +1,8 @@
diff --git a/proton b/proton
-index 8183820..7acc32a 100755
+index 4423e05..becbbcc 100755
--- a/proton
+++ b/proton
-@@ -102,7 +102,6 @@ class Proton:
+@@ -291,7 +291,6 @@ class Proton:
self.user_settings_file = self.path("user_settings.py")
self.wine_bin = self.bin_dir + "wine"
self.wineserver_bin = self.bin_dir + "wineserver"
@@ -10,41 +10,22 @@ index 8183820..7acc32a 100755
def path(self, d):
return self.base_dir + d
-@@ -114,35 +113,14 @@ class Proton:
- not filecmp.cmp(self.version_file, self.path("dist/version"))
-
- def extract_tarball(self):
-- with self.dist_lock:
-- if self.need_tarball_extraction():
-- if os.path.exists(self.dist_dir):
-- shutil.rmtree(self.dist_dir)
-- tar = None
-- for sf in ["", ".xz", ".bz2", ".gz"]:
-- if os.path.exists(self.path("proton_dist.tar" + sf)):
-- tar = tarfile.open(self.path("proton_dist.tar" + sf), mode="r:*")
-- break
-- if not tar:
-- log("No proton_dist tarball??")
-- sys.exit(1)
-- tar.extractall(path=self.dist_dir)
-- tar.close()
-- try_copy(self.version_file, self.dist_dir)
-+ return True
-
- def missing_default_prefix(self):
- '''Check if the default prefix dir is missing. Returns true if missing, false if present'''
- return not os.path.isdir(self.default_pfx_dir)
-
- def make_default_prefix(self):
-- with self.dist_lock:
-- local_env = dict(g_session.env)
-- if self.missing_default_prefix():
-- #make default prefix
-- local_env["WINEPREFIX"] = self.default_pfx_dir
-- local_env["WINEDEBUG"] = "-all"
-- g_session.run_proc([self.wine_bin, "wineboot"], local_env)
-- g_session.run_proc([self.wineserver_bin, "-w"], local_env)
-+ return True
-
- class CompatData:
- def __init__(self, compatdata):
+@@ -1247,8 +1246,6 @@ if __name__ == "__main__":
+
+ g_proton = Proton(os.path.dirname(sys.argv[0]))
+
+- if g_proton.need_tarball_extraction():
+- g_proton.extract_tarball()
+
+ g_compatdata = CompatData(os.environ["STEAM_COMPAT_DATA_PATH"])
+
+@@ -1257,7 +1254,8 @@ if __name__ == "__main__":
+ g_session.init_wine()
+
+ if g_proton.missing_default_prefix():
+- g_proton.make_default_prefix()
++ log("Default prefix is missing, something is very wrong.")
++ sys.exit(1)
+
+ g_session.init_session(sys.argv[1] != "runinprefix")
+