mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Remove usages of SPVC
Remove all usages of SPVC from the code and update the fuzzers. Some of the include paths and deps came transitively from spvc, so needed to update build rules. This patch does NOT remove the flags related to spvc usage, they are just no-ops as the moment. After this patch lands I will remove the usage of those flags from the bots, then remove the flags. BUG=dawn:521 Change-Id: I0d7c3e28f79354c78f00c48b6a383b823094a069 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/27900 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
a1758eef07
commit
c35e2ba379
10
third_party/CMakeLists.txt
vendored
10
third_party/CMakeLists.txt
vendored
@@ -39,11 +39,7 @@ if (NOT TARGET glslang)
|
||||
add_subdirectory(${DAWN_GLSLANG_DIR})
|
||||
endif()
|
||||
|
||||
if (TARGET shaderc)
|
||||
if (NOT TARGET shaderc_spvc)
|
||||
message(FATAL_ERROR "Dawn: If shaderc is configured before Dawn, it must include SPVC")
|
||||
endif()
|
||||
else()
|
||||
if (NOT TARGET shaderc)
|
||||
set(SHADERC_SKIP_TESTS ON CACHE BOOL "" FORCE)
|
||||
set(SHADERC_SKIP_INSTALL ON CACHE BOOL "" FORCE)
|
||||
set(SHADERC_ENABLE_SPVC ON CACHE BOOL "" FORCE)
|
||||
@@ -56,10 +52,8 @@ else()
|
||||
|
||||
# Let SPVC's CMakeLists.txt deal with configuring SPIRV-Cross
|
||||
set(SPIRV_CROSS_ENABLE_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(SHADERC_SPIRV_CROSS_DIR "${DAWN_SPIRV_CROSS_DIR}" CACHE BOOL "" FORCE)
|
||||
|
||||
message(STATUS "Dawn: using shaderc[_spvc] at ${DAWN_SHADERC_DIR}")
|
||||
message(STATUS "Dawn: - with SPIRV-Cross at ${DAWN_SPIRV_CROSS_DIR}")
|
||||
message(STATUS "Dawn: using shaderc at ${DAWN_SHADERC_DIR}")
|
||||
add_subdirectory(${DAWN_SHADERC_DIR})
|
||||
endif()
|
||||
|
||||
|
||||
70
third_party/gn/spirv_cross/BUILD.gn
vendored
Normal file
70
third_party/gn/spirv_cross/BUILD.gn
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
# Copyright 2020 The Dawn Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("../../../scripts/dawn_overrides_with_defaults.gni")
|
||||
|
||||
import("//build_overrides/build.gni")
|
||||
|
||||
# SPIRV_Cross does not have BUILD.gn rules, so implement our own.
|
||||
is_msvc = is_win && !is_clang
|
||||
|
||||
config("spirv_cross_public") {
|
||||
include_dirs = [
|
||||
"${dawn_spirv_cross_dir}",
|
||||
"${dawn_spirv_cross_dir}/..",
|
||||
]
|
||||
defines = [ "SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS" ]
|
||||
}
|
||||
|
||||
config("spirv_cross_internal") {
|
||||
if (!is_msvc) {
|
||||
cflags_cc = [
|
||||
"-Wno-implicit-fallthrough",
|
||||
"-Wno-return-type",
|
||||
"-Wno-sign-compare",
|
||||
]
|
||||
} else {
|
||||
# Disable "not all control paths return a value" warning.
|
||||
cflags_cc = [ "/wd4715" ]
|
||||
}
|
||||
}
|
||||
|
||||
source_set("spirv_cross") {
|
||||
public_configs = [ ":spirv_cross_public" ]
|
||||
configs += [ ":spirv_cross_internal" ]
|
||||
|
||||
sources = [
|
||||
"${dawn_spirv_cross_dir}/GLSL.std.450.h",
|
||||
"${dawn_spirv_cross_dir}/spirv.hpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_cfg.cpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_cfg.hpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_common.hpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_cross.cpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_cross.hpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_cross_containers.hpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_cross_error_handling.hpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_cross_parsed_ir.cpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_cross_parsed_ir.hpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_glsl.cpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_glsl.hpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_hlsl.cpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_hlsl.hpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_msl.cpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_msl.hpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_parser.cpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_parser.hpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_reflect.cpp",
|
||||
"${dawn_spirv_cross_dir}/spirv_reflect.hpp",
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user