From 3971f0657a2067ef0de28d9cc374c821a431f844 Mon Sep 17 00:00:00 2001 From: dpjudas Date: Mon, 7 Apr 2025 02:04:27 +0200 Subject: [PATCH] More khronos HELL (thanks guys!) --- .../vulkan/pipelines/vk_renderpass.cpp | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/common/rendering/vulkan/pipelines/vk_renderpass.cpp b/src/common/rendering/vulkan/pipelines/vk_renderpass.cpp index 426630557..0bda8182d 100644 --- a/src/common/rendering/vulkan/pipelines/vk_renderpass.cpp +++ b/src/common/rendering/vulkan/pipelines/vk_renderpass.cpp @@ -213,6 +213,35 @@ void VkRenderPassManager::CreateZMinMaxPipeline() VkRenderPassSetup::VkRenderPassSetup(VulkanRenderDevice* fb, const VkRenderPassKey &key) : PassKey(key), fb(fb) { + // To do: don't do it here as that will block the main thread. + + // Precompile material fragment shaders: +/* + VkPipelineKey fkey; + fkey.IsGeneralized = true; + fkey.DepthFunc = DF_LEqual; + fkey.StencilTest = true; + fkey.StencilPassOp = SOP_Keep; + fkey.ShaderKey.Layout.Simple = 0; + fkey.ShaderKey.Layout.Simple3D = 0; + fkey.ShaderKey.Layout.GBufferPass = gl_ssao != 0; + fkey.ShaderKey.Layout.UseLevelMesh = 0; + + int count = NUM_BUILTIN_SHADERS + usershaders.Size(); + for (int i = 0; i < count; i++) + { + fkey.ShaderKey.SpecialEffect = EFF_NONE; + fkey.ShaderKey.EffectState = i; + for (int j = 0; j < 16; j++) + { + fkey.DepthWrite = (j & 1) != 0; + fkey.DepthTest = (j & 2) != 0; + fkey.ShaderKey.Layout.AlphaTest = (j & 4) != 0; + fkey.ShaderKey.Layout.ShadeVertex = (j & 8) != 0; + GetFragmentShaderLibrary(fkey, true); + } + } +*/ } std::unique_ptr VkRenderPassSetup::CreateRenderPass(int clearTargets)