Repository navigation
GL: make shared/waterconfig.h pure ASCII, fixes AMD GLSL "#endif miss… - #2194
Merged
Xottab-DUTY merged 1 commit intoOct 15, 2026
Merged
Conversation
…ing" shared/waterconfig.h was the only shader source in the whole tree carrying non-ASCII bytes: it is CP1251-encoded and has Russian comments on lines 4, 23 and 35. The engine feeds shader text to glShaderSource() as a list of raw byte strings, so AMD's GLSL front-end receives the invalid UTF-8 sequence 0xED 0xE0 (line 4, first bytes of the first Russian word), aborts the preprocessor while #ifndef _WATERCONFIG_H is still open and reports ERROR: 44:4: error(# 92) Syntax error: #endif missing. Compilation stopped where 44 is the index of this file in the glShaderSource() string array and 4 is its line. Only the water shaders include this header, which is why just gl\water_soft.vs, gl\waterd_soft.vs and gl\waterd_soft.ps fail on AMD and get silently replaced with stub_default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ing"
shared/waterconfig.h was the only shader source in the whole tree carrying non-ASCII bytes: it is CP1251-encoded and has Russian comments on lines 4, 23 and 35. The engine feeds shader text to glShaderSource() as a list of raw byte strings, so AMD's GLSL front-end receives the invalid UTF-8 sequence 0xED 0xE0 (line 4, first bytes of the first Russian word), aborts the preprocessor while #ifndef _WATERCONFIG_H is still open and reports
ERROR: 44:4: error(# 92) Syntax error: #endif missing. Compilation stopped
where 44 is the index of this file in the glShaderSource() string array and 4 is its line. Only the water shaders include this header, which is why just gl\water_soft.vs, gl\waterd_soft.vs and gl\waterd_soft.ps fail on AMD and get silently replaced with stub_default.
Боже неужели с текущими ресурсами я смог исправить баг над которым я думал два года назад. Вообщем виндовые амд драйверы семейства gcn1, terascale 2 и ниже достаточно строгие в компиляции шейдеров. я сперва думал что они просто сломаны а оказалось нет, в шейдерах не должно быть просто cp1251.
До пулреквеста:

После пулреквеста:
