mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 19:31:25 +00:00
Add in flag for using spvc instead of direct spriv-cross access
Currently does nothing interesting, future CLs will flesh out the functionality. BUG=dawn:281 Change-Id: I89750a45ff5a42a13e1494cafd433bb7ef719b10 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13841 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
parent
d3123137b1
commit
8f3dc5836b
7
BUILD.gn
7
BUILD.gn
@ -127,6 +127,11 @@ source_set("libdawn_native_sources") {
|
|||||||
"${dawn_spirv_tools_dir}:spvtools_val",
|
"${dawn_spirv_tools_dir}:spvtools_val",
|
||||||
"third_party:spirv_cross",
|
"third_party:spirv_cross",
|
||||||
]
|
]
|
||||||
|
defines = []
|
||||||
|
if (dawn_use_spvc) {
|
||||||
|
deps += [ "${dawn_shaderc_dir}:libshaderc_spvc" ]
|
||||||
|
defines += [ "DAWN_USE_SPVC" ]
|
||||||
|
}
|
||||||
|
|
||||||
configs += [ ":libdawn_native_internal" ]
|
configs += [ ":libdawn_native_internal" ]
|
||||||
libs = []
|
libs = []
|
||||||
@ -500,7 +505,7 @@ source_set("libdawn_native_sources") {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
if (dawn_enable_vulkan_validation_layers) {
|
if (dawn_enable_vulkan_validation_layers) {
|
||||||
defines = [
|
defines += [
|
||||||
"DAWN_ENABLE_VULKAN_VALIDATION_LAYERS",
|
"DAWN_ENABLE_VULKAN_VALIDATION_LAYERS",
|
||||||
"DAWN_VK_DATA_DIR=\"$vulkan_data_subdir\"",
|
"DAWN_VK_DATA_DIR=\"$vulkan_data_subdir\"",
|
||||||
]
|
]
|
||||||
|
@ -44,6 +44,10 @@ declare_args() {
|
|||||||
# GLSL/HLSL/MSL compiler. This implicitly pulls in the GLSL
|
# GLSL/HLSL/MSL compiler. This implicitly pulls in the GLSL
|
||||||
# compiler, since it is a sub-class of if.
|
# compiler, since it is a sub-class of if.
|
||||||
dawn_enable_cross_reflection = false
|
dawn_enable_cross_reflection = false
|
||||||
|
|
||||||
|
# Enables using spvc for accessing SPIR-V toolchain, instead of
|
||||||
|
# directly accessing it in Dawn.
|
||||||
|
dawn_use_spvc = false
|
||||||
}
|
}
|
||||||
|
|
||||||
# GN does not allow reading a variable defined in the same declare_args().
|
# GN does not allow reading a variable defined in the same declare_args().
|
||||||
|
5
third_party/BUILD.gn
vendored
5
third_party/BUILD.gn
vendored
@ -66,8 +66,9 @@ static_library("spirv_cross") {
|
|||||||
"${spirv_cross_dir}/spirv_parser.hpp",
|
"${spirv_cross_dir}/spirv_parser.hpp",
|
||||||
]
|
]
|
||||||
|
|
||||||
need_glsl_cross = dawn_enable_opengl || dawn_enable_cross_reflection
|
need_glsl_cross =
|
||||||
need_reflection_cross = dawn_enable_cross_reflection
|
dawn_enable_opengl || dawn_enable_cross_reflection || dawn_use_spvc
|
||||||
|
need_reflection_cross = dawn_enable_cross_reflection || dawn_use_spvc
|
||||||
|
|
||||||
if (dawn_enable_d3d12) {
|
if (dawn_enable_d3d12) {
|
||||||
sources += [
|
sources += [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user