Commit Graph

9990 Commits

Author SHA1 Message Date
Austin Eng 62b08f845f Test that vertex attributes can overlap
Bug: dawn:433
Change-Id: I47d9ffe16d6ad7730628dc27ec6708006cf4384d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22560
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-06-03 22:47:16 +00:00
Brandon Jones 0395ca9b66 Try To Recover From MakeResident Failure
Per MSDN recommendations, Dawn should handle MakeResident failures by
evicting some more and attempting MakeResident again.

Bug: dawn:193
Change-Id: I0a9d326dcd000360f6eafb5691efb4987a77e8d5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22280
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
2020-06-03 17:04:45 +00:00
Austin Eng 2f02207805 Generate specific error when BGL storageTextureFormat is missing
Some WebGPU CTS tests were failing with invalid WGPUTextureFormat
when really the format was simply missing. This CL updates
the validation code so it is more clear.

Bug: dawn:433
Change-Id: Ie7aacd01ea424d9f5df0078703a474e98b72ce41
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22543
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-06-03 16:43:35 +00:00
Austin Eng 0768ffa742 Metal: Handle Buffer allocation failure
Bug: dawn:433
Change-Id: I6549c4a1e31171257761397b018090d0eb7471e6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22424
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-06-03 16:14:35 +00:00
Ryan Harrison 7d60a4c544 Fix nit in PRESUBMIT.py
Change-Id: Icc197948e387a75a05ca92f918b0b459e3c8d01f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22583
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-06-03 16:12:09 +00:00
dan sinclair ccb699eb00 Remove right shift arithmetic operand.
The `>>>` symbol was folded into the `>>` symbol in WGSL. This CL
removes `>>>` from Tint.

Change-Id: I9d900de9a6026a8099796b94aad44483f0c6813f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22582
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-06-03 16:11:44 +00:00
dan sinclair 2b23e4bd70 Remove unless_stmt
The `unless` statement was removed from the WGSL grammar so remove it
from Tint.

Change-Id: I31a185f5c5e3e88b667caea1c9a88aee80c0b810
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22581
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-06-03 16:11:37 +00:00
dan sinclair 6bd7061a2e Remove conditional break/continue.
This CL removes the conditional forms of the break and continue
statements as they are no longer in the WGSL spec.

Change-Id: I46224d6cb5ce706cfc95d35ab0a4eea46abf62a9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22580
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-06-03 16:11:28 +00:00
David Neto 27d42ede4e [spirv-reader]: Support OpBranch
Bug: tint:3
Change-Id: I39d03f4fc29c7b60dc09d0bafc3afaec754671a0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22425
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-06-03 13:43:03 +00:00
Ryan Harrison e76f4dac06 Adding PRESUBMIT.py with a bunch of checks turned on
This CL does not retroactively fix violations of the checks, so as new
code is added unrelated failures may appear from older code in the same
file.

Removed the headers= line from CPPLINT.cfg, since it was adding an
extension,.hpp, that we don't use for headers and it is not supported on
all platforms.

BUG=tint:1

Change-Id: I9b2d096cf6c69d1456c857a2fdcd7e7da3fd747b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22544
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-06-03 13:41:41 +00:00
Corentin Wallez d586b079f2 Fix compilation failure with libstdc++
Queue.cpp was missing the <cstring> include for memcpy.

Bug:
Change-Id: Iaa498ec82c85dd6c7db7e7b09392baec08eb9e3c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22461
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-06-03 13:36:15 +00:00
dan sinclair 579d33c528 Make case selectors an integer value
Change-Id: I819983701ed6cca4eba1a05b4edc5fdff10fa88d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22542
Reviewed-by: David Neto <dneto@google.com>
2020-06-02 20:12:02 +00:00
dan sinclair e009c2058d Add IntLiteral parent for Sint and Uint literals.
This CL adds a parent class for the type types of interger literals for
the cases where we can have either.

Change-Id: I61b540bedd49a6cf5a899e6864e2ea6f140cd2be
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22541
Reviewed-by: David Neto <dneto@google.com>
2020-06-02 20:11:54 +00:00
dan sinclair c6f2947ceb Rename the IntLiteral to SintLiteral.
This Cl clarifies that IntLiteral is a signed value, which matches with
the usage of UintLiteral.

