Skip to content

Commit

Permalink
Manually roll Dawn after Tint refactoring
Browse files Browse the repository at this point in the history
https://dawn.googlesource.com/dawn.git/+log/f16b9bbd6..9a56b25a3

See also:
https://dawn-review.googlesource.com/c/dawn/+/124240

Change-Id: Ibd901b720bf39f2c694fccd4cc1222e1b71dab32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/656885
Reviewed-by: Michael Ludwig <[email protected]>
Commit-Queue: Arman Uguray <[email protected]>
  • Loading branch information
kjlubick authored and SkCQ committed Mar 20, 2023
1 parent 7e7782c commit b0fca30
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 32 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ deps = {
"third_party/externals/d3d12allocator" : "https://skia.googlesource.com/external/github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git@169895d529dfce00390a20e69c2f516066fe7a3b",
# Dawn requires jinja2 and markupsafe for the code generator, tint for SPIRV compilation, and abseil for string formatting.
# When the Dawn revision is updated these should be updated from the Dawn DEPS as well.
"third_party/externals/dawn" : "https://dawn.googlesource.com/dawn.git@f16b9bbd6e2ad12507956852297528acd164774f",
"third_party/externals/dawn" : "https://dawn.googlesource.com/dawn.git@9a56b25a310cb0c40004669136c0b0c6f3edd82f",
"third_party/externals/jinja2" : "https://chromium.googlesource.com/chromium/src/third_party/jinja2@ee69aa00ee8536f61db6a451f3858745cf587de6",
"third_party/externals/markupsafe" : "https://chromium.googlesource.com/chromium/src/third_party/markupsafe@0944e71f4b2cb9a871bcbe353f95e889b64a611a",
"third_party/externals/abseil-cpp" : "https://skia.googlesource.com/external/github.com/abseil/abseil-cpp.git@cb436cf0142b4cbe47aae94223443df7f82e2920",
Expand Down
2 changes: 1 addition & 1 deletion bazel/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def git_repos_from_deps():
new_git_repository(
name = "dawn",
build_file = "@//bazel/external/dawn:BUILD.bazel",
commit = "f16b9bbd6e2ad12507956852297528acd164774f",
commit = "9a56b25a310cb0c40004669136c0b0c6f3edd82f",
remote = "https://dawn.googlesource.com/dawn.git",
)

Expand Down
77 changes: 47 additions & 30 deletions bazel/external/dawn/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ TINT_SRCS = [
"src/tint/scope_stack.h",
"src/tint/source.cc",
"src/tint/source.h",
"src/tint/switch.h",
"src/tint/symbol.cc",
"src/tint/symbol.h",
"src/tint/symbol_table.cc",
Expand Down Expand Up @@ -718,6 +719,8 @@ TINT_SRCS = [
"src/tint/utils/slice.h",
"src/tint/utils/string.cc",
"src/tint/utils/string.h",
"src/tint/utils/string_stream.cc",
"src/tint/utils/string_stream.h",
"src/tint/utils/transform.h",
"src/tint/utils/unique_allocator.h",
"src/tint/utils/unique_vector.h",
Expand All @@ -734,10 +737,10 @@ TINT_SRCS = [
"src/tint/program_builder.h",
"src/tint/resolver/const_eval.cc",
"src/tint/resolver/const_eval.h",
"src/tint/resolver/ctor_conv_intrinsic.cc",
"src/tint/resolver/ctor_conv_intrinsic.h",
"src/tint/resolver/dependency_graph.cc",
"src/tint/resolver/dependency_graph.h",
"src/tint/resolver/init_conv_intrinsic.cc",
"src/tint/resolver/init_conv_intrinsic.h",
"src/tint/resolver/intrinsic_table.cc",
"src/tint/resolver/intrinsic_table.h",
"src/tint/resolver/intrinsic_table.inl",
Expand All @@ -750,10 +753,13 @@ TINT_SRCS = [
"src/tint/resolver/validator.cc",
"src/tint/resolver/validator.h",

# From dawn/src/tint/BUILD.gn:libtint_text_src
# From dawn/src/tint/BUILD.gn:libtint_demangler_src
"src/tint/demangler.cc",
"src/tint/demangler.h",

# From dawn/src/tint/BUILD.gn:libtint_initializer_src
"src/tint/tint.cc",

# From dawn/src/tint/BUILD.gn:libtint_inspector_src
"src/tint/inspector/entry_point.cc",
"src/tint/inspector/entry_point.h",
Expand Down Expand Up @@ -900,6 +906,7 @@ TINT_SRCS = [
"src/tint/ast/discard_statement.h",
"src/tint/ast/enable.h",
"src/tint/ast/expression.h",
"src/tint/ast/extension.h",
"src/tint/ast/float_literal_expression.h",
"src/tint/ast/for_loop_statement.h",
"src/tint/ast/function.h",
Expand Down Expand Up @@ -977,6 +984,7 @@ TINT_SRCS = [
"src/tint/ast/discard_statement.cc",
"src/tint/ast/enable.cc",
"src/tint/ast/expression.cc",
"src/tint/ast/extension.cc",
"src/tint/ast/float_literal_expression.cc",
"src/tint/ast/for_loop_statement.cc",
"src/tint/ast/function.cc",
Expand Down Expand Up @@ -1029,6 +1037,8 @@ TINT_SRCS = [
"src/tint/builtin/access.h",
"src/tint/builtin/address_space.cc",
"src/tint/builtin/address_space.h",
"src/tint/builtin/attribute.cc",
"src/tint/builtin/attribute.h",
"src/tint/builtin/builtin.cc",
"src/tint/builtin/builtin.h",
"src/tint/builtin/builtin_value.cc",
Expand All @@ -1039,14 +1049,16 @@ TINT_SRCS = [
"src/tint/builtin/diagnostic_severity.h",
"src/tint/builtin/extension.cc",
"src/tint/builtin/extension.h",
"src/tint/builtin/function.cc",
"src/tint/builtin/function.h",
"src/tint/builtin/interpolation_sampling.cc",
"src/tint/builtin/interpolation_sampling.h",
"src/tint/builtin/interpolation_type.cc",
"src/tint/builtin/interpolation_type.h",
"src/tint/builtin/texel_format.cc",
"src/tint/builtin/texel_format.h",

# From dawn/src/tint/BUILD.gn:libtint_type_src
# From dawn/src/tint/BUILD.gn:libtint_sem_src
"src/tint/sem/array_count.cc",
"src/tint/sem/array_count.h",
"src/tint/sem/behavior.cc",
Expand All @@ -1060,15 +1072,14 @@ TINT_SRCS = [
"src/tint/sem/builtin.h",
"src/tint/sem/builtin_enum_expression.cc",
"src/tint/sem/builtin_enum_expression.h",
"src/tint/sem/builtin_type.cc",
"src/tint/sem/builtin_type.h",
"src/tint/sem/call.cc",
"src/tint/sem/call.h",
"src/tint/sem/call_target.cc",
"src/tint/sem/call_target.h",
"src/tint/sem/evaluation_stage.h",
"src/tint/sem/expression.cc",
"src/tint/sem/expression.h",
"src/tint/sem/external_texture.h",
"src/tint/sem/for_loop_statement.cc",
"src/tint/sem/for_loop_statement.h",
"src/tint/sem/function.cc",
Expand Down Expand Up @@ -1103,13 +1114,13 @@ TINT_SRCS = [
"src/tint/sem/struct.h",
"src/tint/sem/switch_statement.cc",
"src/tint/sem/switch_statement.h",
"src/tint/sem/type_conversion.cc",
"src/tint/sem/type_conversion.h",
"src/tint/sem/type_expression.cc",
"src/tint/sem/type_expression.h",
"src/tint/sem/type_initializer.cc",
"src/tint/sem/type_initializer.h",
"src/tint/sem/type_mappings.h",
"src/tint/sem/value_constructor.cc",
"src/tint/sem/value_constructor.h",
"src/tint/sem/value_conversion.cc",
"src/tint/sem/value_conversion.h",
"src/tint/sem/value_expression.cc",
"src/tint/sem/value_expression.h",
"src/tint/sem/variable.cc",
Expand Down Expand Up @@ -1181,24 +1192,6 @@ TINT_SRCS = [
"src/tint/type/vector.h",
"src/tint/type/void.cc",
"src/tint/type/void.h",
"src/tint/writer/append_vector.cc",
"src/tint/writer/append_vector.h",
"src/tint/writer/array_length_from_uniform_options.cc",
"src/tint/writer/array_length_from_uniform_options.h",
"src/tint/writer/check_supported_extensions.cc",
"src/tint/writer/check_supported_extensions.h",
"src/tint/writer/flatten_bindings.cc",
"src/tint/writer/flatten_bindings.h",
"src/tint/writer/float_to_string.cc",
"src/tint/writer/float_to_string.h",
"src/tint/writer/generate_external_texture_bindings.cc",
"src/tint/writer/generate_external_texture_bindings.h",
"src/tint/writer/text.cc",
"src/tint/writer/text.h",
"src/tint/writer/text_generator.cc",
"src/tint/writer/text_generator.h",
"src/tint/writer/writer.cc",
"src/tint/writer/writer.h",

# From dawn/src/tint/BUILD.gn:libtint_constant_src
"src/tint/constant/clone_context.h",
Expand All @@ -1217,6 +1210,29 @@ TINT_SRCS = [
"src/tint/reader/reader.cc",
"src/tint/reader/reader.h",

# From dawn/src/tint/BUILD.gn:From libtint_writer_src
"src/tint/writer/append_vector.cc",
"src/tint/writer/append_vector.h",
"src/tint/writer/array_length_from_uniform_options.cc",
"src/tint/writer/array_length_from_uniform_options.h",
"src/tint/writer/binding_point.h",
"src/tint/writer/binding_remapper_options.cc",
"src/tint/writer/binding_remapper_options.h",
"src/tint/writer/check_supported_extensions.cc",
"src/tint/writer/check_supported_extensions.h",
"src/tint/writer/external_texture_options.cc",
"src/tint/writer/external_texture_options.h",
"src/tint/writer/flatten_bindings.cc",
"src/tint/writer/flatten_bindings.h",
"src/tint/writer/float_to_string.cc",
"src/tint/writer/float_to_string.h",
"src/tint/writer/text.cc",
"src/tint/writer/text.h",
"src/tint/writer/text_generator.cc",
"src/tint/writer/text_generator.h",
"src/tint/writer/writer.cc",
"src/tint/writer/writer.h",

# Dawn sets the following tint GN variables
# tint_build_spv_reader = true
# tint_build_spv_writer = true
Expand Down Expand Up @@ -1283,19 +1299,20 @@ cc_library(
srcs = TINT_SRCS,
hdrs = TINT_HDRS,
defines = [
# From From dawn/src/tint/BUILD.gn:tint_public_config, using the options
# From dawn/src/tint/BUILD.gn:tint_public_config, using the options
# set by Skia in //build_overrides/tint.gni
"TINT_BUILD_SPV_READER=1",
"TINT_BUILD_SPV_WRITER=1",
"TINT_BUILD_WGSL_READER=1",
"TINT_BUILD_WGSL_WRITER=1",
],
includes = [
"",
"include",
],
visibility = ["//visibility:public"],
deps = [
# Tint depends on abseil-cpp:strings for absl/strings/charconv.h
"@abseil_cpp//absl/strings",
# Tint specifically depends on spirv-tools/BUILD.gn:spirv_opt
"@spirv_tools//:spirv_tools_opt",
# Tint requires "include/spirv/unified1/spirv.hpp11", which is provided
Expand Down
1 change: 1 addition & 0 deletions build_overrides/dawn.gni
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
dawn_has_build = false

dawn_abseil_dir = "//third_party/externals/abseil-cpp"
dawn_angle_dir = "//third_party/externals/angle2"
dawn_jinja2_dir = "//third_party/externals/jinja2"
dawn_spirv_tools_dir = "//third_party/externals/spirv-tools"
dawn_spirv_cross_dir = "//third_party/externals/spirv-cross"
Expand Down
2 changes: 2 additions & 0 deletions src/gpu/ganesh/dawn/GrDawnProgramBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ static wgpu::DepthStencilState create_depth_stencil_state(

wgpu::DepthStencilState state;
state.format = depthStencilFormat;
state.depthWriteEnabled = false;
state.depthCompare = wgpu::CompareFunction::Always;
if (!stencilSettings.isDisabled()) {
if (stencilSettings.isTwoSided()) {
auto front = stencilSettings.postOriginCCWFace(origin);
Expand Down

0 comments on commit b0fca30

Please sign in to comment.