mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-27 22:54:16 +01:00
[dxvk] Lock pipeline object while compiling one pipeline
This prevents us from compiling the exact same pipeline twice at the same time, which for some reason crashes RADV.
This commit is contained in:
parent
0e2d63f6d2
commit
d6742e38c5
@ -102,9 +102,15 @@ namespace dxvk {
|
|||||||
// If no pipeline instance exists with the given state
|
// If no pipeline instance exists with the given state
|
||||||
// vector, create a new one and add it to the list.
|
// vector, create a new one and add it to the list.
|
||||||
VkPipeline newPipelineBase = m_basePipeline.load();
|
VkPipeline newPipelineBase = m_basePipeline.load();
|
||||||
VkPipeline newPipelineHandle = this->compilePipeline(
|
VkPipeline newPipelineHandle = VK_NULL_HANDLE;
|
||||||
state, renderPassHandle, newPipelineBase);
|
|
||||||
|
|
||||||
|
// FIXME for some reason, compiling the exact
|
||||||
|
// same pipeline crashes inside driver code
|
||||||
|
{ std::lock_guard<sync::Spinlock> lock(m_mutex);
|
||||||
|
newPipelineHandle = this->compilePipeline(
|
||||||
|
state, renderPassHandle, newPipelineBase);
|
||||||
|
}
|
||||||
|
|
||||||
{ std::lock_guard<sync::Spinlock> lock(m_mutex);
|
{ std::lock_guard<sync::Spinlock> lock(m_mutex);
|
||||||
|
|
||||||
// Discard the pipeline if another thread
|
// Discard the pipeline if another thread
|
||||||
|
Loading…
x
Reference in New Issue
Block a user