Change-Id: Ic8f0e2382cb66eb6b09daed096886dcc55e6b0f0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22540
Reviewed-by: David Neto <dneto@google.com>
2020-06-02 20:11:44 +00:00
David Neto 1649dfadd7 [spirv-reader] Support unreachable, as a return
Bug: tint:3
Change-Id: Ia1384f84f7851a9e155c1536a624213ef51ee0a1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22521
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-06-02 19:56:07 +00:00
David Neto 91332dc475 [spirv-reader] Support kill
Bug: tint:3
Change-Id: I91472b98c9977a5bdce6fc2ab4880e8312881fcf
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22500
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-06-02 19:56:07 +00:00
Bryan Bernhart adbf9153d9 D3D12: Fix RO storage buffer mismatches.
If the shader declares a storage buffer RO but uses storage buffer in
the BGL, the shader compiler will be told to treat these bindings as
UAV instead of SRV to avoid PSO mismatches.

Bug: dawn:410
Change-Id: I3be3257449de55fd2d35e914233b48c6f7121b58
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22322
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-06-02 19:16:20 +00:00
Austin Eng 3fb9c1bbfb Add warning for non-c-typedef-for-linkage
This is blocking Skia from updating to newer clang

Tbr=cwallez@chromium.org
Bug: chromium:1064305
Change-Id: I7d894dba701ebe2fe0e1b78d5fb42032d88846aa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22522
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-02 18:54:20 +00:00
Austin Eng 5b3cdc66fd Skip creating the VkImageView if the texture usage is only Copy
Bug: dawn:399
Change-Id: Iedd097dc96b248499fefd0c259b13fb55fc39f0d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22380
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-06-02 18:39:59 +00:00
dan sinclair 1d69915155 Rename case statement conditions to selectors.
The name conditions isn't quite correct for the case statement. This CL
updates the code to use selectors instead of conditions.

Change-Id: I98b8050b11e2328f97e4443469572ab47d7c1555
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22520
Reviewed-by: David Neto <dneto@google.com>
2020-06-02 17:18:56 +00:00
David Neto cb48e79fa5 [spirv-reader] Support return, return-value
Bug: tint:3
Change-Id: Iaaf6ace739ac30e7f9f0bd4ddcef209ab1b71ed8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22480
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-06-02 16:48:27 +00:00
David Neto d8613596e2 [spirv-reader] Emit loop and continuing
Bug: tint:3
Change-Id: Iaced5ee41f6b27ab350432fc1c2cdff6042ba191
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22423
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-06-02 16:46:51 +00:00
David Neto 468c26b233 [spirv-reader] Emit control flow: if/then/else
Bug: tint:3
Change-Id: Ief0544415f27842913a6234a962d163ecedb48df
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/21821
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-06-02 13:25:06 +00:00
Corentin Wallez 47a3341e07 Deprecate Buffer::SetSubData in favor of Queue::WriteBuffer
Bug: dawn:22
Change-Id: I00b3cd65ac4eb494b05918251f4b3b2bcaf24f71
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22200
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-06-02 09:24:39 +00:00
Austin Eng 3b7d0858bf D3D12: Skip dynamic buffer bindings with None visibility
This was hitting an ASSERT because D3D12 doesn't have an option
to set None as the shader visibility.

Bug: dawn:448
Change-Id: I3e056e531e7d1bb89da1736bc609bfe97a2fa194
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22324
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-06-01 23:42:57 +00:00
Ryan Harrison 0e3c27de6a Rolling 5 dependencies
Roll third_party/SPIRV-Tools/ d3d89bb90..f050cca7e (5 commits)

d3d89bb90c..f050cca7ec

