Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 7e815c7

Browse files
vontureCommit Bot
authored andcommitted
Implement EXT_shadow_samplers
Bug: angleproject:4863,b/161716126 Change-Id: I6beb45d91f59a851787c9f40b40266fb985198d5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2288330 Commit-Queue: Geoff Lang <[email protected]> Reviewed-by: Tim Van Patten <[email protected]> Reviewed-by: back sept 10 - Jamie Madill <[email protected]>
1 parent e5f188b commit 7e815c7

32 files changed

+8447
-8263
lines changed

include/GLSLANG/ShaderLang.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ struct ShBuiltInResources
405405
int APPLE_clip_distance;
406406
int OES_texture_cube_map_array;
407407
int EXT_texture_cube_map_array;
408+
int EXT_shadow_samplers;
408409

409410
// Set to 1 to enable replacing GL_EXT_draw_buffers #extension directives
410411
// with GL_NV_draw_buffers in ESSL output. This flag can be used to emulate

scripts/code_generation_hashes/ANGLE_shader_translator.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"src/compiler/translator/generate_parser.py":
55
"566178ecdfae3a29803b3687fc518ebb",
66
"src/compiler/translator/glslang.l":
7-
"5af9feeb7ba8549265f8d19ec7f43343",
7+
"27b1e8d59a04bbaec10fac5688a67602",
88
"src/compiler/translator/glslang.y":
99
"1619aa1587a5fae94df9d143af732b77",
1010
"src/compiler/translator/glslang_lex_autogen.cpp":
11-
"4b94107e3314432cfdc8f9e90909e5a0",
11+
"ca9edf3f6882bdf9ac60dab16e8fb994",
1212
"src/compiler/translator/glslang_tab_autogen.cpp":
1313
"fc0ab4cb3179dc0d936ed9d56bb2dbd0",
1414
"src/compiler/translator/glslang_tab_autogen.h":
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
{
22
"src/compiler/translator/ImmutableString_ESSL_autogen.cpp":
3-
"0ea93a3bc04293f610fdbfae45f8e436",
3+
"a9a7d0620a2db1e80f8a370b523eeae5",
44
"src/compiler/translator/ImmutableString_autogen.cpp":
5-
"f3b0095f9f8669520698c845085ab62e",
5+
"afe7aec06ab49afc91a1ba25db0a3bce",
66
"src/compiler/translator/ParseContext_ESSL_autogen.h":
7-
"45035f9e1e7cd735476fc250e034bc72",
7+
"4da3f648f61218602aff76296103e0f2",
88
"src/compiler/translator/ParseContext_complete_autogen.h":
9-
"d116f43b2e3b61a73b26b301be561e0b",
9+
"272d913f6a057fe1ebce884a6bd2bb73",
1010
"src/compiler/translator/SymbolTable_ESSL_autogen.cpp":
11-
"6f3e49f813ca1fa93de47514b3390dfe",
11+
"017b7c00d55b9ec4edf084e87847f1d9",
1212
"src/compiler/translator/SymbolTable_autogen.cpp":
13-
"912d1ec634bf4178d310de6db46066f3",
13+
"ef071b17834742f56397bc63d531bb5f",
1414
"src/compiler/translator/SymbolTable_autogen.h":
1515
"2d8bed6ff5debc6546199a2add316a66",
1616
"src/compiler/translator/builtin_function_declarations.txt":
17-
"52e0dd28d8be3a0430b70c23d2b060aa",
17+
"dc84b6c5fc78d9da23204d72574dd682",
1818
"src/compiler/translator/builtin_variables.json":
1919
"98d347a6ed181eca3d89bfd73193d787",
2020
"src/compiler/translator/gen_builtin_symbols.py":
2121
"ef6fde209ca86ffb1752fc3a5b9d72d7",
2222
"src/compiler/translator/tree_util/BuiltIn_ESSL_autogen.h":
23-
"2ca793d3326d9e39e7d4ffbca7041e52",
23+
"fa72b4b824dd85feeda5f984866a017f",
2424
"src/compiler/translator/tree_util/BuiltIn_complete_autogen.h":
25-
"f3713a80fc4ffee53ba4992cc275d5b7",
25+
"c3f43a7fafcf0bad43178be1a7da5d0f",
2626
"src/tests/compiler_tests/ImmutableString_test_ESSL_autogen.cpp":
27-
"14cbdec9c41ae4a27910347b2c5e59ef",
27+
"1f48b488c4e436833f5341ce1ad95f15",
2828
"src/tests/compiler_tests/ImmutableString_test_autogen.cpp":
29-
"d368befd9e4c194c5f6b987b3628a184"
29+
"aeacada0c801b923edefe3a74fc16285"
3030
}

src/compiler/fuzz/translator_fuzzer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
165165
resources.MaxDualSourceDrawBuffers = 1;
166166
resources.EXT_gpu_shader5 = 1;
167167
resources.MaxClipDistances = 1;
168+
resources.EXT_shadow_samplers = 1;
168169

169170
if (!translator->Init(resources))
170171
{

src/compiler/translator/Compiler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,7 @@ void TCompiler::setResourceString()
10891089
<< ":APPLE_clip_distance:" << mResources.APPLE_clip_distance
10901090
<< ":OES_texture_cube_map_array:" << mResources.OES_texture_cube_map_array
10911091
<< ":EXT_texture_cube_map_array:" << mResources.EXT_texture_cube_map_array
1092+
<< ":EXT_shadow_samplers:" << mResources.EXT_shadow_samplers
10921093
<< ":MinProgramTextureGatherOffset:" << mResources.MinProgramTextureGatherOffset
10931094
<< ":MaxProgramTextureGatherOffset:" << mResources.MaxProgramTextureGatherOffset
10941095
<< ":MaxImageUnits:" << mResources.MaxImageUnits

src/compiler/translator/ExtensionBehavior.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
OP(WEBGL_video_texture) \
4141
OP(APPLE_clip_distance) \
4242
OP(OES_texture_cube_map_array) \
43-
OP(EXT_texture_cube_map_array)
43+
OP(EXT_texture_cube_map_array) \
44+
OP(EXT_shadow_samplers)
4445

4546
namespace sh
4647
{

src/compiler/translator/ExtensionBehavior.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ enum class TExtension : uint8_t
4747
APPLE_clip_distance,
4848
OES_texture_cube_map_array,
4949
EXT_texture_cube_map_array,
50+
EXT_shadow_samplers,
5051
};
5152

5253
enum TBehavior : uint8_t

src/compiler/translator/ImmutableString_ESSL_autogen.cpp

Lines changed: 147 additions & 155 deletions
Large diffs are not rendered by default.

src/compiler/translator/ImmutableString_autogen.cpp

Lines changed: 315 additions & 316 deletions
Large diffs are not rendered by default.

src/compiler/translator/Initialize.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ void InitExtensionBehavior(const ShBuiltInResources &resources, TExtensionBehavi
125125
{
126126
extBehavior[TExtension::EXT_texture_cube_map_array] = EBhUndefined;
127127
}
128+
if (resources.EXT_shadow_samplers)
129+
{
130+
extBehavior[TExtension::EXT_shadow_samplers] = EBhUndefined;
131+
}
128132
}
129133

130134
void ResetExtensionBehavior(const ShBuiltInResources &resources,

0 commit comments

Comments
 (0)