This is a temporary fix until dawn_wire can support multiple devices.
When using objects from different devices, the wire will inject an
error into the receiver object's device. Methods that return objects
will return a dummy object. Using the dummy object will cause a fatal
error on the server.
Without this fix, the server would blindly lookup an ObjectId which
could point to some other object. This would bypass same-device
validation and have incorrect results.
Bug: dawn:383
Change-Id: I898f07d4b26f2a97ef952b82af488e7f807c36f0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19261
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
The upstream WebGPU spec decided to not pursue CreateBufferMappedAsync,
and it adds some complexity to Dawn, so we remove it.
Bug: dawn:22
Change-Id: I4182a90c4a1aa0bfbaecd7d8f67d7049cf5df5d6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/17321
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This prevents the client from continuing to send commands
when the wire connection has dropped. In Chromium this may
be because the connection to the GPU process is lost and the
transfer buffer may be destroyed.
This CL also adds a new helper to make testing callbacks
with mocks easier.
Bug: chromium:1070392
Change-Id: I6a69c32cc506069554ead18ee83a156ca70e2ce2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19160
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This CL adds generation for the OpShiftLeftLogical, OpShiftRightLogical
and OpShiftRightArithmetic expressions.
Bug: tint:5
Change-Id: I3436453350fc9afd3528b1ae238682b7abc6d636
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19508
Reviewed-by: David Neto <dneto@google.com>
This CL adds generation for the OpFDiv, OpSDiv and OpUDiv SPIR-V
instructions.
Bug: tint:5
Change-Id: I9fd875f453dd71857b192a2dad56149bae52caf5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19507
Reviewed-by: David Neto <dneto@google.com>
This CL adds support for generating the OpSMod, OpUMod and OpFMod SPIR-V
instructions.
Bug: tint:5
Change-Id: I9e2183535ba24a2d0bb4257dd797a62151fe04a1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19506
Reviewed-by: David Neto <dneto@google.com>
This CL adds generation of the OpFSub and OpISub SPIR-V commands from
the subtraction binary expression.
Bug: tint:5
Change-Id: Ia25a855a972057a4cac70d538946e176e0a0e5c3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19505
Reviewed-by: David Neto <dneto@google.com>
Roll third_party/SPIRV-Tools/ e95fbfb1f..7d65bce0b (12 commits)
e95fbfb1f5..7d65bce0bb
$ git log e95fbfb1f..7d65bce0b --date=short --no-merges --format='%ad %ae %s'
2020-04-14 stevenperron Sampled images as read-only storage (#3295)
2020-04-14 alanbaker Remove implicit fallthrough (#3298)
2020-04-14 stevenperron Add tests for recently added command line option (#3297)
2020-04-14 dneto If SPIRV-Headers is in our tree, include it as subproject (#3299)
2020-04-13 stevenperron Struct CFG analysus and single block loop (#3293)
2020-04-13 jaebaek Preserve debug info in eliminate-dead-functions (#3251)
2020-04-13 stevenperron Update acorn version (#3294)
2020-04-09 stevenperron Handle more cases in dead member elim (#3289)
2020-04-09 h.baensch.92 Fix pch macro to ignore clang-cl (#3283)
2020-04-07 afdx spirv-fuzz: Improve the handling of equation facts (#3281)
2020-04-07 afdx spirv-fuzz: Handle more general SPIR-V in donation (#3280)
2020-04-06 afdx spirv-fuzz: Improve support for compute shaders in donation (#3277)
Roll third_party/glslang/ b5757b950..4d2298bfd (5 commits)
b5757b9500..4d2298bfd7
$ git log b5757b950..4d2298bfd --date=short --no-merges --format='%ad %ae %s'
2020-04-13 cnorthrop Support multiple swizzled out operands (#2175)
2020-04-12 cepheus Fix#2178: Allow specialization constants for texel offsets.
2020-04-10 h.baensch.92 Get rid of all warnings with MSVC and clang-cl (#2177)
2020-04-08 40001162+alelenv Add support for EXT_ray_flags_primitive_culling. (#2173)
2020-04-07 cepheus Error message: Finish addressing #2097, better texture error message.
Roll third_party/shaderc/ 802636496..1926de063 (1 commit)
8026364968..1926de0638
$ git log 802636496..1926de063 --date=short --no-merges --format='%ad %ae %s'
2020-04-09 rharrison Remove ambiguity in comment of pointer vs Klein star for * (#1037)
Roll third_party/spirv-cross/ 6637610b1..54658d625 (3 commits)
6637610b16..54658d6255
$ git log 6637610b1..54658d625 --date=short --no-merges --format='%ad %ae %s'
2020-04-10 cdavis MSL: Add options to control emission of fragment outputs.
2020-04-09 h.baensch.92 Improve compatibility with clang-cl
2020-04-07 post MSL: Do not use base expression with PhysicalTypeID OpCompositeExtract.
Roll third_party/spirv-headers/ f8bf11a02..2ad0492fb (1 commit)
f8bf11a025..2ad0492fb0
$ git log f8bf11a02..2ad0492fb --date=short --no-merges --format='%ad %ae %s'
2020-04-13 cepheus Discuss generator magic number reservations.
Created with:
roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers
Change-Id: I807bb9493fbe33cb3944fbc58eebb9975da01ec7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19520
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This CL cleans up some lint errors.
Change-Id: Ibfe9768cc4272d015a35a8d7edde0390b8fc66a5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19504
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This was found during some changes in Google3.
Also renames BitsPerWord to kBitsPerWord.
Bug:
Change-Id: I80cfe3a391963c2da376a7d8eadfc2797df01894
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19286
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
It also changes remaining deps for internal targets
from libdawn_proc to dawn_proc.
Bug: chromium:1064305
Change-Id: I36df2b5d7793be9d6c878b6a1f2ec238603a8205
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19289
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This change adds more resource binding related tests to clarify some
validation rules.
Bug: dawn:359
Change-Id: I16eca96c22c0d5f3f16dce5151bcabfd04d28349
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18940
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This CL adds support for having elseif statements after an if statement.
Bug: tint:5
Change-Id: I3cd3c5bddaa57c998b1a3fbee7bd87536533301d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19500
Reviewed-by: David Neto <dneto@google.com>
This CL adds the start of support for else statements.
Bug: tint:5
Change-Id: I742fd4582bfee4f31715b94b7aea6cf8383f4e22
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19412
Reviewed-by: David Neto <dneto@google.com>
This CL adds the code to generate simple if statements.
Bug: tint:5
Change-Id: Ied42ad8b3632d7926ac646d1aa21e190a7a2c07e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19411
Reviewed-by: David Neto <dneto@google.com>
This CL adds bitwise xor support to the spirv writer.
Bug: tint:5
Change-Id: I011283ef12840d25c882b95fc664f2b0dc6003da
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19410
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds output of the bitwise or command.
Bug: tint:5
Change-Id: Iad9bafaa0a8394494615922c14c2d33d2d5701bb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19409
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL updates the binary expression to handle the bitwise and command.
Bug: tint:5
Change-Id: I64d53d6aaa1de2fd9ec7959bf084f30736146d78
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19408
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds generation for the binary greater than or equal comparison.
Bug: tint:5
Change-Id: I5c81b7d142d29f388800d8b576ec69dc260b243e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19407
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds generation for the less than equal binary operator.
Bug: tint:5
Change-Id: Ic9d0eb107079c29b2ca1b0eb088e3b2eb7531e1e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19406
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds the binary greater then comparison output.
Bug: tint:5
Change-Id: I86fa90b3d98f3ee81174edafb188c445b94f9d29
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19405
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds support for the less than comparison operator.
Bug: tint:5
Change-Id: Ibfca48652ff0817bacd2badca183cb87f8c8ed31
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19404
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds support for the not equal comparison.
Bug: tint:5
Change-Id: Idb91a02b546e49d67d6dc8570c754e611643a1f2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19403
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds generation for a == operator.
Bug: tint:5
Change-Id: Ib27836a42153f3732927234cfa9aed342d0f9ac1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19402
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL changes the binary tests to be paramaterized to make it easier
to add more tests.
Bug: tint:5
Change-Id: Ib4edb3c368c0cba3252dd139841dd5f1be4bc34c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19401
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL removes the premerge statement and replaces it with a `premerge`
reserved word.
Change-Id: Ic9bc13878ed26e1733eb65dd1ba30d9bef095cb6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19380
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL removes the regardless statement and turns `regardless` into a
reserved word.
Change-Id: I50c521111b90dbadddaeb36674e8c40205186076
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19361
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
None visibility of shader stage bindings should be supported in
bind group. But Dawn can't support it. The patch fixed this issue.
Bug: dawn:385
Change-Id: I5b747abead24050b56b0fd0a9de561c87df4e36e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19340
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This is a more accurate name and conflicts less with the callback
request serials.
Bug: none
Change-Id: I0f9660c24468064dadffb3ab9b3392d403f93c41
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19260
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
It's possible though unlikely to overflow the generation for a given
ObjectId. If this happens, an object like a Buffer or Fence could begin
receiving callbacks for previously destructed objects. This CL makes it
so the client doesn't reuse ObjectIds once they've hit the max generation
number so overflow isn't possible.
Bug: dawn:381
Change-Id: I443c1c87d96614a95d1973e2bf18cd702c34b3f9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19240
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>