From 4dfbb789be1dc8518bc584c6ca00f710541d928f Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Mon, 21 Jul 2025 14:45:19 +0800 Subject: [PATCH] [Chore] (MG_Util/Program): get rid of junk --- MobileGL/Includes.h | 2 +- MobileGL/MG_Test/Program/CMakeLists.txt | 2 +- .../MG_Util/Pipelines/PipelineExecutor.hpp | 77 -------- .../Pipelines/ProgramLinkingPipeline.cpp | 57 ------ .../Pipelines/ProgramLinkingPipeline.h | 24 --- .../Pipelines/ShaderCompilationPipeline.cpp | 172 ------------------ .../Pipelines/ShaderCompilationPipeline.h | 53 ------ MobileGL/MG_Util/Pipelines/Types.h | 93 ---------- MobileGL/MG_Util/ShaderTranspiler/Types.h | 52 ------ .../glslang/UniformTraverser.cpp | 56 ------ .../glslang/UniformTraverser.h | 25 --- 11 files changed, 2 insertions(+), 611 deletions(-) delete mode 100644 MobileGL/MG_Util/Pipelines/PipelineExecutor.hpp delete mode 100644 MobileGL/MG_Util/Pipelines/ProgramLinkingPipeline.cpp delete mode 100644 MobileGL/MG_Util/Pipelines/ProgramLinkingPipeline.h delete mode 100644 MobileGL/MG_Util/Pipelines/ShaderCompilationPipeline.cpp delete mode 100644 MobileGL/MG_Util/Pipelines/ShaderCompilationPipeline.h delete mode 100644 MobileGL/MG_Util/Pipelines/Types.h delete mode 100644 MobileGL/MG_Util/ShaderTranspiler/glslang/UniformTraverser.cpp delete mode 100644 MobileGL/MG_Util/ShaderTranspiler/glslang/UniformTraverser.h diff --git a/MobileGL/Includes.h b/MobileGL/Includes.h index 80e29254..458afa00 100644 --- a/MobileGL/Includes.h +++ b/MobileGL/Includes.h @@ -113,7 +113,7 @@ int __android_log_print(int prio, const char *tag, const char *fmt, ...); //#include "MG_Util/Pipelines/ShaderCompilationPipeline.h" -#include "MG_Util/ShaderTranspiler/glslang/UniformTraverser.h" +// #include "MG_Util/ShaderTranspiler/glslang/UniformTraverser.h" #include "MG_State/GLState/BufferState/BufferObject.h" #include "MG_State/GLState/BufferState/BufferState.h" diff --git a/MobileGL/MG_Test/Program/CMakeLists.txt b/MobileGL/MG_Test/Program/CMakeLists.txt index 204c96d8..322797a0 100644 --- a/MobileGL/MG_Test/Program/CMakeLists.txt +++ b/MobileGL/MG_Test/Program/CMakeLists.txt @@ -54,7 +54,7 @@ add_executable( # ${MGL_ROOT}/MobileGL/MG_Util/Pipelines/ProgramLinkingPipeline.cpp ${MGL_ROOT}/MobileGL/MG_Util/Converters/GLToGlslang/GLShaderLangConverter.cpp ${MGL_ROOT}/MobileGL/MG_Util/ShaderTranspiler/ShaderCompiler.cpp - ${MGL_ROOT}/MobileGL/MG_Util/ShaderTranspiler/glslang/UniformTraverser.cpp +# ${MGL_ROOT}/MobileGL/MG_Util/ShaderTranspiler/glslang/UniformTraverser.cpp ) target_include_directories(ProgramTest PRIVATE diff --git a/MobileGL/MG_Util/Pipelines/PipelineExecutor.hpp b/MobileGL/MG_Util/Pipelines/PipelineExecutor.hpp deleted file mode 100644 index e4a56945..00000000 --- a/MobileGL/MG_Util/Pipelines/PipelineExecutor.hpp +++ /dev/null @@ -1,77 +0,0 @@ - #pragma once - -#ifndef MG_PIPELINEEXECUTOR_HPP -#define MG_PIPELINEEXECUTOR_HPP - -namespace MobileGL { - namespace MG_Util { - namespace Pipeline { - using next_t = std::function; - using next_ptr_t = SharedPtr; - - template - class Stage { - protected: - using T_ptr = SharedPtr; - using callback_t = std::function; - public: - virtual callback_t handler() = 0; - }; - - template - class PipelineExecutor { - protected: - using T_ptr = SharedPtr; - using callback_t = std::function; - using middleware_ptr_t = SharedPtr>; - public: - explicit PipelineExecutor(std::function callback) : - callback_(Move(callback)) {} - - PipelineExecutor &Register(callback_t middleware) { - middlewares_.emplace_back(Move(middleware)); - return *this; - } - - PipelineExecutor &Register(middleware_ptr_t middleware) { - middleware_storage_.emplace_back(middleware); - Register(middleware->handler()); - return *this; - } - - void Process(T_ptr payload) { - auto it_ptr = MakeShared::iterator>( - middlewares_.begin()); - auto next = MakeShared(); - auto weak_next = std::weak_ptr(next); - - // setup next callback - *next = [this, it_ptr, weak_next, payload] { - auto &it = *it_ptr; - - // if there's something to do - if (it != middlewares_.end()) { - auto &func = *it; - // advance the iterator to the next Stage - ++it; - auto next = weak_next.lock(); - func(payload, next); - // proceed with post-Stage logic - } else { - callback_(*payload); - } - }; - // bootstrap the whole thing - (*next)(); - } - - private: - Vector middlewares_; - Vector middleware_storage_; - std::function callback_; - }; - } - } -} - -#endif //MG_PIPELINEEXECUTOR_HPP diff --git a/MobileGL/MG_Util/Pipelines/ProgramLinkingPipeline.cpp b/MobileGL/MG_Util/Pipelines/ProgramLinkingPipeline.cpp deleted file mode 100644 index 4bf54bf3..00000000 --- a/MobileGL/MG_Util/Pipelines/ProgramLinkingPipeline.cpp +++ /dev/null @@ -1,57 +0,0 @@ -// -// Created by Swung 0x48 on 2025/7/16. -// - -#include "ProgramLinkingPipeline.h" - -namespace MobileGL { -namespace MG_Util { -namespace Pipeline { - ProgramLinkingPipeline::ProgramLinkingPipeline(std::function callback): - executor_(Move(callback)) { - executor_ - .Register([](SharedPtr payload, auto next) { - // Link TShader to TProgram - auto& shaders = payload->shadersToLink; - auto& program = payload->linkedProgram; - - for (auto& shader : shaders) { - program.addShader(shader.get()); - } - - if (!program.link(EShMsgDefault)) { - payload->log += "Error: [glslang] Cannot link the program:\n" + std::string(program.getInfoLog()); - payload->errc = -1; - - return; - } - - (*next)(); - }) - .Register([](auto payload, auto next) { - auto& types = payload->shaderTypes; - auto& program = payload->linkedProgram; - auto& programSpirv = payload->programSpirv; - - glslang::SpvOptions spvOptions; - spvOptions.disableOptimizer = false; - - for (auto type : types) { - std::vector spirv; - - auto lang = GetEShLanguageByShaderType(type); - GlslangToSpv(*program.getIntermediate(lang), spirv, &spvOptions); - programSpirv.emplace_back(std::move(spirv)); - } - - (*next)(); - }) - ; - } - - void ProgramLinkingPipeline::Invoke(SharedPtr payload) { - executor_.Process(Move(payload)); - } -} -} -} \ No newline at end of file diff --git a/MobileGL/MG_Util/Pipelines/ProgramLinkingPipeline.h b/MobileGL/MG_Util/Pipelines/ProgramLinkingPipeline.h deleted file mode 100644 index 766f1338..00000000 --- a/MobileGL/MG_Util/Pipelines/ProgramLinkingPipeline.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Created by Swung 0x48 on 2025/7/16. -// - -#ifndef MG_UTIL_PIPELINES_PROGRAMLINKINGPIPELINE_H -#define MG_UTIL_PIPELINES_PROGRAMLINKINGPIPELINE_H - -#include "../../Includes.h" - -namespace MobileGL { -namespace MG_Util { -namespace Pipeline { - class ProgramLinkingPipeline: public IPipeline { - explicit ProgramLinkingPipeline(std::function callback); - void Invoke(SharedPtr payload); - private: - PipelineExecutor executor_; - }; -} -} -} - - -#endif //MG_UTIL_PIPELINES_PROGRAMLINKINGPIPELINE_H diff --git a/MobileGL/MG_Util/Pipelines/ShaderCompilationPipeline.cpp b/MobileGL/MG_Util/Pipelines/ShaderCompilationPipeline.cpp deleted file mode 100644 index 37342598..00000000 --- a/MobileGL/MG_Util/Pipelines/ShaderCompilationPipeline.cpp +++ /dev/null @@ -1,172 +0,0 @@ -// -// Created by Swung 0x48 on 2025-07-12. -// - -#include "ShaderCompilationPipeline.h" - -namespace MobileGL { -namespace MG_Util { -namespace Pipeline { - TBuiltInResource& ShaderCompilationPipeline::GetTBuiltInResourceInstance() - { - static TBuiltInResource Resources{}; - Resources.maxLights = 32; - Resources.maxClipPlanes = 6; - Resources.maxTextureUnits = 32; - Resources.maxTextureCoords = 32; - Resources.maxVertexAttribs = 64; - Resources.maxVertexUniformComponents = 4096; - Resources.maxVaryingFloats = 64; - Resources.maxVertexTextureImageUnits = 32; - Resources.maxCombinedTextureImageUnits = 80; - Resources.maxTextureImageUnits = 32; - Resources.maxFragmentUniformComponents = 4096; - Resources.maxDrawBuffers = 32; - Resources.maxVertexUniformVectors = 128; - Resources.maxVaryingVectors = 8; - Resources.maxFragmentUniformVectors = 16; - Resources.maxVertexOutputVectors = 16; - Resources.maxFragmentInputVectors = 15; - Resources.minProgramTexelOffset = -8; - Resources.maxProgramTexelOffset = 7; - Resources.maxClipDistances = 8; - Resources.maxComputeWorkGroupCountX = 65535; - Resources.maxComputeWorkGroupCountY = 65535; - Resources.maxComputeWorkGroupCountZ = 65535; - Resources.maxComputeWorkGroupSizeX = 1024; - Resources.maxComputeWorkGroupSizeY = 1024; - Resources.maxComputeWorkGroupSizeZ = 64; - Resources.maxComputeUniformComponents = 1024; - Resources.maxComputeTextureImageUnits = 16; - Resources.maxComputeImageUniforms = 8; - Resources.maxComputeAtomicCounters = 8; - Resources.maxComputeAtomicCounterBuffers = 1; - Resources.maxVaryingComponents = 60; - Resources.maxVertexOutputComponents = 64; - Resources.maxGeometryInputComponents = 64; - Resources.maxGeometryOutputComponents = 128; - Resources.maxFragmentInputComponents = 128; - Resources.maxImageUnits = 8; - Resources.maxCombinedImageUnitsAndFragmentOutputs = 8; - Resources.maxCombinedShaderOutputResources = 8; - Resources.maxImageSamples = 0; - Resources.maxVertexImageUniforms = 0; - Resources.maxTessControlImageUniforms = 0; - Resources.maxTessEvaluationImageUniforms = 0; - Resources.maxGeometryImageUniforms = 0; - Resources.maxFragmentImageUniforms = 8; - Resources.maxCombinedImageUniforms = 8; - Resources.maxGeometryTextureImageUnits = 16; - Resources.maxGeometryOutputVertices = 256; - Resources.maxGeometryTotalOutputComponents = 1024; - Resources.maxGeometryUniformComponents = 1024; - Resources.maxGeometryVaryingComponents = 64; - Resources.maxTessControlInputComponents = 128; - Resources.maxTessControlOutputComponents = 128; - Resources.maxTessControlTextureImageUnits = 16; - Resources.maxTessControlUniformComponents = 1024; - Resources.maxTessControlTotalOutputComponents = 4096; - Resources.maxTessEvaluationInputComponents = 128; - Resources.maxTessEvaluationOutputComponents = 128; - Resources.maxTessEvaluationTextureImageUnits = 16; - Resources.maxTessEvaluationUniformComponents = 1024; - Resources.maxTessPatchComponents = 120; - Resources.maxPatchVertices = 32; - Resources.maxTessGenLevel = 64; - Resources.maxViewports = 16; - Resources.maxVertexAtomicCounters = 0; - Resources.maxTessControlAtomicCounters = 0; - Resources.maxTessEvaluationAtomicCounters = 0; - Resources.maxGeometryAtomicCounters = 0; - Resources.maxFragmentAtomicCounters = 8; - Resources.maxCombinedAtomicCounters = 8; - Resources.maxAtomicCounterBindings = 1; - Resources.maxVertexAtomicCounterBuffers = 0; - Resources.maxTessControlAtomicCounterBuffers = 0; - Resources.maxTessEvaluationAtomicCounterBuffers = 0; - Resources.maxGeometryAtomicCounterBuffers = 0; - Resources.maxFragmentAtomicCounterBuffers = 1; - Resources.maxCombinedAtomicCounterBuffers = 1; - Resources.maxAtomicCounterBufferSize = 16384; - Resources.maxTransformFeedbackBuffers = 4; - Resources.maxTransformFeedbackInterleavedComponents = 64; - Resources.maxCullDistances = 8; - Resources.maxCombinedClipAndCullDistances = 8; - Resources.maxSamples = 4; - Resources.maxMeshOutputVerticesNV = 256; - Resources.maxMeshOutputPrimitivesNV = 512; - Resources.maxMeshWorkGroupSizeX_NV = 32; - Resources.maxMeshWorkGroupSizeY_NV = 1; - Resources.maxMeshWorkGroupSizeZ_NV = 1; - Resources.maxTaskWorkGroupSizeX_NV = 32; - Resources.maxTaskWorkGroupSizeY_NV = 1; - Resources.maxTaskWorkGroupSizeZ_NV = 1; - Resources.maxMeshViewCountNV = 4; - - Resources.limits.nonInductiveForLoops = true; - Resources.limits.whileLoops = true; - Resources.limits.doWhileLoops = true; - Resources.limits.generalUniformIndexing = true; - Resources.limits.generalAttributeMatrixVectorIndexing = true; - Resources.limits.generalVaryingIndexing = true; - Resources.limits.generalSamplerIndexing = true; - Resources.limits.generalVariableIndexing = true; - Resources.limits.generalConstantMatrixVectorIndexing = true; - - return Resources; - } - - ShaderCompilationPipeline::ShaderCompilationPipeline(std::function callback): - executor_(Move(callback)) { - executor_ - .Register([this](SharedPtr payload, auto next) { - // source -> glslang TShader - auto& shaderType = payload->shaderType; - auto& sourceStr = payload->sourceStr; - - auto lang = GetEShLanguageByShaderType(shaderType); - if (lang == EShLanguage::EShLangCount) { - payload->log += "Error: [Preprocess] Unsupported shader type: " + - ConvertGLEnumToString(shaderType); - payload->errc = -1; - return; - } - - auto& tshader = payload->TShader; - tshader = MakeUnique(lang); - const char* src[] = { sourceStr.c_str() }; - tshader->setStrings(src, 1); - tshader->setInvertY(true); - tshader->setEnvInput(glslang::EShSourceGlsl, lang, glslang::EShClientOpenGL, 150); - tshader->setEnvClient(glslang::EShClientOpenGL, glslang::EShTargetOpenGL_450); - tshader->setEnvTarget(glslang::EShTargetSpv, glslang::EShTargetSpv_1_6); - tshader->setAutoMapLocations(true); - tshader->setAutoMapBindings(true); - tshader->setEnvInputVulkanRulesRelaxed(); // using EXT_vulkan_glsl_relaxed for gl_VertexID and gl_InstanceID? - - if (!tshader->parse(&GetTBuiltInResourceInstance(), 450, ECoreProfile, - /*forceDefaultVersionAndProfile: */false, - /*forwardCompatible: */true, EShMsgDefault)) { - payload->log += "Error: [glslang] Cannot compile " + ConvertGLEnumToString(shaderType) + ":\n" - + std::string(tshader->getInfoLog()); - payload->errc = -2; - return; - } - - (*next)(); - }) - .Register([this](auto payload, auto next) { - UniformTraverser uniformTraverser(payload->uniforms, payload->samplers); - auto root = payload->TShader->getIntermediate()->getTreeRoot(); - root->traverse(&uniformTraverser); - (*next)(); - }) - ; - } - - void ShaderCompilationPipeline::Invoke(SharedPtr payload) { - executor_.Process(Move(payload)); - } -} -} -} \ No newline at end of file diff --git a/MobileGL/MG_Util/Pipelines/ShaderCompilationPipeline.h b/MobileGL/MG_Util/Pipelines/ShaderCompilationPipeline.h deleted file mode 100644 index 23161eb9..00000000 --- a/MobileGL/MG_Util/Pipelines/ShaderCompilationPipeline.h +++ /dev/null @@ -1,53 +0,0 @@ -// -// Created by Swung 0x48 on 2025-07-12. -// - -#ifndef MG_UTIL_PIPELINES_SHADERCOMPILATIONPIPELINE_H -#define MG_UTIL_PIPELINES_SHADERCOMPILATIONPIPELINE_H - -#include "../../Includes.h" - -namespace MobileGL { -namespace MG_Util { -namespace Pipeline { - class UniformTraverser : public glslang::TIntermTraverser { - public: - UniformTraverser(Vector>& u, Vector>& s): uniforms(u), samplers(s) {} - - void visitSymbol(glslang::TIntermSymbol* symbol) override { - const auto& type = symbol->getType(); - if (symbol->getQualifier().isUniform()) { - auto name = symbol->getName(); - auto qualifier = symbol->getQualifier(); - - auto& uniform = uniforms.emplace_back(); - uniform.name = name; - uniform.storageQualifier = qualifier.storage; - uniform.layoutLocation = qualifier.layoutLocation; - uniform.layoutBinding = qualifier.layoutBinding; - uniform.layoutPacking = qualifier.layoutPacking; - } else if (type.getBasicType() == glslang::EbtSampler) { - auto& uniform = samplers.emplace_back(); - uniform.name = symbol->getName(); - uniform.sampler = type.getSampler(); - } - } - - Vector>& uniforms; - Vector>& samplers; - }; - - class ShaderCompilationPipeline: public IPipeline { - explicit ShaderCompilationPipeline(std::function callback); - void Invoke(SharedPtr payload); - - static TBuiltInResource& GetTBuiltInResourceInstance(); - private: - PipelineExecutor executor_; - }; -} -} -} - - -#endif //MG_UTIL_PIPELINES_SHADERCOMPILATIONPIPELINE_H diff --git a/MobileGL/MG_Util/Pipelines/Types.h b/MobileGL/MG_Util/Pipelines/Types.h deleted file mode 100644 index 5b4b57c6..00000000 --- a/MobileGL/MG_Util/Pipelines/Types.h +++ /dev/null @@ -1,93 +0,0 @@ -// -// Created by Swung 0x48 on 2025/7/16. -// -#pragma once - -#ifndef MG_UTIL_PIPELINES_TYPES_H -#define MG_UTIL_PIPELINES_TYPES_H - -namespace MobileGL { -namespace MG_Util { -namespace Pipeline { - template - class IPipeline { - void Invoke(SharedPtr payload) { - static_cast(this)->Invoke(payload); - } - }; - - enum class TUniformType { - Uniform, - Sampler - }; - - template - struct TUniform { - static_assert(false, "TUniform does not accept this enum"); - }; - - template <> - struct TUniform { - String name; - - glslang::TStorageQualifier storageQualifier; - Uint layoutLocation = 0; - Uint layoutBinding = 0; - glslang::TLayoutPacking layoutPacking; - }; - - template <> - struct TUniform { - String name; - - glslang::TSampler sampler; - }; - - struct ShaderPayload { - // In - GLenum shaderType; - String sourceStr; - - // Out - UniquePtr TShader; - Vector> uniforms; - Vector> samplers; - Int errc = 0; - String log; - }; - - struct ProgramPayload { - // In - Vector shaderTypes; - Vector> shadersToLink; - - // Out - glslang::TProgram linkedProgram; - Vector> programSpirv; - Int errc = 0; - String log; - }; - - inline static EShLanguage GetEShLanguageByShaderType(GLenum shaderType) { - switch (shaderType) { - case GL_VERTEX_SHADER: - return EShLanguage::EShLangVertex; - case GL_FRAGMENT_SHADER: - return EShLanguage::EShLangFragment; - case GL_COMPUTE_SHADER: - return EShLanguage::EShLangCompute; - case GL_TESS_CONTROL_SHADER: - return EShLanguage::EShLangTessControl; - case GL_TESS_EVALUATION_SHADER: - return EShLanguage::EShLangTessEvaluation; - case GL_GEOMETRY_SHADER: - return EShLanguage::EShLangGeometry; - default: - return EShLanguage::EShLangCount; - } - } -} -} -} - -#endif //MG_UTIL_PIPELINES_TYPES_H diff --git a/MobileGL/MG_Util/ShaderTranspiler/Types.h b/MobileGL/MG_Util/ShaderTranspiler/Types.h index 58a2ad78..fd119f68 100644 --- a/MobileGL/MG_Util/ShaderTranspiler/Types.h +++ b/MobileGL/MG_Util/ShaderTranspiler/Types.h @@ -8,33 +8,6 @@ namespace MobileGL { namespace MG_Util { namespace ShaderTranspiler { - enum class TUniformType { - Uniform, - Sampler - }; - - template - struct TUniform { - // static_assert(false, "TUniform does not accept this enum"); - }; - - template <> - struct TUniform { - String name; - - // glslang::TType type; - Uint layoutLocation = 0; - Uint layoutBinding = 0; - glslang::TLayoutPacking layoutPacking; - }; - - template <> - struct TUniform { - String name; - - glslang::TSampler sampler; - }; - struct EmptyType {}; struct ShaderAttrib { @@ -55,31 +28,6 @@ namespace MobileGL { template using Result = std::expected; - struct ShaderPayload { - // In - GLenum shaderType; - String sourceStr; - - // Out - UniquePtr TShader; - Vector> uniforms; - Vector> samplers; - Int errc = 0; - String log; - }; - - struct ProgramPayload { - // In - Vector shaderTypes; - Vector> shadersToLink; - - // Out - glslang::TProgram linkedProgram; - Vector> programSpirv; - Int errc = 0; - String log; - }; - inline static EShLanguage GetEShLanguageByShaderType(GLenum shaderType) { switch (shaderType) { case GL_VERTEX_SHADER: diff --git a/MobileGL/MG_Util/ShaderTranspiler/glslang/UniformTraverser.cpp b/MobileGL/MG_Util/ShaderTranspiler/glslang/UniformTraverser.cpp deleted file mode 100644 index d5d122a8..00000000 --- a/MobileGL/MG_Util/ShaderTranspiler/glslang/UniformTraverser.cpp +++ /dev/null @@ -1,56 +0,0 @@ -// -// Created by Swung 0x48 on 2025/7/20. -// - -#include "Includes.h" - -namespace MobileGL { -namespace MG_Util { -namespace ShaderTranspiler { - void UniformTraverser::visitSymbol(glslang::TIntermSymbol *symbol) { - auto parent = getParentNode(); - if (!parent) - return; - auto parentAgg = parent->getAsAggregate(); - if (!parentAgg || parentAgg->getOp() != glslang::EOpLinkerObjects) - return; - - const auto &type = symbol->getType(); - if (type.getBasicType() == glslang::EbtSampler) { - auto &uniform = samplers.emplace_back(); - uniform.name = symbol->getName(); - uniform.sampler = type.getSampler(); - } else if (symbol->getQualifier().isUniform()) { - auto& name = symbol->getName(); - auto qualifier = symbol->getQualifier(); - - auto &uniform = uniforms.emplace_back(); - uniform.name = name; - uniform.storageQualifier = qualifier.storage; - uniform.layoutLocation = qualifier.layoutLocation; - uniform.layoutBinding = qualifier.layoutBinding; - uniform.layoutPacking = qualifier.layoutPacking; - } - // if (symbol->getQualifier().isUniformOrBuffer()) { - // auto name = symbol->getName(); - // auto qualifier = symbol->getQualifier(); - // - // fprintf(stderr, "%s: %s\n", name.c_str(), - // glslang::GetStorageQualifierString(qualifier.storage)); - // - // if (qualifier.hasLocation()) { - // fprintf(stderr, " loc: %d\n", qualifier.layoutLocation); - // } - // if (qualifier.hasBinding()) { - // fprintf(stderr, " binding: %d\n", qualifier.layoutBinding); - // } - // if (qualifier.hasPacking()) { - // fprintf(stderr, " packing: %s\n", - // glslang::TQualifier::getLayoutPackingString( - // qualifier.layoutPacking)); - // } - // } - } -} -} -} diff --git a/MobileGL/MG_Util/ShaderTranspiler/glslang/UniformTraverser.h b/MobileGL/MG_Util/ShaderTranspiler/glslang/UniformTraverser.h deleted file mode 100644 index f6c46a6d..00000000 --- a/MobileGL/MG_Util/ShaderTranspiler/glslang/UniformTraverser.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Created by Swung 0x48 on 2025/7/20. -// - -#ifndef MOBILEGL_UNIFORMTRAVERSER_H -#define MOBILEGL_UNIFORMTRAVERSER_H - -namespace MobileGL { -namespace MG_Util { -namespace ShaderTranspiler { - class UniformTraverser : public glslang::TIntermTraverser { - public: - UniformTraverser(Vector> &u, Vector> &s) - : uniforms(u), samplers(s) {} - - void visitSymbol(glslang::TIntermSymbol *symbol) override; - - Vector> &uniforms; - Vector> &samplers; - }; -} -} -} - -#endif //MOBILEGL_UNIFORMTRAVERSER_H