diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-08-10 15:52:32 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-10 12:52:32 -0700 |
| commit | 023622cc8b6e2533b0a1ede89d729ca5b0a47da2 (patch) | |
| tree | bd153a4e859da14f2e9013348eb72e3906e704e2 | |
| parent | dd980b492aba9ea1540193434184489d9d04608d (diff) | |
Glslang texel offset bug fix (#1485)
* Fix the minProgramTexelOffset should be -.
* Improve comments.
| -rw-r--r-- | source/slang-glslang/slang-glslang.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/slang-glslang/slang-glslang.cpp b/source/slang-glslang/slang-glslang.cpp index 02d5a8459..1c756cb6c 100644 --- a/source/slang-glslang/slang-glslang.cpp +++ b/source/slang-glslang/slang-glslang.cpp @@ -44,7 +44,8 @@ static TBuiltInResource _calcBuiltinResources() { // NOTE! This is a bit of a hack - to set all the fields to true/UNLIMITED. - + // Care must be taken if new variables are introduced, the default may not be appropriate. + // We are relying on limits being after the other fields. SLANG_COMPILE_TIME_ASSERT(SLANG_OFFSET_OF(TBuiltInResource, limits) > 0); // We are relying on maxLights being the first parameter, and all values will have the same type @@ -61,6 +62,10 @@ static TBuiltInResource _calcBuiltinResources() dst[i] = UNLIMITED; } } + + // In the sea of variables there is a min value + resource.minProgramTexelOffset = -UNLIMITED; + // Set up the bools { TLimits* limits = &resource.limits; |
