This adds swiftshader as a dependency of Dawn, and when it is present
dawn_use_swiftshader=true will force usage of it. (due to a Vulkan
loader limitation we can't have both regular drivers and swiftshader in
the same VkInstance).
BUG=dawn:283
Change-Id: Ib94f4dcca652eb380e994f007cdcfb145b1a5102
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13440
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Disabling this while refactoring how dependencies are set up to avoid
breaking various builds and rolls.
BUG=dawn:285
Change-Id: Iaca2614fb73277a1ea850f90a487693cd4c54fcb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14040
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Roll third_party/SPIRV-Tools/ 2ee9aaa28..85f3e93d1 (2 commits)
2ee9aaa288..85f3e93d13
$ git log 2ee9aaa28..85f3e93d1 --date=short --no-merges --format='%ad %ae %s'
2019-11-22 mattst88 Respect CMAKE_INSTALL_LIBDIR in installed CMake files (#3054)
2019-11-20 rharrison Add missing dealloc (#3061)
Roll third_party/glslang/ f4d466852..38b4db48f (6 commits)
f4d4668529..38b4db48f9
$ git log f4d466852..38b4db48f --date=short --no-merges --format='%ad %ae %s'
2019-11-23 cepheus Fix#1983: __ is okay starting with ES 300, rather than 310.
2019-11-22 cepheus Fix#1987: Use large enough built-in buffer to hold vec4 of maxint-64.
2019-11-21 dsinclair Check for ENABLE_SPVREMAPPER flag in CMakeList files.
2019-11-18 Arfrever Respect CMAKE_INSTALL_LIBDIR in installed CMake files
2019-11-14 andreas.floejt Add a test for 8- and 16-bit construction.
2019-11-11 andreas.floejt Fix construction issue for 8 and 16 bit types.
Roll third_party/shaderc/ c7f5cfd07..da52fae11 (6 commits)
c7f5cfd07f..da52fae116
$ git log c7f5cfd07..da52fae11 --date=short --no-merges --format='%ad %ae %s'
2019-11-21 rharrison Revert "Convert to using standard spirv_cross deps in BUILD.gn (#902)" (#905)
2019-11-21 9856269+sarahM0 Add spvc parser support for OpTypeForwardPointer, OpTypeAccelerationStructureNV (#903)
2019-11-21 rharrison Convert to using standard spirv_cross deps in BUILD.gn (#902)
2019-11-21 rharrison Convert spvc parser flag from build time to runtime (#901)
2019-11-21 9856269+sarahM0 Add spvc parser support for OpGroupDecorate, OpGroupMemberGecorate, OpDecorateStringGOOGLE, and OpMemberDecorateStringGOOGLE (#899)
2019-11-20 9856269+sarahM0 Add spvc parser support for OpUndef, OpString, OpMemberDecorate, OpDecorationGroup, OpLine, and OpNoLine (#898)
Created with:
roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers
Change-Id: I89de33e4bcee1d73e8ee91fcbe8984939fa8fe3e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14034
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This change adds GPU memory synchronization tests for buffer. The tests cover
data flow from render pass to compute pass via storage buffer, and vice versa.
It is the last one for the series of memory sync tests for buffer.
BUG=dawn:275
Change-Id: Ic866161cadc0fa9df4c441f3970783077f3a9bd0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13921
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This patch makes the |layout| member of the Render|ComputePipelineDescriptor
optional. If it is not provided, a default layout is created from the
ShaderModules provided and used to replace the layout in the descriptor.
Then, pipeline.GetBindGroupLayout may be called to get the existing, or
the computed bind group layout. If no bind group layout exists at the
provided index, an empty bind group layout is returned.
Bug: dawn:276
Change-Id: I276ed0296a2f1f2d8131fa906a4aefe85d75b3a7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13741
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
The TextureComponentType and TextureViewDimension of resources in
the shader must match those in the bind group layout.
This patch also extracts the texture view dimension from the SPIRV.
Bug: dawn:202
Change-Id: Ie155f17109f4f1b5d9b386d757062ae5ffe5da67
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13861
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This was used to make the distinction between native-only methods that
were those manipulating "natively defined" types, and the rest. Now that
all "natively defined" objects are "callback" instead this name didn't
make sense.
The only relevant thing is that in C there are the Reference and Release
methods that don't appear in dawn.json and shouldn't be exposed on C++
objects. Hence most of the native_methods() calls in the templates are
updated to be c_methods() calls except for the webgpu_cpp templates that
use type.methods directly.
BUG=dawn:22
Change-Id: I65c160b8b8a829e4728862c65bc67268a46f445e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13902
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
This replaces all instances of "natively defined" with callbacks and
adds information about the callbacks arguments so that their typedefs
can be autogenerated in dawn.json.
Also adds all the methods using callbacks to the list of handwritten
client commands so that the wire templates don't try to generate code
for them.
BUG=dawn:22
Change-Id: I30ce01e3e688a16b31efa74d0c94ebafdca00985
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13901
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
This patch factors resource usage tracking so it is separate from
command validation, allowing the bulk of command validation to be
completely skipped.
In DrawCallPerfRun/Vulkan_DynamicPipeline_DynamicBindGroup, disabling
validation cuts roughly 74 nanoseconds (20%) of CPU time, per draw.
In DrawCallPerfRun/Vulkan_DynamicBindGroup, disabling validation
cuts roughly 35 nanoseconds (17%) of CPU time, per draw.
In DrawCallPerfRun/Vulkan_MultipleBindGroups, disabling validation
cuts roughly 45 nanoseconds (14%) of CPU time, per draw.
Bug: dawn:271
Change-Id: I517b85840ba18c6a554b83f34a1d0aef1a8c56a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13520
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This reverts commit 1954436fe2.
Reason for revert:
The shaderc side of this multi-patch brings in a dependency on glslang, which uses a static initializer, which chromium doesn't like.
Original change's description:
> Convert spvc build flag to a runtime toggle
>
> Also moves some of the spirv_cross code into the main library that was
> feature guarded, since spvc requires it.
>
> BUG=dawn:281
>
> Change-Id: I482d1d5a5c851956d3815bad90665c52a1ea15bb
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13860
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
TBR=cwallez@chromium.org,kainino@chromium.org,enga@chromium.org,rharrison@chromium.org
Change-Id: Ia9a025fb4440c96874d1b45776a9f97023ca591d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:281
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13941
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
There were some missing DAWN_NATIVE_EXPORT arributes for new structures
in VulkanBackend.h which resulted in linking errors.
BUG=chromium:996470
Change-Id: I45deb56faf5fd77ecfa96ebda99d31d0109d98ec
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13900
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
It is invalid to specify a resolve source region on GPUs that do not
support sample positions. Instead, the entire region rect should be
set to all zeros or "empty" to always resolve the entire region.
Bug: dawn:36
Change-Id: I23575b2186bffbcb2e236988558b78f97375a126
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13501
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Also moves some of the spirv_cross code into the main library that was
feature guarded, since spvc requires it.
BUG=dawn:281
Change-Id: I482d1d5a5c851956d3815bad90665c52a1ea15bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13860
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL implements the MemoryService for importing memory and
creating VkImages from a dma-buf handle. Under the hood, it uses the
VK_EXT_external_memory_dma_buf and
VK_EXT_image_drm_format_modifier extensions to find a memory type
that supports dma-buf import. In addition, the extensions are also
used to properly specify the stride and tiling of the dma-buf to
vkAllocateMemory and vkCreateImage.
BUG=chromium:996470
Change-Id: Ie72d73117a4cbafcb40468aab0952b783351d499
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13785
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
The test would previously fail because the mappedData pointer stayed
non-null which meant the spin-loop waiting for the map read callback
would exit immediately.
BUG=dawn:278
BUG=dawn:280
Change-Id: I53e5974571d7684b09903c599bb65c0d8efe4d8a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13821
Reviewed-by: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Trusted users of Dawn should be able to use it without the
overhead of command validation. This patch adds the toggle and
skips validation for object creation.
Bug: dawn:271
Change-Id: Ica9a1988177685d73e2c36e05c4d525ad1ab0fdb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13802
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
This CL adds an API to import a dma-buf into Dawn as a WGPUTexture.
We also add a descriptor type enum to the base
ExternalImageDescriptor struct. This is because all memory import
code (e.g. MemoryService, Texture::CreateFromExternal) takes the
a base ExternalImageDescriptor as a parameter. The dma-buf external
memory and image services, however, will need to downcast to
ExternalImageDescriptorDmaBuf to access import parameters like
stride. Explicitly adding a type enum will let us more safely verify
the type before downcasting.
BUG=chromium:996470
Change-Id: I2d9883a15e9059a91f2c7bdb7a96d74373e18c56
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13782
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
This CL introduces SupportsCreateImage and CreateImage to the
external memory service API to provide different implementations for
creating VkImages for different types of external image handles.
While opaque FD and Zircon seem to share the same vkCreateImage
implementation, dma-buf import will require the use of the
VkImageDrmFormatModifierExplicitCreateInfoEXT [1] struct (among
other differences) with vkCreateImage.
[1] https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkImageDrmFormatModifierExplicitCreateInfoEXT.html
BUG=chromium:996470
Change-Id: I3eb11f8877d4465f5fcdd4089d5fdd8acbc1da10
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13781
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
An earlier CL [1] enabled Vulkan validation layers on Linux which
also enables validation layers on Chrome OS. Unfortunately, this
changes breaks the Chrome OS build of Dawn:
.../vulkan.h:63:10: fatal error: 'xcb/xcb.h' file not found
This is because including the validation layers also includes
the Vulkan-Headers repo which has a BUILD file that defines
VK_USE_PLATFORM_XCB_KHR [2]. XCB (and all of X11, for that matter)
is not supported on Chrome OS even though it is a Linux platform.
This is a quick fix for the problem to unbreak the BUILD, but I
think we should discuss what a long-term fix looks like. Do we send
a patch to Khronos to add an "is_chromeos" branch to their BUILD
file a la Fuchsia?
Also, as mentioned by cwallez@ in a different CL of mine, we should
really set up a Chrome OS trybot to catch these earlier. I can
assign a bug to myself for that!
[1] https://dawn-review.googlesource.com/c/dawn/+/13787
[2] https://github.com/KhronosGroup/Vulkan-Headers/blob/master/BUILD.gn#L23
Change-Id: Ic5fb4fa7990cc2232a7416145877e24b10a2a7b6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13880
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
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 CL adds a few Vulkan extensions to be used for importing
dma-bufs as VkImages.
In particular, we need:
- VK_EXT_external_memory_dma_buf
- VK_EXT_image_drm_format_modifier
BUG=chromium:996470
Change-Id: I7a3dfd0184177c756b07613fbfe140506f54584c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13783
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Roll third_party/SPIRV-Tools/ 12e54dae1..2ee9aaa28 (11 commits)
12e54dae16..2ee9aaa288
$ git log 12e54dae1..2ee9aaa28 --date=short --no-merges --format='%ad %ae %s'
2019-11-19 rharrison Initialize binary for use as guard later (#3058)
2019-11-19 stevenperron Handle OpPhi with no in operands in value numbering (#3056)
2019-11-19 stevenperron Kill the id-to-func map after wrap-opkill (#3055)
2019-11-18 rharrison Convert stderr and stdout in status to strings on assignment (#3049)
2019-11-14 dneto Update README (#3047)
2019-11-14 pierremoreau Update README (#3048)
2019-11-13 dneto Avoid uninit warning in GCC (#3044)
2019-10-23 bclayton utils/vscode: Add SPIR-V language server support
2019-11-11 bclayton utils/vscode: Add go language server packages.
2019-11-12 alanbaker Fix operand access of composite in upgrade memory model (#3021)
2019-11-12 alanbaker Validate array stride does not cause overlap (#3028)
Roll third_party/glslang/ 37dcb8945..f4d466852 (1 commit)
37dcb89457..f4d4668529
$ git log 37dcb8945..f4d466852 --date=short --no-merges --format='%ad %ae %s'
2019-11-14 cepheus HLSL: Fix#1976: Don't let ENABLE_HLSL change struct/class layout.
Roll third_party/shaderc/ 0865050e5..c7f5cfd07 (11 commits)
0865050e54..c7f5cfd07f
$ git log 0865050e5..c7f5cfd07 --date=short --no-merges --format='%ad %ae %s'
2019-11-20 rharrison Rolling 4 dependencies (#897)
2019-11-19 rharrison Migrate away from nosetest to unittest (#896)
2019-11-18 9856269+sarahM0 Add spvc parser support for control flow instructions (#894)
2019-11-15 dneto Android.mk: Avoid polluting NDK build's test tree. (#888)
2019-11-15 rharrison Add access to MSL options needed by Dawn (#893)
2019-11-14 9856269+sarahM0 Add spvc parser support for all OpConstant.* and OpSpecConstant.* (#886)
2019-11-13 dneto Android.mk: Fix detection of spirv-headers directory (#887)
2019-11-13 9856269+sarahM0 Add spvc parser support and unit tests for: OpTypeMatrix, OpTypeRuntimeArray, OpTypeImage, OpTypeSampler, OpTypeSampledImage (#885)
2019-11-13 rharrison Remove the deprectated all-in-one generation API (#883)
2019-11-13 rharrison Expose spirv_cross compiler to ease integration into Dawn (#884)
2019-11-13 9856269+sarahM0 Add spvc parser support and unit tests for: OpTypeBool, OpTypeFloat, … (#881)
Roll third_party/spirv-headers/ af64a9e82..204cd131c (2 commits)
af64a9e826..204cd131c4
$ git log af64a9e82..204cd131c --date=short --no-merges --format='%ad %ae %s'
2019-11-20 Tobias.Hector Off-by-one errors
2019-11-20 Tobias.Hector Reserve a new block of 64 opcodes
Created with:
roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers
Change-Id: Id1417493410e35b951d1d4623576b11fa2baab2b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13840
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
When vkDestroyDebugReportCallbackEXT() is called in Backend::~Backend()
and Vulkan validation layers are in use, the variable unique_id_mapping
is referenced internally[1]. However, the variable is global[2] and it's
destructed before Backend::~Backend(), which causes a use-after-free
issue. The issue was unnoticed on Windows, but we observed the crash at
exit on Linux.
[1] 9fba37afae/layers/generated/layer_chassis_dispatch.cpp (4961)
[2] 9fba37afae/layers/generated/chassis.cpp (40)
Bug: dawn:150
Change-Id: I505373a88ef9795243dd18da9785fb49d253e498
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13787
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This CL is part of a chain of CLs that imports dma-bufs as VkImages
to support WebGPU on Chrome OS.
There are currently two steps for importing external memory into
Vulkan:
1. DeviceVk::ImportExternalImage: calls into
MemoryServiceOpaqueFD::ImportMemory which in turn calls into
vkAllocateMemory and outputs a VkDeviceMemory handle to the
imported memory.
2. TextureVk::CreateFromExternal: creates the actual TextureVk
object, creates the VkImage, and binds the VkDeviceMemory from
ImportExternalImage to the VkImage.
For dma-buf support, however, we need to re-order these two steps
because importing dma-buf memory requires a handle to the VkImage
that will alias it [1].
This CL splits these two steps into three steps to ensure we create
the VkImage first so we can use it in vkAllocateMemory:
1. TextureVk::CreateFromExternal: creates the TextureVk and
VkImage (no longer concerns itself with vkBindImageMemory).
2. DeviceVk::ImportExternalImage: now takes the VkImage as input
but is otherwise unchanged.
3. TextureVk::BindExternalMemory: calls vkBindImageMemory with
handles to VkDeviceMemory and VkImage.
[1] https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkMemoryDedicatedAllocateInfo.html
BUG=chromium:996470
Change-Id: Id2d5951e9b573af79c44ce8c63be5210a279f946
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13780
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This CL adds end2end tests for memory synchronization tests for buffer.
It adds a few tests that iterate data read-add-write operations a few
times in buffer for compute and render respectively, and verifies
that data dependency among interations is well synchronized.
BUG=dawn:275
Change-Id: Idfe627e90de795d664ee64787d5c5d2bfcee676b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13700
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
The BackendBinding that implement correct interactions between Dawn and
GLFW windows is only needed when compiling the Dawn samples. This only
happen in standalone so move the dawn_bindings there.
This fixes an issue where the ChromeOS build would discover the Dawn
BUILD.gn file and try to build dawn_bindings that depended on a fake
GLFW target, making the GLFW #includes fail.
With dawn_binding moved in dawn_standalone, all targets discoverable by
a Chromium build that use GLFW do so behind the dawn_enable_opengl flag,
which is always false on ChromeOS.
Also reverts https://dawn-review.googlesource.com/c/dawn/+/13620 because
we want to allow building dawn_end2end_tests on ChromeOS even if the
browser doesn't use_dawn.
BUG=1025326
Change-Id: I8ab965c5da68ca422912b21f87f65e32e789ee8a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13820
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brian Ho <hob@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch add end2end tests for map buffer twice for map read, map
write, and SetSubData.
BUG=dawn:278
Change-Id: Ibe57d7923310d2513e314fa9bf185677a706d6da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13801
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This changes RefCounted to increment and decrement the refcount by steps
of 2, so that a 1 bit payload can be inlined in the refcount. This
avoids using a whole boolean + padding (4 or 8 bytes in general) to know
if objects are errors.
Fixes a longstanding optimization TODO.
BUG=dawn:105
Change-Id: I5e8f66465d23772fb6082ea3e0d5d4aba2132648
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13680
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Fixes a bug where SetBindGroup command would fail to be skipped.
BUG=dawn:256
Change-Id: I9815c9d31aa88f6881274a1873cabe17379cc2e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13800
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
This seems to be a regression introduced by CL:12022, where the
previously recorded semaphores are leaked while resetting the recording
context. The Vulkan validation layers will complain about this when
running the Linux-only image wrapping tests. Also, the semaphores are
queued for deletion with the right serial now.
Bug: dawn:19, dawn:150
Change-Id: I50fd46ca9de9199b29be2f85d5e9bd7394a10f1a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13420
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jiajie Hu <jiajie.hu@intel.com>
This CL adds end2end tests for memory synchronization tests for buffer.
It adds a few tests that write into storage buffer in compute pass,
then read via uniform binding from the same buffer in render pass.
BUG=dawn:275
Change-Id: Ic98a10aab4cdcddecd60662438d4b8bdd34fafbc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13580
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
The cpu_time metric measures the amount of CPU time spent on a step.
It excludes time spent waiting for the GPU or time between frames.
Bug: dawn:208
Change-Id: I5624d45557716c02bb7da632d2347eca0b81ad41
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13640
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
TerribleCommandBuffer has space for 10,000,000 bytes worth of commands. If
commands contain super large data block (e.g. setsubdata), it will
return nullptr and crash dawn wire layer.
This patch adds a large buffer to handle super large data block.
BUG=dawn:251
Change-Id: Ib007e92b5282afbb93aef63cfffe5a3965f6d5c1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13040
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This will help flush out future errors where targets depend on this
target in configs where it won't build or isn't used.
Bug: None
Change-Id: Iebfc6b9afbd9b4fd9616d87bcaf8cd83a2163777
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13620
Commit-Queue: Elly Fong-Jones <ellyjones@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This was unnecessary verbosity. Fix this by having the ProcTable
generator using type aliases so all types appear like they have
"Base".
BUG=
Change-Id: I8c472fb924f6ce739e4e41038452381b4f727a2b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13442
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch adds an interface GetAdapterProperties() on Adapter which can
directly return a WGPUDeviceProperties object that includes the
information of the adapter.
BUG=chromium:996713
Change-Id: I9a7b1512d259761e198dfac3eafa718171d47241
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13340
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This changes the methods of Dawn's SwapChain to match webgpu.h, namely
Present() now doesn't take arguments, and GetNextTexture() is replaced
with GetCurrentTextureView().
BUG=dawn:269
Change-Id: Ia0debefb170caf799c3310b1dad5535c4c5f59ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13441
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Uses D3D12 native render pass API when possible. On pre-RS5 builds of
Windows, Dawn will fall back to a software emulated render pass. A
toggle was added to provide test coverage to the emulated render pass
implementation and used in tests that test render pass functionality in
particular.
Bug: dawn:36
Change-Id: I297a3ec7655b68d28204db2d3ab78cb82bb4e7a5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13082
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Roll third_party/SPIRV-Tools/ 3724cfbea..12e54dae1 (10 commits)
3724cfbea8..12e54dae16
$ git log 3724cfbea..12e54dae1 --date=short --no-merges --format='%ad %ae %s'
2019-11-11 ehsannas Update Offset to ConstOffset bitmask if operand is constant. (#3024)
2019-11-08 dneto Try to fix go linter: exported constant comment (#3026)
2019-11-08 afdx spirv-fuzz: Eliminate spurious semicolons (#3025)
2019-11-07 afdx spirv-fuzz: simplify transformation for replacing an id with a synonym (#3020)
2019-11-07 alanbaker Re-enable OpReadClockKHR validation (#3013)
2019-11-07 dneto Python 3: remove deprecated U qualifier on 'open' (#3019)
2019-11-07 paulthomson Remove semicolon (#3022)
2019-11-06 afdx spirv-fuzz: vector shuffle transformation (#3015)
2019-11-06 afdx Add basic documentation about spirv-fuzz (#3016)
2019-11-05 dneto Fix Go lint issues: comment exported symbols (#3014)
Roll third_party/glslang/ 5d0e01d9e..37dcb8945 (5 commits)
5d0e01d9e7..37dcb89457
$ git log 5d0e01d9e..37dcb8945 --date=short --no-merges --format='%ad %ae %s'
2019-11-12 cepheus HLSL: Fix#1960: fmod() was not converting int args to float.
2019-11-07 dneto SPIR-V postprocessing: WEB case only needs CFG mods
2019-11-06 kainino Fix compileGLSLZeroCopy accidental minification
2019-11-06 dsinclair Add deprecation for SPIRV/ install folder location.
2019-11-05 cepheus Fix#1959 by reverting 7b0e236 to put files in two places.
Roll third_party/shaderc/ f4cf10c66..c9d5be6b0 (2 commits)
f4cf10c66f..c9d5be6b01
$ git log f4cf10c66..c9d5be6b0 --date=short --no-merges --format='%ad %ae %s'
2019-11-11 rharrison Remove deprecated items from result/message refactoring (#878)
2019-11-11 9856269+sarahM0 Add spvc parser support and unit tests for OpVariable, OpDecorate, OpExtInstImport, … … (#873)
Roll third_party/spirv-cross/ 24f209eb9..fd5aa3ad5 (12 commits)
24f209eb93..fd5aa3ad51
$ git log 24f209eb9..fd5aa3ad5 --date=short --no-merges --format='%ad %ae %s'
2019-11-12 post CMake: Clarify some warning messages.
2019-11-12 post HLSL: Add CLI support for --hlsl-auto-binding.
2019-11-11 post HLSL: Add support to remove register() bindings.
2019-11-07 post MSL: Remove dubious workaround code in unpack_expression.
2019-11-07 post MSL: Fix unpack_expression from column of padded matrix.
2019-11-06 post HLSL: Report more explicitly which member failed validation.
2019-11-06 post HLSL: Report which cbuffer failed validation.
2019-11-06 post Move .invalid. test shaders to the more appropriate subfolders.
2019-11-05 dsinclair Move all .invalid shaders into no-opt folders.
2019-11-05 dsinclair Remove old reference shaders
2019-11-05 dsinclair Only run spirv-opt if the spirv is valid.
2019-11-05 dsinclair Roll GLSLang and SPIRV-Tools
Created with:
roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers
Change-Id: I7b57223fabdd62adcdfd17756c866e9dfa23b374
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13421
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
The Metal driver calls command buffer completion callbacks on a
separate thread so enqueueing these trace events needs to be made
thread-safe. In the future, Dawn will probably have other threads
that also require thread-safe tracing.
In this CL, each thread records trace events into its own buffer,
and all buffers concatenated when trace events are acquired.
Bug: dawn:254, dawn:208
Change-Id: I0f1abd404568d838091066a8f27a3bf98fa764b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13080
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This patch adds validation code for shader side for readonly storage
buffer. It also adds unit tests for validation.
BUG=dawn:180
Change-Id: Ib5789381d41d77867dd6e6aa1f1ccbc8fa43a382
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12941
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This patch sets proper value in a few end2end tests for BindGroup/BindGroupLayout.
It also removes unused variables in unittest test for BindGroup/BindGroupLayout.
Bug=dawn:180
Change-Id: Ie5c8b2fd8265fe90b7b54c48af48106c356564b6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13300
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>