Skip to content

Commit f5add0b

Browse files
authored
Merge pull request KhronosGroup#2337 from KhronosGroup/revert-ANGLE
Revert "Merge pull request KhronosGroup#2330 from ShabbyX/optimize_for_angle"
2 parents 5799f5b + 07211b4 commit f5add0b

27 files changed

+3147
-13707
lines changed

BUILD.gn

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ template("glslang_sources_common") {
109109
"SPIRV/SpvBuilder.cpp",
110110
"SPIRV/SpvBuilder.h",
111111
"SPIRV/SpvPostProcess.cpp",
112+
"SPIRV/SpvTools.cpp",
112113
"SPIRV/SpvTools.h",
113114
"SPIRV/bitutils.h",
114115
"SPIRV/disassemble.cpp",
@@ -155,7 +156,7 @@ template("glslang_sources_common") {
155156
"glslang/MachineIndependent/attribute.cpp",
156157
"glslang/MachineIndependent/attribute.h",
157158
"glslang/MachineIndependent/gl_types.h",
158-
"glslang/MachineIndependent/glslang_angle_tab.cpp.h",
159+
"glslang/MachineIndependent/glslang_tab.cpp",
159160
"glslang/MachineIndependent/glslang_tab.cpp.h",
160161
"glslang/MachineIndependent/intermOut.cpp",
161162
"glslang/MachineIndependent/iomapper.cpp",
@@ -206,25 +207,9 @@ template("glslang_sources_common") {
206207
}
207208

208209
defines = []
209-
if (invoker.is_angle) {
210-
sources += [
211-
"glslang/MachineIndependent/glslang_angle_tab.cpp",
212-
]
213-
defines += [ "GLSLANG_ANGLE" ]
214-
}
215-
else {
216-
sources += [
217-
"glslang/MachineIndependent/glslang_tab.cpp",
218-
]
219-
}
220-
221210
if (invoker.enable_opt) {
222-
sources += [ "SPIRV/SpvTools.cpp" ]
223211
defines += [ "ENABLE_OPT=1" ]
224212
}
225-
if (invoker.is_angle) {
226-
defines += [ "GLSLANG_ANGLE" ]
227-
}
228213

229214
if (is_win) {
230215
sources += [ "glslang/OSDependent/Windows/ossource.cpp" ]
@@ -272,13 +257,11 @@ template("glslang_sources_common") {
272257
glslang_sources_common("glslang_lib_sources") {
273258
enable_opt = !glslang_angle
274259
enable_hlsl = !glslang_angle
275-
is_angle = glslang_angle
276260
}
277261

278262
glslang_sources_common("glslang_sources") {
279263
enable_opt = true
280264
enable_hlsl = true
281-
is_angle = false
282265
}
283266

284267
source_set("glslang_default_resource_limits_sources") {

SPIRV/GlslangToSpv.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,6 @@ spv::SourceLanguage TranslateSourceLanguage(glslang::EShSource source, EProfile
283283
{
284284
#ifdef GLSLANG_WEB
285285
return spv::SourceLanguageESSL;
286-
#elif defined(GLSLANG_ANGLE)
287-
return spv::SourceLanguageGLSL;
288286
#endif
289287

290288
switch (source) {
@@ -8688,7 +8686,7 @@ void OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName)
86888686
// Write SPIR-V out to a text file with 32-bit hexadecimal words
86898687
void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName)
86908688
{
8691-
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
8689+
#ifndef GLSLANG_WEB
86928690
std::ofstream out;
86938691
out.open(baseName, std::ios::binary | std::ios::out);
86948692
if (out.fail())

0 commit comments

Comments
 (0)