mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
Added Abseil as a third-party dependency (Take 2)
Another attempt at https://dawn-review.googlesource.com/c/dawn/+/63780 Depends on https://skia-review.googlesource.com/c/skia/+/451638 This version of the CL fixes the Cmake and Skia compatibility issues from the previous CL. Bug: dawn:563 Change-Id: I41a7ee0aef1924df08a9be41e94effb7cd0025df Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64600 Commit-Queue: Brandon Jones <bajones@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
0ecd67a3fa
commit
a04663c13d
@@ -53,6 +53,17 @@ if (dawn_enable_vulkan) {
|
||||
dawn_enable_vulkan_loader && dawn_vulkan_loader_dir != ""
|
||||
}
|
||||
|
||||
group("dawn_abseil") {
|
||||
# When build_with_chromium=true we need to include "//third_party/abseil-cpp:absl" while
|
||||
# it's beneficial to be more specific with standalone Dawn, especially when it comes to
|
||||
# including it as a dependency in other projects (such as Skia).
|
||||
if (build_with_chromium) {
|
||||
public_deps = [ "$dawn_abseil_dir:absl" ]
|
||||
} else {
|
||||
public_deps = [ "${dawn_root}/third_party/gn/abseil-cpp:str_format" ]
|
||||
}
|
||||
}
|
||||
|
||||
config("dawn_native_internal") {
|
||||
configs = [ "${dawn_root}/src/common:dawn_internal" ]
|
||||
|
||||
@@ -142,6 +153,7 @@ source_set("dawn_native_headers") {
|
||||
# except those that define exported symbols.
|
||||
source_set("dawn_native_sources") {
|
||||
deps = [
|
||||
":dawn_abseil",
|
||||
":dawn_native_headers",
|
||||
":dawn_native_utils_gen",
|
||||
"${dawn_root}/src/common",
|
||||
|
||||
@@ -186,6 +186,8 @@ target_link_libraries(dawn_native
|
||||
dawn_internal_config
|
||||
libtint
|
||||
SPIRV-Tools-opt
|
||||
absl_strings
|
||||
absl_str_format_internal
|
||||
)
|
||||
|
||||
if (DAWN_REQUIRES_SPIRV_CROSS)
|
||||
@@ -195,6 +197,8 @@ if (DAWN_REQUIRES_SPIRV_CROSS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_include_directories(dawn_native PRIVATE ${DAWN_ABSEIL_DIR})
|
||||
|
||||
if (DAWN_USE_X11)
|
||||
find_package(X11 REQUIRED)
|
||||
target_link_libraries(dawn_native PRIVATE ${X11_LIBRARIES})
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "dawn_native/ShaderModule.h"
|
||||
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "common/Constants.h"
|
||||
#include "common/HashUtils.h"
|
||||
#include "dawn_native/BindGroupLayout.h"
|
||||
@@ -35,10 +36,8 @@ namespace dawn_native {
|
||||
namespace {
|
||||
|
||||
std::string GetShaderDeclarationString(BindGroupIndex group, BindingNumber binding) {
|
||||
std::ostringstream ostream;
|
||||
ostream << "the shader module declaration at set " << static_cast<uint32_t>(group)
|
||||
<< " binding " << static_cast<uint32_t>(binding);
|
||||
return ostream.str();
|
||||
return absl::StrFormat("the shader module declaration at set %u, binding %u",
|
||||
static_cast<uint32_t>(group), static_cast<uint32_t>(binding));
|
||||
}
|
||||
|
||||
tint::transform::VertexFormat ToTintVertexFormat(wgpu::VertexFormat format) {
|
||||
|
||||
Reference in New Issue
Block a user