From 9db68d421f4f4f6e229043823d1a16d1f42a98cd Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 4 Mar 2022 19:53:07 -0700 Subject: [PATCH] gpu-dawn: update to latest Dawn + windows patches Signed-off-by: Stephen Gutekanst --- .gitmodules | 2 +- gpu-dawn/.gitmodules | 2 +- gpu-dawn/build.zig | 52 ++++++++++++++-------------- gpu-dawn/libs/DirectXShaderCompiler | 2 +- gpu-dawn/libs/dawn | 2 +- gpu-dawn/src/dawn/hello_triangle.zig | 2 +- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.gitmodules b/.gitmodules index 6f417bd9..fad3d246 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,7 +2,7 @@ path = gpu-dawn/libs/dawn url = https://github.com/hexops/dawn.git shallow = true - branch = "generated-2022-02-17" + branch = "generated-2022-03-04" [submodule "gpu-dawn/libs/DirectXShaderCompiler"] path = gpu-dawn/libs/DirectXShaderCompiler url = https://github.com/hexops/DirectXShaderCompiler diff --git a/gpu-dawn/.gitmodules b/gpu-dawn/.gitmodules index 7d0ea7b8..1a7b9ec3 100644 --- a/gpu-dawn/.gitmodules +++ b/gpu-dawn/.gitmodules @@ -2,7 +2,7 @@ path = libs/dawn url = https://github.com/hexops/dawn.git shallow = true - branch = "generated-2022-02-17" + branch = "generated-2022-03-04" [submodule "libs/DirectXShaderCompiler"] path = libs/DirectXShaderCompiler url = https://github.com/hexops/DirectXShaderCompiler diff --git a/gpu-dawn/build.zig b/gpu-dawn/build.zig index f507355f..010101c3 100644 --- a/gpu-dawn/build.zig +++ b/gpu-dawn/build.zig @@ -840,7 +840,7 @@ fn buildLibDawnNative(b: *Builder, step: *std.build.LibExeObjStep, options: Opti return lib; } -// Builds third party tint sources; derived from third_party/tint/src/BUILD.gn +// Builds third party tint sources; derived from third_party/tint/src/tint/BUILD.gn fn buildLibTint(b: *Builder, step: *std.build.LibExeObjStep, options: Options) *std.build.LibExeObjStep { const lib = if (!options.separate_libs) step else blk: { var main_abs = std.fs.path.join(b.allocator, &.{ thisDir(), "src/dawn/dummy.zig" }) catch unreachable; @@ -879,19 +879,19 @@ fn buildLibTint(b: *Builder, step: *std.build.LibExeObjStep, options: Options) * // libtint_core_all_src appendLangScannedSources(b, lib, options, .{ .rel_dirs = &.{ - "libs/dawn/third_party/tint/src/ast/", - "libs/dawn/third_party/tint/src/", - "libs/dawn/third_party/tint/src/diagnostic/", - "libs/dawn/third_party/tint/src/inspector/", - "libs/dawn/third_party/tint/src/reader/", - "libs/dawn/third_party/tint/src/resolver/", - "libs/dawn/third_party/tint/src/utils", - "libs/dawn/third_party/tint/src/text/", - "libs/dawn/third_party/tint/src/transform/", - "libs/dawn/third_party/tint/src/transform/utils", - "libs/dawn/third_party/tint/src/writer/", - "libs/dawn/third_party/tint/src/ast/", - "libs/dawn/third_party/tint/src/val/", + "libs/dawn/third_party/tint/src/tint/ast/", + "libs/dawn/third_party/tint/src/tint/", + "libs/dawn/third_party/tint/src/tint/diagnostic/", + "libs/dawn/third_party/tint/src/tint/inspector/", + "libs/dawn/third_party/tint/src/tint/reader/", + "libs/dawn/third_party/tint/src/tint/resolver/", + "libs/dawn/third_party/tint/src/tint/utils", + "libs/dawn/third_party/tint/src/tint/text/", + "libs/dawn/third_party/tint/src/tint/transform/", + "libs/dawn/third_party/tint/src/tint/transform/utils", + "libs/dawn/third_party/tint/src/tint/writer/", + "libs/dawn/third_party/tint/src/tint/ast/", + "libs/dawn/third_party/tint/src/tint/val/", }, .flags = flags.items, .excluding_contains = &.{ "test", "bench", "printer_windows", "printer_linux", "printer_other", "glsl.cc" }, @@ -900,15 +900,15 @@ fn buildLibTint(b: *Builder, step: *std.build.LibExeObjStep, options: Options) * var cpp_sources = std.ArrayList([]const u8).init(b.allocator); const target = (std.zig.system.NativeTargetInfo.detect(b.allocator, step.target) catch unreachable).target; switch (target.os.tag) { - .windows => cpp_sources.append(thisDir() ++ "/libs/dawn/third_party/tint/src/diagnostic/printer_windows.cc") catch unreachable, - .linux => cpp_sources.append(thisDir() ++ "/libs/dawn/third_party/tint/src/diagnostic/printer_linux.cc") catch unreachable, - else => cpp_sources.append(thisDir() ++ "/libs/dawn/third_party/tint/src/diagnostic/printer_other.cc") catch unreachable, + .windows => cpp_sources.append(thisDir() ++ "/libs/dawn/third_party/tint/src/tint/diagnostic/printer_windows.cc") catch unreachable, + .linux => cpp_sources.append(thisDir() ++ "/libs/dawn/third_party/tint/src/tint/diagnostic/printer_linux.cc") catch unreachable, + else => cpp_sources.append(thisDir() ++ "/libs/dawn/third_party/tint/src/tint/diagnostic/printer_other.cc") catch unreachable, } // libtint_sem_src appendLangScannedSources(b, lib, options, .{ .rel_dirs = &.{ - "libs/dawn/third_party/tint/src/sem/", + "libs/dawn/third_party/tint/src/tint/sem/", }, .flags = flags.items, .excluding_contains = &.{ "test", "benchmark" }, @@ -917,7 +917,7 @@ fn buildLibTint(b: *Builder, step: *std.build.LibExeObjStep, options: Options) * // libtint_spv_reader_src appendLangScannedSources(b, lib, options, .{ .rel_dirs = &.{ - "libs/dawn/third_party/tint/src/reader/spirv/", + "libs/dawn/third_party/tint/src/tint/reader/spirv/", }, .flags = flags.items, .excluding_contains = &.{ "test", "benchmark" }, @@ -926,7 +926,7 @@ fn buildLibTint(b: *Builder, step: *std.build.LibExeObjStep, options: Options) * // libtint_spv_writer_src appendLangScannedSources(b, lib, options, .{ .rel_dirs = &.{ - "libs/dawn/third_party/tint/src/writer/spirv/", + "libs/dawn/third_party/tint/src/tint/writer/spirv/", }, .flags = flags.items, .excluding_contains = &.{ "test", "bench" }, @@ -936,7 +936,7 @@ fn buildLibTint(b: *Builder, step: *std.build.LibExeObjStep, options: Options) * // libtint_wgsl_reader_src appendLangScannedSources(b, lib, options, .{ .rel_dirs = &.{ - "libs/dawn/third_party/tint/src/reader/wgsl/", + "libs/dawn/third_party/tint/src/tint/reader/wgsl/", }, .flags = flags.items, .excluding_contains = &.{ "test", "bench" }, @@ -946,7 +946,7 @@ fn buildLibTint(b: *Builder, step: *std.build.LibExeObjStep, options: Options) * // libtint_wgsl_writer_src appendLangScannedSources(b, lib, options, .{ .rel_dirs = &.{ - "libs/dawn/third_party/tint/src/writer/wgsl/", + "libs/dawn/third_party/tint/src/tint/writer/wgsl/", }, .flags = flags.items, .excluding_contains = &.{ "test", "bench" }, @@ -956,7 +956,7 @@ fn buildLibTint(b: *Builder, step: *std.build.LibExeObjStep, options: Options) * // libtint_msl_writer_src appendLangScannedSources(b, lib, options, .{ .rel_dirs = &.{ - "libs/dawn/third_party/tint/src/writer/msl/", + "libs/dawn/third_party/tint/src/tint/writer/msl/", }, .flags = flags.items, .excluding_contains = &.{ "test", "bench" }, @@ -966,7 +966,7 @@ fn buildLibTint(b: *Builder, step: *std.build.LibExeObjStep, options: Options) * // libtint_hlsl_writer_src appendLangScannedSources(b, lib, options, .{ .rel_dirs = &.{ - "libs/dawn/third_party/tint/src/writer/hlsl/", + "libs/dawn/third_party/tint/src/tint/writer/hlsl/", }, .flags = flags.items, .excluding_contains = &.{ "test", "bench" }, @@ -976,13 +976,13 @@ fn buildLibTint(b: *Builder, step: *std.build.LibExeObjStep, options: Options) * // libtint_glsl_writer_src appendLangScannedSources(b, lib, options, .{ .rel_dirs = &.{ - "libs/dawn/third_party/tint/src/writer/glsl/", + "libs/dawn/third_party/tint/src/tint/writer/glsl/", }, .flags = flags.items, .excluding_contains = &.{ "test", "bench" }, }) catch unreachable; for ([_][]const u8{ - "third_party/tint/src/transform/glsl.cc", + "third_party/tint/src/tint/transform/glsl.cc", }) |path| { var abs_path = std.fs.path.join(b.allocator, &.{ thisDir(), "libs/dawn", path }) catch unreachable; cpp_sources.append(abs_path) catch unreachable; diff --git a/gpu-dawn/libs/DirectXShaderCompiler b/gpu-dawn/libs/DirectXShaderCompiler index 9832f72b..cff9a6f0 160000 --- a/gpu-dawn/libs/DirectXShaderCompiler +++ b/gpu-dawn/libs/DirectXShaderCompiler @@ -1 +1 @@ -Subproject commit 9832f72b8ab48ca5a80b32ec5592812921833dc8 +Subproject commit cff9a6f0b7f961748b822e1d313a7205dfdecf9d diff --git a/gpu-dawn/libs/dawn b/gpu-dawn/libs/dawn index bd58e456..79ce7c9c 160000 --- a/gpu-dawn/libs/dawn +++ b/gpu-dawn/libs/dawn @@ -1 +1 @@ -Subproject commit bd58e45611226e8126a6c56abbac98f833f6adc2 +Subproject commit 79ce7c9cb15525e69bc3dfb812775633d3493b3c diff --git a/gpu-dawn/src/dawn/hello_triangle.zig b/gpu-dawn/src/dawn/hello_triangle.zig index a1a97fe9..508c5bc8 100644 --- a/gpu-dawn/src/dawn/hello_triangle.zig +++ b/gpu-dawn/src/dawn/hello_triangle.zig @@ -210,7 +210,7 @@ fn frame(params: FrameParams) !void { var color_attachment = std.mem.zeroes(c.WGPURenderPassColorAttachment); color_attachment.view = back_buffer_view; color_attachment.resolveTarget = null; - color_attachment.clearColor = c.WGPUColor{ .r = 0.0, .g = 0.0, .b = 0.0, .a = 0.0 }; + color_attachment.clearValue = c.WGPUColor{ .r = 0.0, .g = 0.0, .b = 0.0, .a = 0.0 }; color_attachment.loadOp = c.WGPULoadOp_Clear; color_attachment.storeOp = c.WGPUStoreOp_Store; render_pass_info.colorAttachmentCount = 1;