From beecb3dac0e98af22ca4597c69683a765da51263 Mon Sep 17 00:00:00 2001 From: BZLZHH Date: Sat, 7 Jun 2025 23:03:00 +0800 Subject: [PATCH] [Fix] (DiligentEngine): Use SHADER_TYPE_VS_PS as stages for uniform block. --- MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp index 73f57e7c..6230e0e0 100644 --- a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp +++ b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp @@ -52,7 +52,7 @@ namespace MG_Diligent { break; } } - + PSOCreateInfo.GraphicsPipeline.InputLayout.LayoutElements = programInfo.inputLayout.data(); PSOCreateInfo.GraphicsPipeline.InputLayout.NumElements = programInfo.inputLayout.size(); @@ -336,8 +336,8 @@ namespace MG_Diligent { if (already_added) continue; Diligent::ShaderResourceVariableDesc varDesc; - varDesc.Name = strdup(resourceList[i].name); - varDesc.ShaderStages = Diligent::SHADER_TYPE_ALL; // TODO + varDesc.Name = strdup(resourceList[i].name); + varDesc.ShaderStages = Diligent::SHADER_TYPE_VS_PS; // TODO varDesc.Type = Diligent::SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE; MG_Util::Debug::LogD("Uniform buffer: %s, Stage: %u, Type: %u", varDesc.Name, varDesc.ShaderStages, varDesc.Type); Variables.push_back(varDesc);