Commit Graph

1889 Commits

Author SHA1 Message Date
Corentin Wallez a02619dbf2 Roll third_party/googletest/ e3f0319d8..a09ea700d (27 commits)
e3f0319d89..a09ea700d3

$ git log e3f0319d8..a09ea700d --date=short --no-merges --format='%ad %ae %s'
2020-05-07 absl-team Googletest export
2020-05-04 absl-team Googletest export
2020-04-30 absl-team Googletest export
2020-04-28 absl-team Googletest export
2020-04-27 absl-team Googletest export
2020-04-24 absl-team Googletest export
2020-04-23 absl-team Googletest export
2020-04-20 absl-team Googletest export
2020-04-20 absl-team Googletest export
2020-04-17 absl-team Googletest export
2020-05-01 56075233+keshavgbpecdelhi Removed a typo in README.md
2020-03-28 arthur.j.odwyer Add -Wdeprecated to the build configuration.
2020-04-16 arthur.j.odwyer Fix a -Wdeprecated warning.
2020-04-16 arthur.j.odwyer Fix a -Wdeprecated warning.
2020-04-16 arthur.j.odwyer Fix a -Wdeprecated warning.
2020-04-16 arthur.j.odwyer Remove all uses of GTEST_DISALLOW_{MOVE_,}ASSIGN_.
2020-04-19 igor.n.nazarenko Enable protobuf printing for open-source proto messages.
2020-04-16 arthur.j.odwyer VariadicMatcher needs a non-defaulted move constructor for compile-time performance.
2020-04-10 absl-team Googletest export
2020-04-12 jbohl fix signed/unsigned comparison issue (on OpenBSD)
2020-04-09 malcolm.parsons Remove redundant .c_str()
2020-04-06 mail gtest-unittest-api_test - fix warning in clang build
2020-04-05 jijyunneng Remove duplicate codes existed in get-nprocessors.sh
2020-03-28 arthur.j.odwyer Replace the last instance of `throw()` with `noexcept`. NFC.
2020-03-28 arthur.j.odwyer Fix a typo in .travis.yml
2020-03-21 ngompa13 Ensure that gtest/gmock pkgconfig requirements specify version
2020-03-18 calum.robinson Add GTEST_BRIEF option

Created with:
  roll-dep third_party/googletest

Bug: dawn:394

Change-Id: I5084555477ab60c2cef8f45e9e7432dd81003cff
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21480
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-05-11 15:37:11 +00:00
Austin Eng 562255a943 Load Swiftshader Vulkan separately from the system Vulkan
This enables both Swiftshader Vulkan and the system Vulkan drivers
to be discovered and used simultaneously.

Bug: dawn:396, dawn:283
Change-Id: I580ca26c12296fe13c0331c4faf6e7a4520664e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21041
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-05-08 19:31:00 +00:00
Austin Eng 818c6b7082 Validate that ShaderModuleDescriptor has chained descriptor
Bug: chromium:1074575
Change-Id: Ibb124ca8c4771d9b8f2846d3a5f79dca6de8743d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21360
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-05-08 18:05:19 +00:00
Yunchao He 70ffa0c285 Add more tests for resource usage tracking
This change added more tests for texture usage tracking for compute.
It also added multiple write usages related tests for both buffer
and texture.

Bug: dawn:358, dawn:359

Change-Id: I8e3dbc92a06ceccfa5fce3ed319e4e641e72e41f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21100
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2020-05-07 23:49:15 +00:00
Natasha Lee 351c95a477 Refactor Serial tracking to be owned by Device frontend.
Move mCompletedSerial and mLastSubmittedSerial to Device frontend and
add getters and setters for the device backend to access such.
This is to aid the Device in taking more ownership of Serials and Ticking.

Bug: dawn:400
Change-Id: Ifa53ac294a871e484716842a3d212373b57847c4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20480
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-05-07 21:52:54 +00:00
Ryan Harrison 4f3811c064 Add Tint to BUILD.gn
Tint is behind a build flag, since Tint is not yet available in
chromium's third_party.

BUG=dawn:403

