Skip to content

Commit 8aeec04

Browse files
Archiver_GL: fixed spirv-cross namespace (fix #660)
1 parent 5a7c807 commit 8aeec04

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Graphics/Archiver/src/Archiver_GL.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2024 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -420,7 +420,8 @@ class CompiledShaderGL final : public SerializedShaderImpl::CompiledShader
420420
Bool IsES = false;
421421
GetGLSLVersion(ShaderCI, TargetGLSLCompiler::driver, DeviceType, GLShaderCI.DeviceInfo.MaxShaderVersion, GLSLVersion, IsES);
422422

423-
diligent_spirv_cross::CompilerGLSL::Options Options;
423+
using CompilerGLSL = SPIRV_CROSS_NAMESPACE::CompilerGLSL;
424+
CompilerGLSL::Options Options;
424425
Options.es = IsES;
425426
Options.version = GLSLVersion.Major * 100 + GLSLVersion.Minor * 10;
426427

@@ -441,15 +442,15 @@ class CompiledShaderGL final : public SerializedShaderImpl::CompiledShader
441442
// For opcodes where we have to perform explicit additional nan checks, very ugly code is generated.
442443
Options.relax_nan_checks = true;
443444

444-
Options.fragment.default_float_precision = diligent_spirv_cross::CompilerGLSL::Options::Precision::DontCare;
445-
Options.fragment.default_int_precision = diligent_spirv_cross::CompilerGLSL::Options::Precision::DontCare;
445+
Options.fragment.default_float_precision = CompilerGLSL::Options::Precision::DontCare;
446+
Options.fragment.default_int_precision = CompilerGLSL::Options::Precision::DontCare;
446447

447448
# if PLATFORM_APPLE
448449
// Apple does not support GL_ARB_shading_language_420pack extension
449450
Options.enable_420pack_extension = false;
450451
# endif
451452

452-
diligent_spirv_cross::CompilerGLSL Compiler{std::move(SPIRV)};
453+
CompilerGLSL Compiler{std::move(SPIRV)};
453454
Compiler.set_common_options(Options);
454455

455456
OptimizedGLSL = Compiler.compile();

0 commit comments

Comments
 (0)