Move GLSL reflection tests to common place for SPIR-V to use

This commit is contained in:
baldurk
2019-08-16 16:12:01 +01:00
parent 98c8178c11
commit 3b00566ace
4 changed files with 1492 additions and 854 deletions
File diff suppressed because it is too large Load Diff
+10
View File
@@ -30,8 +30,18 @@ enum ShaderType
eShaderGLSPIRV,
};
#include <functional>
#include <string>
#include <vector>
std::string GenerateGLSLShader(const std::string &shader, ShaderType type, int version,
const std::string &defines = "");
// for unit tests
struct ShaderReflection;
struct ShaderBindpointMapping;
enum class ShaderStage : uint32_t;
using ReflectionMaker =
std::function<void(ShaderStage stage, const std::string &source, const std::string &entryPoint,
ShaderReflection &refl, ShaderBindpointMapping &mapping)>;
void TestGLSLReflection(ShaderType testType, ReflectionMaker compile);