[GPU/UI] XeSL readability improvements + float suffix

Use the _xe suffix instead of the xesl_ prefix for quicker visual
recognition of identifiers, also switch to snake_case for consistency.

Also add the f suffix to float32 literals because the Metal Shading
Language is based on C++.
This commit is contained in:
Triang3l
2025-08-19 21:36:06 +03:00
parent 3b4b04c371
commit 04d5c40d0d
201 changed files with 90552 additions and 92369 deletions

View File

@@ -907,11 +907,11 @@ class BuildShadersCommand(Command):
# well as to enable `#include` in GLSL, to include `xesl.xesli` itself,
# without writing the same `#if` / `#extension` / `#endif` in every
# shader). Also, not all shading languages provide a built-in
# preprocessor definition for identification of them, so XESL_LANGUAGE_*
# is also defined via the build arguments. XESL_LANGUAGE_* is set
# regardless of whether the file is XeSL or a raw source file in a
# specific language, as XeSL headers may be used in language-specific
# sources.
# preprocessor definition for identification of them, so
# `SHADING_LANGUAGE_*_XE` is also defined via the build arguments.
# `SHADING_LANGUAGE_*_XE` is set regardless of whether the file is XeSL
# or a raw source file in a specific language, as XeSL headers may be
# used in language-specific sources.
# Direct3D DXBC.
if all_targets or 'dxbc' in targets:
@@ -976,7 +976,7 @@ class BuildShadersCommand(Command):
# clutter in this case.
if subprocess.call([
fxc,
'/D', 'XESL_LANGUAGE_HLSL=1',
'/D', 'SHADING_LANGUAGE_HLSL_XE=1',
'/Fh', dxbc_file_path_base + '.h',
'/T', dxbc_stage + '_5_1',
'/Vn', dxbc_identifier,
@@ -1064,7 +1064,7 @@ class BuildShadersCommand(Command):
# --stdin must be before -S for some reason.
glslang_arguments = [glslang,
'--stdin' if src_is_xesl else src_path,
'-DXESL_LANGUAGE_GLSL=1',
'-DSHADING_LANGUAGE_GLSL_XE=1',
'-S', spirv_stage,
'-o', spirv_glslang_file_path,
'-V']