diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-07-11 03:05:15 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-10 12:05:15 -0700 |
| commit | 0363a4d18c655697cfb0d958add2c7bf4b156874 (patch) | |
| tree | 0bb9ad1a58916e21b58386ce5bea9f9527d1c9b5 /source/slang/slang-emit-glsl.cpp | |
| parent | cb9eb58d189af5f7e99e4aeccd5de7bab93b22dd (diff) | |
Do not fail when emitting GLSL using unorm/snorm textures (#2973)
* Do not fail when emitting GLSL using unorm/snorm textures
Ignored in glslang https://github.com/KhronosGroup/glslang/blob/main/glslang/HLSL/hlslGrammar.cpp\#L1476
* Add test for unorm modifier on glsl
Diffstat (limited to 'source/slang/slang-emit-glsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-glsl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index 64afb7ff1..853ef69ae 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -4,6 +4,7 @@ #include "../core/slang-writer.h" #include "slang-emit-source-writer.h" +#include "slang-ir-util.h" #include "slang-mangled-lexer.h" #include "slang-legalize-types.h" @@ -691,6 +692,8 @@ void GLSLSourceEmitter::_emitGLSLTextureOrTextureSamplerType(IRTextureTypeBase* void GLSLSourceEmitter::_emitGLSLTypePrefix(IRType* type, bool promoteHalfToFloat) { + type = dropNormAttributes(type); + switch (type->getOp()) { case kIROp_FloatType: |
