mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-12 21:20:06 +00:00
Merge pull request #2322 from ShabbyX/fix-dawn-tests
gn: Fix dawn tests in Chromium
This commit is contained in:
commit
f5ed7a69d5
48
BUILD.gn
48
BUILD.gn
@ -50,16 +50,20 @@ spirv_tools_dir = glslang_spirv_tools_dir
|
|||||||
|
|
||||||
config("glslang_public") {
|
config("glslang_public") {
|
||||||
include_dirs = [ "." ]
|
include_dirs = [ "." ]
|
||||||
|
}
|
||||||
|
|
||||||
if (!glslang_angle) {
|
config("glslang_hlsl") {
|
||||||
defines = [ "ENABLE_HLSL=1" ]
|
defines = [ "ENABLE_HLSL=1" ]
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template("glslang_sources_common") {
|
template("glslang_sources_common") {
|
||||||
source_set(target_name) {
|
source_set(target_name) {
|
||||||
public_configs = [ ":glslang_public" ]
|
public_configs = [ ":glslang_public" ]
|
||||||
|
|
||||||
|
if (invoker.enable_hlsl) {
|
||||||
|
public_configs += [ ":glslang_hlsl" ]
|
||||||
|
}
|
||||||
|
|
||||||
sources = [
|
sources = [
|
||||||
"OGLCompilersDLL/InitializeDll.cpp",
|
"OGLCompilersDLL/InitializeDll.cpp",
|
||||||
"OGLCompilersDLL/InitializeDll.h",
|
"OGLCompilersDLL/InitializeDll.h",
|
||||||
@ -152,7 +156,16 @@ template("glslang_sources_common") {
|
|||||||
"glslang/Public/ShaderLang.h",
|
"glslang/Public/ShaderLang.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (!glslang_angle) {
|
# Workaround gn issue complaining about these not being allowed even though GLSLANG_HLSL is not
|
||||||
|
# defined.
|
||||||
|
sources += [
|
||||||
|
"glslang/HLSL/hlslParseHelper.h",
|
||||||
|
"glslang/HLSL/hlslParseables.h",
|
||||||
|
"glslang/HLSL/hlslScanContext.h",
|
||||||
|
"glslang/HLSL/hlslTokens.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
if (invoker.enable_hlsl) {
|
||||||
sources += [
|
sources += [
|
||||||
"glslang/HLSL/hlslAttributes.cpp",
|
"glslang/HLSL/hlslAttributes.cpp",
|
||||||
"glslang/HLSL/hlslAttributes.h",
|
"glslang/HLSL/hlslAttributes.h",
|
||||||
@ -160,13 +173,9 @@ template("glslang_sources_common") {
|
|||||||
"glslang/HLSL/hlslGrammar.h",
|
"glslang/HLSL/hlslGrammar.h",
|
||||||
"glslang/HLSL/hlslOpMap.cpp",
|
"glslang/HLSL/hlslOpMap.cpp",
|
||||||
"glslang/HLSL/hlslOpMap.h",
|
"glslang/HLSL/hlslOpMap.h",
|
||||||
"glslang/HLSL/hlslParseables.cpp",
|
|
||||||
"glslang/HLSL/hlslParseables.h",
|
|
||||||
"glslang/HLSL/hlslParseHelper.cpp",
|
"glslang/HLSL/hlslParseHelper.cpp",
|
||||||
"glslang/HLSL/hlslParseHelper.h",
|
"glslang/HLSL/hlslParseables.cpp",
|
||||||
"glslang/HLSL/hlslScanContext.cpp",
|
"glslang/HLSL/hlslScanContext.cpp",
|
||||||
"glslang/HLSL/hlslScanContext.h",
|
|
||||||
"glslang/HLSL/hlslTokens.h",
|
|
||||||
"glslang/HLSL/hlslTokenStream.cpp",
|
"glslang/HLSL/hlslTokenStream.cpp",
|
||||||
"glslang/HLSL/hlslTokenStream.h",
|
"glslang/HLSL/hlslTokenStream.h",
|
||||||
]
|
]
|
||||||
@ -207,7 +216,7 @@ template("glslang_sources_common") {
|
|||||||
if (invoker.enable_opt) {
|
if (invoker.enable_opt) {
|
||||||
deps = [
|
deps = [
|
||||||
"${spirv_tools_dir}:spvtools_opt",
|
"${spirv_tools_dir}:spvtools_opt",
|
||||||
"${spirv_tools_dir}:spvtools_val"
|
"${spirv_tools_dir}:spvtools_val",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,19 +225,21 @@ template("glslang_sources_common") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
glslang_sources_common("glslang_sources") {
|
glslang_sources_common("glslang_lib_sources") {
|
||||||
enable_opt = !glslang_angle
|
enable_opt = !glslang_angle
|
||||||
|
enable_hlsl = !glslang_angle
|
||||||
}
|
}
|
||||||
|
|
||||||
glslang_sources_common("glslang_standalone_sources") {
|
glslang_sources_common("glslang_sources") {
|
||||||
enable_opt = true
|
enable_opt = true
|
||||||
|
enable_hlsl = true
|
||||||
}
|
}
|
||||||
|
|
||||||
source_set("glslang_default_resource_limits_sources") {
|
source_set("glslang_default_resource_limits_sources") {
|
||||||
sources = [
|
sources = [
|
||||||
"glslang/Include/ResourceLimits.h",
|
|
||||||
"StandAlone/ResourceLimits.cpp",
|
"StandAlone/ResourceLimits.cpp",
|
||||||
"StandAlone/ResourceLimits.h",
|
"StandAlone/ResourceLimits.h",
|
||||||
|
"glslang/Include/ResourceLimits.h",
|
||||||
]
|
]
|
||||||
public_configs = [ ":glslang_public" ]
|
public_configs = [ ":glslang_public" ]
|
||||||
|
|
||||||
@ -247,21 +258,18 @@ executable("glslang_validator") {
|
|||||||
defines = [ "ENABLE_OPT=1" ]
|
defines = [ "ENABLE_OPT=1" ]
|
||||||
deps = [
|
deps = [
|
||||||
":glslang_default_resource_limits_sources",
|
":glslang_default_resource_limits_sources",
|
||||||
":glslang_standalone_sources",
|
":glslang_sources",
|
||||||
]
|
]
|
||||||
|
public_configs = [ ":glslang_hlsl" ]
|
||||||
|
|
||||||
configs -= _configs_to_remove
|
configs -= _configs_to_remove
|
||||||
configs += _configs_to_add
|
configs += _configs_to_add
|
||||||
}
|
}
|
||||||
|
|
||||||
executable("spirv-remap") {
|
executable("spirv-remap") {
|
||||||
sources = [
|
sources = [ "StandAlone/spirv-remap.cpp" ]
|
||||||
"StandAlone/spirv-remap.cpp",
|
|
||||||
]
|
|
||||||
defines = [ "ENABLE_OPT=1" ]
|
defines = [ "ENABLE_OPT=1" ]
|
||||||
deps = [
|
deps = [ ":glslang_sources" ]
|
||||||
":glslang_standalone_sources",
|
|
||||||
]
|
|
||||||
|
|
||||||
configs -= _configs_to_remove
|
configs -= _configs_to_remove
|
||||||
configs += _configs_to_add
|
configs += _configs_to_add
|
||||||
|
Loading…
Reference in New Issue
Block a user