$ git log d3d89bb90..f050cca7e --date=short --no-merges --format='%ad %ae %s'
2020-05-29 andreperezmaselco.developer spirv-fuzz: Add push id through variable transformation (#3359)
2020-05-27 rharrison Rolling 4 dependencies (#3380)
2020-05-27 stevenperron Start SPIRV-Tools v2020.4
2020-05-27 stevenperron Finalize SPIRV-Tools v2020.3
2020-05-27 stevenperron Update CHANGES

Roll third_party/glslang/ 2b0eafb1d..d39b8afc4 (4 commits)

2b0eafb1de..d39b8afc47

$ git log 2b0eafb1d..d39b8afc4 --date=short --no-merges --format='%ad %ae %s'
2020-05-28 40001162+alelenv EXT_ray_tracing requires spv1.4 (#2237)
2020-05-28 shuizhuyuanluo fix warning unused parameter in release build (#2251)
2020-05-27 greg Fix missing patch decoration for TessFactor PCF arg (#2249)
2020-05-27 greg Update SPIRV-Tools to stable. Also SPIRV-Headers to TOT. (#2250)

Roll third_party/shaderc/ 7d2f8c57e..da87b8d8b (3 commits)

7d2f8c57ee..da87b8d8b0

$ git log 7d2f8c57e..da87b8d8b --date=short --no-merges --format='%ad %ae %s'
2020-06-01 bryan.bernhart Support forcing storage buffers to be always declared as UAV. (#1076)
2020-06-01 rharrison Roll third_party/spirv-cross/ 61cddd630..d385bf096 (4 commits) (#1077)
2020-05-26 rharrison Rolling 4 dependencies and expectations (#1074)

Roll third_party/spirv-headers/ ac638f181..11d7637e7 (7 commits)

ac638f1815..11d7637e7a

$ git log ac638f181..11d7637e7 --date=short --no-merges --format='%ad %ae %s'
2020-06-01 dneto spir-v.xml: Use plain ASCII quotes in comment
2020-05-29 cepheus Rebuild headers against the previous grammar commit.
2020-05-29 dmitry.sidorov Apply suggestions
2020-04-05 dmitry.sidorov Add Intel specific definitions from KhronosGroup/SPIRV-LLVM-Translator
2020-05-29 cepheus Header build from previous grammar update.
2020-05-25 michael.kinsner Propose bit allocation mechanism for the FP Fast Math Mode bitfield, following from the mechanism previously added for the loop control bitfield.
2020-04-05 dmitry.sidorov Add SPV_INTEL_function_pointers preview extension

Roll third_party/tint/ 537039009..e2be48975 (11 commits)

https://dawn.googlesource.com/tint/+log/537039009663..e2be4897566d

$ git log 537039009..e2be48975 --date=short --no-merges --format='%ad %ae %s'
2020-06-01 dsinclair Fix merge conflict
2020-06-01 dsinclair [spirv-writer] Add fallthrough support
2020-06-01 dsinclair [spirv-writer] Add switch support
2020-06-01 dneto [spirv-reader] use stack of statement lists
2020-06-01 dneto [spirv-reader] Add problematic CFG case as disabled test
2020-06-01 dsinclair Add case_selectors update
2020-06-01 dsinclair [spirv-writer] Generate kill statements.
2020-06-01 dsinclair Updating to match WGSL spec.
2020-06-01 dsinclair Update intrinsics in the grammar.
2020-06-01 dsinclair Update WGSL grammar builtins to match spec.
2020-05-27 dj2 [spirv-writer] Remove stpq support.

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

Change-Id: Ifbd3f1db31c76b8895242dd5104d2027de8824af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22442
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2020-06-01 20:07:53 +00:00
Bryan Bernhart e388716e52 Roll third_party/shaderc/ 7d2f8c57e..da87b8d8b (3 commits)
7d2f8c57ee..da87b8d8b0

$ git log 7d2f8c57e..da87b8d8b --date=short --no-merges --format='%ad %ae %s'
2020-06-01 bryan.bernhart Support forcing storage buffers to be always declared as UAV. (#1076)
2020-06-01 rharrison Roll third_party/spirv-cross/ 61cddd630..d385bf096 (4 commits) (#1077)
2020-05-26 rharrison Rolling 4 dependencies and expectations (#1074)

Created with:
    roll-dep third_party/shaderc

Change-Id: Icc6d6048d584e1b58a9ff777e5e7238fab6aeda7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22422
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-06-01 19:19:12 +00:00
dan sinclair e2be489756 Fix merge conflict
Change-Id: Idd941099241e9310fea13932c3ef4fcf5083730a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22441
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-06-01 19:00:41 +00:00
dan sinclair dadd149d9b [spirv-writer] Add fallthrough support
This CL adds support for the fallthrough statement in a `case` block.

Bug: tint:5
Change-Id: I282643a304846a19212d41bd8bd20a60398bd793
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22220
Reviewed-by: David Neto <dneto@google.com>
2020-06-01 18:56:56 +00:00
dan sinclair 916b408111 [spirv-writer] Add switch support
This CL adds switch support to the SPIR-V writer.

Bug: tint:5
Change-Id: I8a6ad40cb2d344c87abdf842194b60afb1b4c96e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22165
Reviewed-by: David Neto <dneto@google.com>
2020-06-01 18:56:34 +00:00
David Neto 7768f5b308 [spirv-reader] use stack of statement lists
This is preparation for emitting nested control flow.

Bug: tint:3
Change-Id: I90fc7edba8cb9937f722e6f5e94c7f222d34c403
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/21801
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-06-01 18:51:06 +00:00
Corentin Wallez b730bfa356 Fix missing space in an error string.
TBR=enga@chromium.org

Change-Id: I7c543fa0f0fad721edd5a5de585ddd54e757535d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22401
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-06-01 17:27:32 +00:00
David Neto b83c651654 [spirv-reader] Add problematic CFG case as disabled test
In this case, a basic block is a continue target
for both an outer loop and is also for itself as a
single-block loop.

Bug: Tint:3
Change-Id: If361004a4b871966674ca972922c45e712ce7c9c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22420
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-06-01 16:59:24 +00:00
dan sinclair 1aadbd4e47 Add case_selectors update
This CL adds the missing case_selectors option from the grammar updates.

Change-Id: Ia6c110e917dd574711d396fb34ad53a2a67cf1fe
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22306
Reviewed-by: David Neto <dneto@google.com>
2020-06-01 16:56:46 +00:00
Austin Eng 2dfc42dd39 Fix ValidateEntireSubresourceCopied
This function was validating the depth of the copy which is
incorrect for 2D array textures. Remove this check for now
since it would be only relevant for 3D textures which Dawn
does not support yet.

Bug: dawn:424
Change-Id: I756080a899a7c5effe5843a530d4db0571bc10d5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22323
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-06-01 16:19:02 +00:00
Corentin Wallez 13110bff05 d3d12_platform: ensure windows.h macros don't cause compile errors
The windows.h macros were undefined only at the end of this platform
header previously but with the addition of d3d12sdklayers.h the
definition of ID3D12DebugQueue::GetMessage picked up the macro and
became GetMessageA or GetMessageW, but Dawn code referred to it as
GetMessage causing a compilation error.

Fix this by preemptively loading windows.h and undefing some of the
macros so that the D3D12 headers don't see them.

Bug:
Change-Id: I1985cc20a9bdec1d25619ac5088e918b2acf8ecb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22400
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-06-01 13:58:22 +00:00
dan sinclair 59fc026bcf [spirv-writer] Generate kill statements.
This Cl adds preliminary support for generating Kill commands. This may
change in the future if the semantics of kill are set in WGSL to not
match OpKill.

Bug: tint:5
Change-Id: Id466a1b26b37867a26373b93f56d627a0491f47f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22240
Reviewed-by: David Neto <dneto@google.com>
2020-06-01 13:44:43 +00:00
dan sinclair 091b2b5fc8 Updating to match WGSL spec.
This CL updates a few names, addeds a return_stmt method and re-orders
some code to closer match the current WGSL specification.

Change-Id: I388be1c22d5d10229fdfcdb2ff929c410f5ae638
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22305
Reviewed-by: David Neto <dneto@google.com>
2020-06-01 13:44:06 +00:00
dan sinclair 46e959da39 Update intrinsics in the grammar.
The intrinsic methods were removed from the WGSL grammar and are treated
as builtin functions. This Cl updates Tint to match.

Bug: tint:41
Change-Id: I3f9ff6c17f1ca57ad159d883fd5a966657caeb4f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22301
Reviewed-by: David Neto <dneto@google.com>
2020-06-01 13:43:22 +00:00
dan sinclair 1d2ad81eb9 Update WGSL grammar builtins to match spec.
This CL removes the builtin_decoration from the parser in favour of
using IDENT tokens for builtins. We still convert to an enum in the
parser and validate the value provided.

Bug: tint:41
Change-Id: If5dc3844e3325c75951e7b320c123cf66cb8e106
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22300
Reviewed-by: David Neto <dneto@google.com>
2020-06-01 13:43:11 +00:00
Corentin Wallez 0357eed7de Revert "Check FP16 support on vulkan backend"
This reverts commit bdc05c3d5f.

Reason for revert: Likely culprit for crbug.com/1087896

Bug: chromium:1087896

Original change's description:
> Check FP16 support on vulkan backend
>
> This patch check FP16 support on vulkan backend, and introduces
> the shader_float16 extension.
>
> BUG=dawn:426
> TEST=dawn_end2end_tests
>
> Change-Id: Ie09568a416ce9eb2c11afeede3e7da520550d5fb
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21901
> Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Reviewed-by: Austin Eng <enga@chromium.org>

TBR=cwallez@chromium.org,kainino@chromium.org,yunchao.he@intel.com,jiawei.shao@intel.com,shaobo.yan@intel.com,hao.x.li@intel.com,enga@chromium.org,jiajie.hu@intel.com,xinghua.cao@intel.com

Bug: dawn:426
Change-Id: I8a42cf01ab32b3504bc7c1a335307db761424bdd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22360
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-05-29 16:54:35 +00:00
Austin Eng f7a98fa854 Ensure dynamic buffer offset bindings are sorted in increasing order
A previous CL sorted bindings by binding number, but bindings were first
sorted by type. This means a bind group layout with mixed dynamic
storage and uniform buffers would not always have all dynamic bindings
in increasing order. Instead, it would be strictly increasing within
each section of uniform/storage buffers. This CL corrects the issue
by first sorting dynamic buffers by binding number.

Bug: dawn:408
Change-Id: I3689eb64ad8aa8768cebe266eebcba75a21894ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22303
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-05-29 16:19:58 +00:00
Enrico Galli 4c32bd0b7d D3D12: Silence known debug layer warnings
This will help remove noise in debug layer output. This patch also
 promotes warnings and higher to Dawn errors.

BUG: dawn:363, dawn:418, dawn:419, dawn:421

Change-Id: I3112c94aff71fc7e76dff48c82bafe9e051ed3b4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21702
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-05-29 08:29:58 +00:00
Corentin Wallez 6ced832d74 Fix unlinking nullptr error scopes if device init failed
When device initialization failed, DeviceBase::mCurrentErrorScope is
nullptr so we need to guard the call to UnlinkForShutdown.

Bug: chromium:1081998
Change-Id: I65a1948117fa9461f7fc8d2d1d70aef669bc375d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21685
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-05-29 08:04:48 +00:00
Jiawei Shao 0e5301c23e Add basic supports of storage textures on OpenGL
This patch adds the basic supports of read-only and write-only storage
textures on OpenGL backend. Currently on OpenGL backend we only support
using either a layer of a texture or the entire texture as either read-
only or write-only storage texture.

BUG=dawn:267
TEST=dawn_end2end_tests

Change-Id: I235b98d8d961a17739ea35eec9726dcc80889c4b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2020-05-29 07:51:08 +00:00
Corentin Wallez da6dccd7c5 Metal: Fix clearing of subresource mipmaps.
On Intel the lazy-clearing optimization that bundled multiple
subresources at once to lazy-clear failed when multiple different
mip-levels were bundled together. The rendering was "clipped" to the
size of the smalled miplevel, resulting in some mip levels not being
fully cleared.

Bug:
Change-Id: Icfafbeae25bd426119a0b499237052c87eafe93e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22341
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-05-29 07:37:48 +00:00
Bryan Bernhart 454c699d47 Rolling 1 dependencies
Roll third_party/spirv-cross/ 61cddd630..d385bf096 (4 commits)

61cddd6307..d385bf096f

$ git log 61cddd630..d385bf096 --date=short --no-merges --format='%ad %ae %s'
2020-05-28 bryan.bernhart Prefer set/binding API
2020-05-28 post Document all CLI options.
2020-05-28 post Do not mask writes to remapped variables in all cases.
2020-05-27 bryan.bernhart HLSL: Add option to treat certain SSBO bindings as UAV, even with readonly.

Created with:
    roll-dep third_party/spirv-cross

Change-Id: Ibc41180952fed94d3b1089801bd31d087d2e7f41
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22307
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-05-29 07:29:38 +00:00
Corentin Wallez e4f8e19e72 Remove the defaulting for bytesPerRow = 0
Bug: dawn:432
Change-Id: I335cdc367c322764861878bfb604ecc6a146b732
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22340
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-05-29 07:28:38 +00:00
Austin Eng 295a4177ae Add ScopedEnvironmentVar class for setting env variables in BackendVk
In the Vulkan backend, we only need to set VK_LAYER_PATH and
VK_ICD_FILENAMES while we're gathering the device information. After
this, we should unset the environment variables or they will persist
and affect loading Vulkan again (from Dawn or another client) in the
future.

Bug: dawn:406
Change-Id: I30c38b0980e181126fcd7fa911bbf9e8aa35f3b8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22021
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-05-28 16:05:04 +00:00
Austin Eng f874525de3 OpenGL: Fix rendering to a layer of a depth/stencil texture
Bug: dawn:430
Change-Id: Ifb6c72374707a05054cfef021840bc8305b4f9d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22320
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
2020-05-28 08:53:23 +00:00