mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 12:41:50 +01:00
Add quirk for 615 drivers with broken multithreaded compilation
This commit is contained in:
parent
755f7c75af
commit
ffe7263848
@ -6,7 +6,10 @@
|
|||||||
#include "graphics_pipeline_cache.h"
|
#include "graphics_pipeline_cache.h"
|
||||||
|
|
||||||
namespace skyline::gpu::cache {
|
namespace skyline::gpu::cache {
|
||||||
GraphicsPipelineCache::GraphicsPipelineCache(GPU &gpu) : gpu(gpu), vkPipelineCache(gpu.vkDevice, vk::PipelineCacheCreateInfo{}) {}
|
GraphicsPipelineCache::GraphicsPipelineCache(GPU &gpu)
|
||||||
|
: gpu{gpu},
|
||||||
|
vkPipelineCache{gpu.vkDevice, vk::PipelineCacheCreateInfo{}},
|
||||||
|
pool{gpu.traits.quirks.brokenMultithreadedPipelineCompilation ? 1U : 0U} {}
|
||||||
|
|
||||||
#define VEC_CPY(pointer, size) state.pointer, state.pointer + state.size
|
#define VEC_CPY(pointer, size) state.pointer, state.pointer + state.size
|
||||||
|
|
||||||
@ -396,4 +399,8 @@ namespace skyline::gpu::cache {
|
|||||||
pipelineEntryIt.first->second.pipeline = pipelineFuture.share();
|
pipelineEntryIt.first->second.pipeline = pipelineFuture.share();
|
||||||
return CompiledPipeline{pipelineEntryIt.first->second};
|
return CompiledPipeline{pipelineEntryIt.first->second};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GraphicsPipelineCache::WaitIdle() {
|
||||||
|
pool.wait_for_tasks();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -165,5 +165,10 @@ namespace skyline::gpu::cache {
|
|||||||
* @note Input/Resolve attachments are **not** supported and using them with the supplied pipeline will result in UB
|
* @note Input/Resolve attachments are **not** supported and using them with the supplied pipeline will result in UB
|
||||||
*/
|
*/
|
||||||
CompiledPipeline GetCompiledPipeline(const PipelineState& state, span<const vk::DescriptorSetLayoutBinding> layoutBindings, span<const vk::PushConstantRange> pushConstantRanges = {}, bool noPushDescriptors = false);
|
CompiledPipeline GetCompiledPipeline(const PipelineState& state, span<const vk::DescriptorSetLayoutBinding> layoutBindings, span<const vk::PushConstantRange> pushConstantRanges = {}, bool noPushDescriptors = false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Waits until the pipeline compilation thread pool is idle and all pipelines have been compiled
|
||||||
|
*/
|
||||||
|
void WaitIdle();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,10 @@ namespace skyline::gpu::interconnect::kepler_compute {
|
|||||||
.layout = *pipelineLayout,
|
.layout = *pipelineLayout,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
if (ctx.gpu.traits.quirks.brokenMultithreadedPipelineCompilation)
|
||||||
|
ctx.gpu.graphicsPipelineCache.WaitIdle();
|
||||||
|
|
||||||
vk::raii::Pipeline pipeline{ctx.gpu.vkDevice, nullptr, pipelineInfo};
|
vk::raii::Pipeline pipeline{ctx.gpu.vkDevice, nullptr, pipelineInfo};
|
||||||
|
|
||||||
return Pipeline::CompiledPipeline{
|
return Pipeline::CompiledPipeline{
|
||||||
|
@ -227,6 +227,10 @@ namespace skyline::gpu {
|
|||||||
|
|
||||||
if (deviceProperties.driverVersion < VK_MAKE_VERSION(512, 600, 0))
|
if (deviceProperties.driverVersion < VK_MAKE_VERSION(512, 600, 0))
|
||||||
maxSubpassCount = 64; // Driver will segfault while destroying the renderpass and associated objects if this is exceeded on all 5xx and below drivers
|
maxSubpassCount = 64; // Driver will segfault while destroying the renderpass and associated objects if this is exceeded on all 5xx and below drivers
|
||||||
|
|
||||||
|
if (deviceProperties.driverVersion >= VK_MAKE_VERSION(512, 615, 0) && deviceProperties.driverVersion <= VK_MAKE_VERSION(512, 615, 512))
|
||||||
|
brokenMultithreadedPipelineCompilation = true;
|
||||||
|
|
||||||
maxGlobalPriority = vk::QueueGlobalPriorityEXT::eHigh;
|
maxGlobalPriority = vk::QueueGlobalPriorityEXT::eHigh;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,7 @@ namespace skyline::gpu {
|
|||||||
bool brokenPushDescriptors{}; //!< [Adreno Proprietary] A bug that causes push descriptor updates to ignored by the driver in certain situations
|
bool brokenPushDescriptors{}; //!< [Adreno Proprietary] A bug that causes push descriptor updates to ignored by the driver in certain situations
|
||||||
bool brokenSpirvPositionInput{}; //!< [Adreno Proprietary] A bug that causes the shader compiler to fail on shaders with vertex position inputs not contained within a struct
|
bool brokenSpirvPositionInput{}; //!< [Adreno Proprietary] A bug that causes the shader compiler to fail on shaders with vertex position inputs not contained within a struct
|
||||||
bool brokenComputeShaders{}; //!< [ARM Proprietary] A bug that causes compute shaders in some games to crash the GPU
|
bool brokenComputeShaders{}; //!< [ARM Proprietary] A bug that causes compute shaders in some games to crash the GPU
|
||||||
|
bool brokenMultithreadedPipelineCompilation{}; //!< [Qualcomm Proprietary] A bug that causes the shader compiler to crash when compiling pipelines on multiple threads simultaneously
|
||||||
|
|
||||||
u32 maxSubpassCount{std::numeric_limits<u32>::max()}; //!< The maximum amount of subpasses within a renderpass, this is limited to 64 on older Adreno proprietary drivers
|
u32 maxSubpassCount{std::numeric_limits<u32>::max()}; //!< The maximum amount of subpasses within a renderpass, this is limited to 64 on older Adreno proprietary drivers
|
||||||
vk::QueueGlobalPriorityEXT maxGlobalPriority{vk::QueueGlobalPriorityEXT::eMedium}; //!< The highest allowed global priority of the queue, drivers will not allow higher priorities to be set on queues
|
vk::QueueGlobalPriorityEXT maxGlobalPriority{vk::QueueGlobalPriorityEXT::eMedium}; //!< The highest allowed global priority of the queue, drivers will not allow higher priorities to be set on queues
|
||||||
|
Loading…
Reference in New Issue
Block a user