Remove GlslangToSpv.h dependency on SpvTools.h

The dependency was only because of the SpvOptions struct which is used
in both, but really is part of the glslang public interface and should
be in the public GlslangToSpv.h header.
This commit is contained in:
Arcady Goldmints-Orlov 2023-11-08 18:13:08 -07:00 committed by arcady-lunarg
parent 62de186c33
commit 6f9ab3c2de
5 changed files with 16 additions and 14 deletions

View file

@ -43,6 +43,7 @@
#include "spirv.hpp"
#include "GlslangToSpv.h"
#include "SpvBuilder.h"
#include "SpvTools.h"
namespace spv {
#include "GLSL.std.450.h"
#include "GLSL.ext.KHR.h"

View file

@ -35,8 +35,6 @@
#pragma once
#include "SpvTools.h"
#include <string>
#include <vector>
@ -45,6 +43,18 @@
namespace glslang {
class TIntermediate;
struct SpvOptions {
bool generateDebugInfo {false};
bool stripDebugInfo {false};
bool disableOptimizer {true};
bool optimizeSize {false};
bool disassemble {false};
bool validate {false};
bool emitNonSemanticShaderDebugInfo {false};
bool emitNonSemanticShaderDebugSource{ false };
bool compileOnly{false};
};
void GetSpirvVersion(std::string&);
int GetSpirvGeneratorVersion();
void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,

View file

@ -48,22 +48,11 @@
#endif
#include "glslang/MachineIndependent/localintermediate.h"
#include "GlslangToSpv.h"
#include "Logger.h"
namespace glslang {
struct SpvOptions {
bool generateDebugInfo {false};
bool stripDebugInfo {false};
bool disableOptimizer {true};
bool optimizeSize {false};
bool disassemble {false};
bool validate {false};
bool emitNonSemanticShaderDebugInfo {false};
bool emitNonSemanticShaderDebugSource{ false };
bool compileOnly{false};
};
#if ENABLE_OPT
// Translate glslang's view of target versioning to what SPIRV-Tools uses.

View file

@ -46,6 +46,7 @@
#include "DirStackFileIncluder.h"
#include "./../glslang/Include/ShHandle.h"
#include "./../glslang/Public/ShaderLang.h"
#include "../glslang/MachineIndependent/localintermediate.h"
#include "../SPIRV/GlslangToSpv.h"
#include "../SPIRV/GLSL.std.450.h"
#include "../SPIRV/doc.h"

View file

@ -48,6 +48,7 @@
#include "SPIRV/disassemble.h"
#include "SPIRV/doc.h"
#include "SPIRV/SPVRemapper.h"
#include "glslang/Include/Types.h"
#include "glslang/Public/ResourceLimits.h"
#include "glslang/Public/ShaderLang.h"