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:
parent
62de186c33
commit
6f9ab3c2de
5 changed files with 16 additions and 14 deletions
|
|
@ -43,6 +43,7 @@
|
||||||
#include "spirv.hpp"
|
#include "spirv.hpp"
|
||||||
#include "GlslangToSpv.h"
|
#include "GlslangToSpv.h"
|
||||||
#include "SpvBuilder.h"
|
#include "SpvBuilder.h"
|
||||||
|
#include "SpvTools.h"
|
||||||
namespace spv {
|
namespace spv {
|
||||||
#include "GLSL.std.450.h"
|
#include "GLSL.std.450.h"
|
||||||
#include "GLSL.ext.KHR.h"
|
#include "GLSL.ext.KHR.h"
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "SpvTools.h"
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
@ -45,6 +43,18 @@
|
||||||
namespace glslang {
|
namespace glslang {
|
||||||
class TIntermediate;
|
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&);
|
void GetSpirvVersion(std::string&);
|
||||||
int GetSpirvGeneratorVersion();
|
int GetSpirvGeneratorVersion();
|
||||||
void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
|
void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
|
||||||
|
|
|
||||||
|
|
@ -48,22 +48,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "glslang/MachineIndependent/localintermediate.h"
|
#include "glslang/MachineIndependent/localintermediate.h"
|
||||||
|
#include "GlslangToSpv.h"
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
|
||||||
namespace glslang {
|
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
|
#if ENABLE_OPT
|
||||||
|
|
||||||
// Translate glslang's view of target versioning to what SPIRV-Tools uses.
|
// Translate glslang's view of target versioning to what SPIRV-Tools uses.
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@
|
||||||
#include "DirStackFileIncluder.h"
|
#include "DirStackFileIncluder.h"
|
||||||
#include "./../glslang/Include/ShHandle.h"
|
#include "./../glslang/Include/ShHandle.h"
|
||||||
#include "./../glslang/Public/ShaderLang.h"
|
#include "./../glslang/Public/ShaderLang.h"
|
||||||
|
#include "../glslang/MachineIndependent/localintermediate.h"
|
||||||
#include "../SPIRV/GlslangToSpv.h"
|
#include "../SPIRV/GlslangToSpv.h"
|
||||||
#include "../SPIRV/GLSL.std.450.h"
|
#include "../SPIRV/GLSL.std.450.h"
|
||||||
#include "../SPIRV/doc.h"
|
#include "../SPIRV/doc.h"
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@
|
||||||
#include "SPIRV/disassemble.h"
|
#include "SPIRV/disassemble.h"
|
||||||
#include "SPIRV/doc.h"
|
#include "SPIRV/doc.h"
|
||||||
#include "SPIRV/SPVRemapper.h"
|
#include "SPIRV/SPVRemapper.h"
|
||||||
|
#include "glslang/Include/Types.h"
|
||||||
#include "glslang/Public/ResourceLimits.h"
|
#include "glslang/Public/ResourceLimits.h"
|
||||||
#include "glslang/Public/ShaderLang.h"
|
#include "glslang/Public/ShaderLang.h"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue