From 4dccdff89494116cc69802c7f3d1957d1b972775 Mon Sep 17 00:00:00 2001 From: Sirox <71220271+Sirox0@users.noreply.github.com> Date: Thu, 17 Jul 2025 11:46:58 +0300 Subject: fix const qualifier for specialization constants (#7640) Co-authored-by: Yong He --- source/slang/slang-emit-glsl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index a8ce6564c..9d4f72b07 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -943,7 +943,7 @@ bool GLSLSourceEmitter::_emitGLSLLayoutQualifierWithBindingKinds( case LayoutResourceKind::SpecializationConstant: m_writer->emit("layout(constant_id = "); m_writer->emit(index); - m_writer->emit(")\n"); + m_writer->emit(")\nconst "); break; case LayoutResourceKind::ConstantBuffer: -- cgit v1.2.3