Use default set of glslang limits instead of 0s, which might fail

This commit is contained in:
baldurk
2018-10-25 15:30:02 +01:00
parent 034d83c4ff
commit 1e6637098a
2 changed files with 5 additions and 3 deletions
+2 -3
View File
@@ -260,11 +260,10 @@ GLuint MakeSeparableShaderProgram(WrappedOpenGL &drv, GLenum type, vector<string
sh.setEnvClient(glslang::EShClientOpenGL, glslang::EShTargetOpenGL_450);
sh.setEnvTarget(glslang::EShTargetNone, glslang::EShTargetSpv_1_0);
TBuiltInResource res = {};
glslang::TShader::ForbidIncluder incl;
bool success =
sh.preprocess(&res, 100, ENoProfile, false, false, EShMsgOnlyPreprocessor, &src, incl);
bool success = sh.preprocess(&DefaultResources, 100, ENoProfile, false, false,
EShMsgOnlyPreprocessor, &src, incl);
if(!success)
{
@@ -29,6 +29,7 @@
#include <utility>
#include <vector>
#include "3rdparty/glslang/SPIRV/spirv.hpp"
#include "3rdparty/glslang/glslang/Include/ResourceLimits.h"
#include "api/replay/renderdoc_replay.h"
using std::string;
@@ -178,6 +179,8 @@ glslang::TShader *CompileShaderForReflection(SPIRVShaderStage stage,
const std::vector<std::string> &sources);
glslang::TProgram *LinkProgramForReflection(const std::vector<glslang::TShader *> &shaders);
extern TBuiltInResource DefaultResources;
enum class ReflectionInterface
{
Input,