Change-Id: If5fa36b36216ef6965341b886c3bd70d27daf23a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21300
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2020-05-07 21:15:55 +00:00
Austin Eng 4fe8ead090 Revert "Support depth32float sampling on D3D12"
This reverts commit 071fe56ffe.

Reason for revert: SamplerRender/D3D12 has flaky crashes

Original change's description:
> Support depth32float sampling on D3D12
> 
> Bug: dawn:367
> Change-Id: I026e718130cbd92427c6292045fd041c878d4f77
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20840
> Commit-Queue: Austin Eng <enga@chromium.org>
> Reviewed-by: Stephen White <senorblanco@chromium.org>

TBR=cwallez@chromium.org,senorblanco@chromium.org,enga@chromium.org

Change-Id: I35df2ac35986d4a32437a52b70b025a370302651
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:367
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21320
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-05-07 20:38:37 +00:00
Austin Eng d785988172 Add missing include in DawnWireServerAndFrontendFuzzer.cpp
This file was missing an include of libfuzzer_exports.h which was
causing LLVMFuzzerInitialize to be stripped from the binary.

Tbr=cwallez@chromium.org
Bug: chromium:1075605
Change-Id: I251e3dd7ad1b3ebb95339dec946b80ce2e5d4a05
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21301
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-05-07 20:23:55 +00:00
Yunchao He 17e1e197e8 Add tests for texture usage tracking - 3
This change added tests for invisible and unsed bindings for
texture usage tracking. It also removed one buffer test, which
is not useful.

Bug: dawn:365

Change-Id: I01232836fb150ecea011a5fcbc250fa1eb7207cf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21120
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2020-05-07 16:49:05 +00:00
Austin Eng 071fe56ffe Support depth32float sampling on D3D12
Bug: dawn:367
Change-Id: I026e718130cbd92427c6292045fd041c878d4f77
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20840
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-05-07 16:47:55 +00:00
Jiawei Shao e8bf706d16 Add basic supports of storage textures on D3D12
This patch adds the basic supports of read-only and write-only storage
textures on D3D12.

The subresource tracking and barriers on the subresources used as
read-only and write-only storage textures are not included in this
patch.

BUG=dawn:267
TEST=dawn_end2end_tests

Change-Id: Ie29a3a9962cd1a79217bc87815ed0bd27623e3a8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21140
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2020-05-07 00:06:44 +00:00
Austin Eng 458ab1bf7f Expand depth sampling tests
This renames ComparisonSamplerTests to DepthSamplingTests
and adds tests which do normal sampling of depth32float textures
as well as sampling and comparison sampling in compute shaders.

Comparison samplers in compute shaders appear to be broken at least
on Metal Intel Haswell Iris 5100

Bug: dawn:367, dawn:401
Change-Id: I4a8208265675892d42b591126ffed2aadd420ab1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20782
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-05-07 00:06:34 +00:00
Austin Eng 531253357e Split ComparisonSampler tests with/without normalized depth textures
Depth textures outside the 0-1 range are clamped on OpenGL unless we
reinterpret contents as R32

Bug: dawn:367
Change-Id: Ifb539689c55bb5a4a16427025c9f0d97c4156c6b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20823
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-05-06 23:19:54 +00:00
Ryan Harrison 991b947173 Add Tint to DEPS for standalone checkouts
BUG=dawn:386

Change-Id: I0f518bed7e81e4d42ed2a1ef154738d9e8fa4a9c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21160
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2020-05-06 23:15:54 +00:00
Austin Eng b7dbb48351 Fix OpenGL format table for GL_DEPTH_COMPONENT textures
GL_DEPTH is for calls like glEnable(GL_DEPTH) and
glClearBuffer(GL_DEPTH, ...). GL_DEPTH_COMPONENT is the
enum for the texture internal format.

Bug: dawn:367
Change-Id: I8f237e26148e3fd5a624a8bb4ed69e65fdd1acd7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20822
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-05-06 21:17:04 +00:00
Corentin Wallez 5ffca2eb90 NativeSwapChainImplVk: Remove unnecessary transition on Configure
Configure was transitioning the swapchain images from undefined to
present layout but this was already happening because TextureVk starts
with a mLastUsage of None that will force a transition from undefined
when used.

Also introduce an internal texture usage bit kPresentTextureUsage to
prepare for the eventual remove of wgpu::TextureUsage::Present when
old swapchains are removed.

Bug: dawn:269
Change-Id: I57d26f18e34cacd5d91419a45787b2ece9558846
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20881
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-05-06 07:12:48 +00:00
Yunchao He 0abddd21c9 Add dispatch call in usage tracking tests
Resource usage tracking for compute is per dispatch. So we should
call pipeline and dispatch to trigger resource tracking in compute.
This change added dispatch calls for compute pass related tests.

This change also changed inappropriate comments, and moved a test
to a proper location in the file.

Bug: dawn:358

Change-Id: I6d31169164c434c2f446cd5746170433dd1eb4b7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21000
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-05-05 17:18:47 +00:00
Ryan Harrison 2b2c557462 Rolling 4 dependencies
Roll third_party/SPIRV-Tools/ 49ca250b4..2e1d208ed (3 commits)

49ca250b44..2e1d208ed9

$ git log 49ca250b4..2e1d208ed --date=short --no-merges --format='%ad %ae %s'
2020-05-01 afdx spirv-fuzz: Do not allow adding stores to read-only pointers (#3316)
2020-04-30 paulthomson reduce: increase default step limit (#3327)
2020-04-30 afdx Generalize IsReadOnlyVariable() to apply to pointers (#3325)

Roll third_party/glslang/ 39281fb71..b5f003d7a (6 commits)

39281fb710..b5f003d7a3

$ git log 39281fb71..b5f003d7a --date=short --no-merges --format='%ad %ae %s'
2020-05-01 cepheus Fix #2191: Error check for indexing reference containing unsize array.
2020-05-01 cepheus GLSL: Separate out swizzle handling (potentially fixing bugs).
2020-04-21 pmistry Add support for es extension GL_EXT_blend_func_extended * Introduces builtin variables gl_SecondaryFragColorEXT and gl_SecondaryFragDataEXT * Introduces builtin constant gl_MaxDualSourceDrawBuffersEXT * enables support for layout qualifier "index" in es profile
2020-04-30 63069047+pmistryNV Add support for extension GL_EXT_shader_integer_mix (#2203)
2020-04-26 pmistry Add support for extension GL_EXT_shader_implicit_conversions Updated extension management in TIntermediate class.
2020-04-30 cepheus Fix #2201: Improve const and copy constructor for TVarLivePair.

Roll third_party/shaderc/ 41f271e61..15a66d72f (1 commit)

41f271e613..15a66d72f3

$ git log 41f271e61..15a66d72f --date=short --no-merges --format='%ad %ae %s'
2020-05-04 rharrison Rolling 5 dependencies and fixing build (#1057)

Roll third_party/spirv-cross/ 7e0295abf..92f7d36c7 (2 commits)

7e0295abf8..92f7d36c72

$ git log 7e0295abf..92f7d36c7 --date=short --no-merges --format='%ad %ae %s'
2020-04-30 post MSL: Redirect member indices when buffer has been sorted by Offset.
2020-04-30 cwallez Fix -Wmicrosoft-enum-value

Created with:
  roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers

Change-Id: Ic556a6b7bdbbee47af3c2af5016de51d917766f8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21040
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2020-05-05 15:02:37 +00:00
Corentin Wallez 94efed23e7 Start adding docs about device facilities.
Bug: dawn:373
Change-Id: I837b0fe15ff98d58caf6b69ea6d8d92bee33e52e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18762
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-05-05 08:46:15 +00:00
Corentin Wallez ecf93472d4 Move validation of the copy commands in the entrypoint.
This will allow follow-up CLs to no-op empty copies without making the
nooped copy skip the validation.

Bug: chromium:1069076
Change-Id: Id2460c531bc68e4a8a27705520aeaec7e944d7a7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20880
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-05-05 08:33:55 +00:00
Corentin Wallez 3874434bf1 TextureVk: Make a Create function for swapchain textures.
This aligns this constructor to be used via Create like the other
vulkan::Texture constructors.

Bug: dawn:269
Change-Id: Ib85874bf24bfe49b644b4faa63c9248c540811c8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20882
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-05-05 08:33:35 +00:00
Yunchao He 07328ba0bb Add validation tests for texture resource tracking - 2
This patch adds tests to verify that texture usage tracking is per
each pass for render, and it is per each dispatch for compute.

Bug: dawn:358
Change-Id: I7ed0f470a6457e4cc53b02cd03c3da7d68cbca9a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20162
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-05-04 17:19:19 +00:00
Yunchao He 23428ea82f Add validation code for texture subresource usage tracking
This patch also add validation tests for texture subresource tracking
for render pass. Resource usage tracking for compute is per each
dispatch() call, I will add it in next patch.

BUG=dawn:157

Change-Id: I6c4b932e317d66521fa428311e727876d0adf4ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/17661
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-05-04 17:10:49 +00:00
Yunchao He a6d7f56cf8 Add resource usage tests in a single draw/dispatch
It is invalid to read and write on the same buffer/texture in
a single draw or dispatch. This change adds tests to cover this
situation.

Note that we have already added resource usage tests between passes
in the same command buffer, and tests between draw or dispatch calls
in the same pass. And this patch adds tests inside a draw or dispatch
call.

Bug: dawn:358

Change-Id: Ic52b2e559e9c996e5b76ea960183d80d67c24178
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20821
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2020-05-04 16:23:09 +00:00
Corentin Wallez a8337c378e DescriptorSetAllocation.h: Add missing include
Bug:
Change-Id: Iff2c62a83f479a85407c3cce8dba2b3376d6ab57
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20861
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-05-04 16:05:39 +00:00
Corentin Wallez dbec2fa2f6 Use unordered_set<std::string> for deprecation warnings
This fixes the roll in Google3, otherwise it complains that
unordered_set<const char*> hashes the pointer, which is most likely not
what you want to do.

Bug: dawn:394
Change-Id: I1ef06c923bb45e55b39c23e5e7734f1577c47255
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20860
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-05-04 16:04:40 +00:00
Yunchao He 798cefb78d Fix incorrect validation error in CommandBufferStateTracker
If we are missing pipeline in render or compute pass, it always reports
that we are missing vertex buffers or bind groups for render and compute
pass respectively.

Bug: dawn:359

Change-Id: I5550e55fcc9f29c0f2fb71462def836061038add
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20784
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-05-04 06:05:47 +00:00
Yunchao He ccc40f6ffa Fix a bug in ResourceUsageTrackingTests
When we test resource per draw/dispatch, we need to set pipeline, etc.,
in addition to set bind groups.

Bug: dawn:358

Change-Id: Ic51986d0608baf786521158c887a0c1ced7ccacf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20800
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-05-04 05:37:32 +00:00
Bryan Bernhart 303a3daf0d D3D12: Decouple descriptor heap allocations.
Allows bindgroups to be populated by heap type. Previously, failing to
populate one type of GPU descriptor heap required both GPU heaps
to be switched out. This resulted in extra copies and heap allocations
should only one heap type overflow.

This change also simplifies GPU descriptor heap management:
- Allocator no longer needs to operate on both heaps.
- Sub-allocation tracking can be moved into handles.

A follow-up change will remove duplicated sampler heap allocations.

BUG=dawn:155

Change-Id: I1960cf3a8bc3d86d3e8b2775da3d0c92125bcf82
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19887
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-04-30 23:19:16 +00:00
Yunchao He 2ba90d6654 Add tests for resource tracking in compute - 1
This patch adds resource usage tracking tests for overwritten
situations within a draw/dispatch when we call multiple
SetBindGroup. We should track the overwritten resources
even though they are not used in render/compute pass.

Bug: dawn:357

Change-Id: I7467db1c0b43fed8513ddb7604adbbd1be55866f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20160
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-04-30 22:08:18 +00:00
Austin Eng 129dc00c69 Suppress MSVC warnings about invalid switch values
Dawn extends texture and buffer usage enums with additional internal
usages.

Bug: dawn:397
Change-Id: Idb3918e1455f596b1e21f109016dd622d8b66732
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20781
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-04-30 22:05:38 +00:00
Corentin Wallez a121e7fff0 Enable -Wno-language-extension-token except on Windows
It is required on Windows to be able to use __uuidof().

Bug: dawn:394
Change-Id: I02c1a4d36688c5985d5eb7f65737f6b821655ddc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20703
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-04-30 16:10:48 +00:00
Corentin Wallez 75f55bfaa3 Fix and enable -Wgnu-anonymous-struct
Bug: dawn:394
Change-Id: I7753b7daff2beaeb67fe6cbb54b002ddbe077f6f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20701
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-04-30 16:01:08 +00:00
Corentin Wallez e642b1d959 Fix and enable -Wnested-anon-types
Bug: dawn:394
Change-Id: I51b533c07f21bcacd22a058cf4a080b9b2b853f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20700
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-04-30 15:58:28 +00:00
Jiawei Shao 754c161fd3 Add basic supports of storage textures on Vulkan
This patch adds the basic supports of read-only and write-only storage
textures on Vulkan.

The subresource tracking and barriers on the subresources used as
read-only and write-only storage textures are not included in this
patch.

BUG=dawn:267
TEST=dawn_end2end_tests

Change-Id: I6831b96202a97182763ecd28bc41ab03df904a7c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20560
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-04-30 02:43:08 +00:00
Corentin Wallez c85ef7927f Fix and enable -Wfour-char-constants
Bug: dawn:394
Change-Id: Ic11924bf81820f6d3a67bf5d70cce7104e70954f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20581
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-04-29 21:07:21 +00:00
Corentin Wallez b2d1d7b2ce Fix and enable -Wvla-extension
Bug: dawn:394
Change-Id: If5ced5f910da7fd598521113aba89e6a9051f4a9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20582
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-04-29 16:00:41 +00:00
Corentin Wallez 85cc603394 Enable -Wc++20-designator
Bug: dawn:394
Change-Id: I03f0c779e4fb3f0a32d171e986de885c857fe782
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20580
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-04-29 15:56:41 +00:00
Ryan Harrison 349a82a382 Rolling 5 dependencies
Roll third_party/SPIRV-Tools/ 61b7de3c3..49ca250b4 (13 commits)

61b7de3c39..49ca250b44

$ git log 61b7de3c3..49ca250b4 --date=short --no-merges --format='%ad %ae %s'
2020-04-28 stevenperron Delete nullptr in function bb list immedietly (#3326)
2020-04-28 jaebaek Set DebugScope for termination instructions (#3323)
2020-04-28 afdx spirv-fuzz: Do not outline regions that end with a loop header (#3312)
2020-04-27 bclayton vscode: Handle '|' chains on BitEnum / ValueEnum (#3309)
2020-04-27 jaebaek Add debug information analysis (#3305)
2020-04-27 dneto Add spvtools::opt::Operand::AsLiteralUint64 (#3320)
2020-04-27 afdx spirv-fuzz: Pass on validator options during shrinking (#3317)
2020-04-27 afdx spirv-fuzz: Clamp statically out-of-bounds accesses in code donation (#3315)
2020-04-27 afdx spirv-fuzz: Fix memory management in the fact manager (#3313)
2020-04-27 afdx spirv-fuzz: Do not replace the Sample argument in OpImageTexelPointer (#3311)
2020-04-23 afdx Allow various validation options to be passed to spirv-opt (#3314)
2020-04-23 Chaitanyas0101 typo fix: in README.md exectuable->executable (#3306)
2020-04-20 afdx spirv-fuzz: Make handling of synonym facts more efficient (#3301)

Roll third_party/glslang/ 3f4e5c456..39281fb71 (10 commits)

3f4e5c4563..39281fb710

$ git log 3f4e5c456..39281fb71 --date=short --no-merges --format='%ad %ae %s'
2020-04-29 63069047+pmistryNV Add support for extension GL_ARB_vertex_attrib_64bit (#2193)
2020-04-27 63069047+pmistryNV Add support for extension GL_ARB_texture_query_lod. (#2194)
2020-04-28 dj2 Remove unused Es310Desktop430 (#2200)
2020-04-27 63069047+pmistryNV Add support for extension GL_ARB_shading_language_packing (#2192)
2020-04-27 cepheus Move to SPIR-V 1.5 Rev. 3, bump revision, remove a status from README.
2020-04-24 johnkslang Note about Build Status.
2020-04-24 cepheus Move to latest SPIR-V header, and bump glslang revision.
2020-04-22 63069047+pmistryNV Add support for extension GL_ARB_shader_storage_buffer_object (#2184)
2020-04-22 antidote.crk TPpToken: Fix compiling on clang-10 (#2189)
2020-04-21 mennovink20 xcode warnings fix (#2188)

Roll third_party/shaderc/ ced9c72d0..41f271e61 (1 commit)

ced9c72d00..41f271e613

$ git log ced9c72d0..41f271e61 --date=short --no-merges --format='%ad %ae %s'
2020-04-28 rharrison Rolling 5 dependencies, updating expectations, and fixing build issues (#1051)

Roll third_party/spirv-cross/ f38cbeb81..7e0295abf (17 commits)

f38cbeb814..7e0295abf8

$ git log f38cbeb81..7e0295abf --date=short --no-merges --format='%ad %ae %s'
2020-04-28 rharrison Update SPIR-V Headers to 1.5 rev 3
2020-04-27 post Work around odd deadlock in test_shaders.py in --parallel mode.
2020-04-27 post Implement OpAtomicLoad/OpAtomicStore.
2020-04-27 post MSL: Fix case where subpassInput is passed to leaf functions.
2020-04-27 alexis.payen Fixed recursion in combined_decoration_for_member Members in nested structs were not properly iterated on, and as a result, flags like row major for matrices could be not propagated properly.
2020-04-23 dsinclair Roll GLSLang, SPIRV-Tools and SPIRV-Headers.
2020-04-21 post GLSL: Support f16x2 <-> f32 bitcast.
2020-04-21 post Be a bit more careful what nonuniform state is propagated.
2020-04-21 post Handle RayQueryKHR type.
2020-04-21 post Update SPIR-V headers.
2020-04-18 devsh.graphicsprogramming Fix issue #1327
2020-04-21 post HLSL: Add parens in unpackUint2x32 for clarity.
2020-04-21 post HLSL: Only allow 64-bit integers in SM 6.0.
2020-04-21 post Ensure unpack/pack2x32 tests are compatible with test suite.
2020-04-17 bingkan GLSL/HLSL: Support packUint2x32 and unpackUint2x32
2020-04-21 post MSL: Deal correctly with initializers on Private variables.
2020-04-20 post MSL: Support edge case with DX layout in scalar block layout.

Roll third_party/spirv-headers/ 2ad0492fb..c0df742ec (5 commits)

2ad0492fb0..c0df742ec0

$ git log 2ad0492fb..c0df742ec --date=short --no-merges --format='%ad %ae %s'
2020-04-24 cepheus Update headers to SPIR-V 1.5 Revision 3
2020-04-24 cepheus Add a bunch of missing "version" : "None" for ray tracing.
2020-04-24 cepheus Rebuild the headers with the fixed grammar file.
2020-04-24 cepheus Add missing "version" : "None" for ShaderCallKHR
2020-04-24 cepheus Grammar: The ray-tracing updates were not done in numerical ordering.

Created with:
  roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers

Change-Id: I6750e36ac1717b3a30f805771ad09f89355083ff
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20600
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2020-04-29 14:52:51 +00:00
Corentin Wallez 2d79ef264e Do not use Dawn's warnings for compiling Chromium's gtest main.
When building in Chromium, Dawn's gtest targets use sources files
in Chromium so it can use Chromium's GTest harness. These source
files were compiled with the "dawn_internal" config included.
This made them include Dawn-specific warnings that trigger on parts
of Chromium's //base.

Instead compile these "main" files as separate source_sets without
dawn_internal and link them in the dawn test executables.

Bug: chromium:1075817

Change-Id: I573390ca3e6a7dfd1e8a949dc10ed268f0d0f63e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20520
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-04-28 17:12:05 +00:00
Bryan Bernhart c94f4a7a19 D3D12: Fix invalid allocation size check.
GetResourceAllocationInfo() returns UINT_MAX64 when
the requested size is too large. This corrects the
validation to OOM when D3D considers the size
invalid.

Only validating for zero-size would cause a device
loss as certain D3D drivers may not always consider
zero-sized invalid and NextPowerOfTwo(UINT_MAX64)
would overflow the allocator.

BUG=dawn:393

Change-Id: Idaad10c139f6428d4f48bca24027a6691257aca9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20400
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2020-04-28 15:58:45 +00:00
Jiawei Shao 88f2ec853f Add basic supports of readonly and writeonly storage textures on Metal
This patch adds the basic supports of both read-only and write-only
storage textures on Metal with several simple end2end tests that use
read-only or write-only storage textures in every shader stage.

Here are the follow-ups after this patch:
1. test all the texture formats that can be used as both read-only and
write-only storage textures.
2. support using a texture with multiple different binding types in one
rendering or compute encoders.
3. test image2DArray, imageCube and imageCubeArray.

BUG=dawn:267
TEST=dawn_end2end_tests

Change-Id: Id0de623f7c48389b3b1e90b34a34fd16b14e1477
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19420
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2020-04-28 01:02:21 +00:00
Felix Maier f70db58dce Fix MSVC compilation.
Add missing includes:
- Add missing vector include WGPUHelper.h
- Add missing algorithm include as there is a std::transform used in DawnPerfTestPlatform.cpp

Remove c++20 designated initializers from tests.
Removing these as we target c++14 and they trigger warnings in MSVC.

Bug: dawn:394
Change-Id: Id7aea9ef953cc9baa5b7633a036dd09a96aca130
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20460
Commit-Queue: Felix Maier <xilefmai@gmail.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-04-27 20:29:01 +00:00
Corentin Wallez c05a0e1aac Enable -pedantic and disable currently triggered warnings
This will help avoid the introduction of additional non-standard
code and the warnings can be reintroduced one by one.

Bug: dawn:394

Change-Id: Ib3cd63058f47d17ae5ef67b047887a3b263a7e64
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20382
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-04-27 18:09:40 +00:00
Corentin Wallez 006020b04d Fix ValidateRowsPerImage error text.
Bug: None
Change-Id: I4fa934c5cfd5df0b0d18286350640bd1ff9df510
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20440
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-04-27 16:42:40 +00:00
Corentin Wallez 00b90ea832 Enable more warning needed for Skia to build with Dawn on Linux
The new warnings are:

 - -Wdeprecated-copy
 - -Winvalid-offsetof
 - -Wpessimizing-move

And the list of warnings was sorted alphabetically.

Bug: chromium:1072449
Change-Id: I9f3eecae645455c481ecc2e0be4df350e1453907
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20381
Reviewed-by: Zhenyao Mo <zmo@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-04-24 17:02:53 +00:00
Corentin Wallez 094d1d4c05 Add Matrix chatrooms to README.md
Bug: None
Change-Id: I72f7df3326cc91d7306db13145cdae9e50982bf2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20380
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-04-24 12:38:13 +00:00
Corentin Wallez cdf2d8de77 Deprecate BufferCopyView.rowPitch/imageHeight -> bytesPerRow/rowsPerImage
Bug: dawn:22

Change-Id: Ib4d93a73a6c40326d180f569fd51216c2d87df1e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20201
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-04-24 10:02:43 +00:00
Corentin Wallez c244f53921 Add a size argument to Set[Vertex|Index]Buffer
Bug: dawn:22
Change-Id: I06a4fc2b651e5a4692893f710ca11785976c1fa4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20200
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-04-24 09:42:03 +00:00
Brandon Jones 635239faf8 Non-Local Residency 2: Implement Non-Local Management Logic
Implements logic for managing the NON_LOCAL memory segment for UPLOAD
and READBACK heaps on Non-UMA devices.

Bug: dawn:193
Change-Id: I2426bf6b5f7a7ccd4420f830f344379af9faf73c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19901
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
2020-04-23 21:50:32 +00:00