This CL adds tests for break, continue and return without attached
expressions.
Bug: tint:5
Change-Id: I8c4221e787af95f5597db3ea4e42b38962223bf4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18980
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds type determination for the unary op expression.
Bug: tint:5
Change-Id: I5b9c0c80bb48527f1f26febb2310f9640e5f7849
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18850
Reviewed-by: David Neto <dneto@google.com>
This CL adds the type determination for the unary method expression.
Bug: tint:5
Change-Id: I9f94a79b9715cf74e37c74eb1a612ca84b3c241f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18849
Reviewed-by: David Neto <dneto@google.com>
This Cl adds the type determination for unary derivative expressions.
Bug: tint:5
Change-Id: I44ad22733ce6b94e4b6d77b432024bacc110e8af
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18848
Reviewed-by: David Neto <dneto@google.com>
This CL adds the type determination for each of the relation types in
the relational expression.
Bug: tint:5
Change-Id: I15e8dae2f90cc4a0f720692f5addb944b26811ec
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18847
Reviewed-by: David Neto <dneto@google.com>
This Cl adds the member accessor type determination for both structures
and vector swizzles.
Bug: tint:5
Change-Id: I1172db29d8cbed2d9e0ae228ebc3a818d4930b7f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18846
Reviewed-by: David Neto <dneto@google.com>
This CL adds the type determination for cast expressions.
Bug: tint:5
Change-Id: I35ae28e3b70c554cd48c6abcd78d95c2ba7211fa
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18845
Reviewed-by: David Neto <dneto@google.com>
This CL adds the type determination for call expressions.
Bug: tint:5
Change-Id: Ibe08f90ec3905dd1e2169f6e69d1d74943720819
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18844
Reviewed-by: David Neto <dneto@google.com>
What was previously the Device's loss status is now a state that also
contains the "being created" state. Its transitions are entirely
handled in the frontend which enforces somewhat uniform lifecycles
between backends.
The backend devices' ShutDownImpl() function is now guaranteed to be
called only during the destructor, which leads to further simplification.
Previously Destroy() could also be called when the device was first
lost. This require complications because, for example, a WGPUBuffer
could still exist, and would want to call some resource allocator
service after the call to Destroy(). Now destruction of the device's
backing API objects is deferred to the destructor. (that's ok as long
as the application can't submit any more work).
WaitForCompletion is now guaranteed to be called before ShutDownImpl() iff
the call to DeviceBase::Initialize was succesful and the backing device
not lost. The idea is that after DeviceBase::Initialize, the GPU can
have some work enqueued and we need to wait for it to complete before
deleting backing API objects. In the future we might also have backend
be reentrant, using WebGPU itself to implement parts of the backend.
Reentrant calls would only be allowed after DeviceBase::Initialize.
Also the DynamicUploader that was special-cased in all backends is
now handled entirely by the frontend.
Bug: dawn:373
Change-Id: I985417d67727ea3bc11849c999c5ef0e02403223
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18801
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
To do perfect forwarding of GN targets, the proper method is to make a
group with public_deps. For example in the following:
- Config C
- Target T with a public_deps including C
- Group G that proxies B
- Target T2 that depends on G
If G uses deps = [ T ] then T2 won't see C, whereas if G uses
public_deps = [ T ] then T2 will dep on T, which will make it dep on C.
Bug: chromium:1064305
Change-Id: Iae236150c119b1a4003b957dcacf42e7759a936c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18965
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This CL adds the as expression type determination.
Bug: tint:5
Change-Id: I84a06df67844c75112c745f65a2c8102f8677f62
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18843
Reviewed-by: David Neto <dneto@google.com>
This Cl adds type determination for an array accessor for arrays,
vectors and matrices.
Bug: tint:5
Change-Id: Ifce539338fd1f9b539c13970f115a4dbc207ff5a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18842
Reviewed-by: David Neto <dneto@google.com>
This CL adds the type determination for identifier expressions.
Namespaced identifiers are not determined yet.
Bug: tint:5
Change-Id: Id8f39ad122cef0349393de4d429a6d971b2a7ce8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18841
Reviewed-by: David Neto <dneto@google.com>
This CL adds type determination for Unless statements.
Bug: tint:5
Change-Id: I0e8721d3c282ca8dcf9e7954f309c14e437b5272
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18839
Reviewed-by: David Neto <dneto@google.com>
This CL adds the type determination code for the switch statements.
Bug: tint:5
Change-Id: I96efd96016c03137ef471e3f220e21e7f53d11ba
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18838
Reviewed-by: David Neto <dneto@google.com>
This CL adds the type determination code for the return statements.
Bug: tint:5
Change-Id: I0300fe0c66e7b8c25d1dc0ed22aef8cc469567be
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18837
Reviewed-by: David Neto <dneto@google.com>
This CL adds the type determination code for the Regardless statement.
Bug: tint:5
Change-Id: I8485800f3e19130101917d8175e8111aa196828c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18836
Reviewed-by: David Neto <dneto@google.com>
This CL adds the type determination for loop statements.
Bug: tint:5
Change-Id: If49cacb732e8911085657bac8b568e97ee801c82
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18835
Reviewed-by: David Neto <dneto@google.com>
This CL adds the type determination code for if statements.
Bug: tint:5
Change-Id: Idfe4d62be56ffb7e8a8de197e8710ff119dd4368
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18834
Reviewed-by: David Neto <dneto@google.com>
These statements have no expressions to determine so they just return
true.
Bug: tint:5
Change-Id: I639bce9c254c12357ac3a1d2a9cfaaee437716c0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18833
Reviewed-by: David Neto <dneto@google.com>
This CL adds type determination for else statements.
Bug: tint:5
Change-Id: Ie859edbc08c191da0a04407c5f56b413a48f1791
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18832
Reviewed-by: David Neto <dneto@google.com>
This CL adds type determination for the continue statement.
Bug: tint:5
Change-Id: Ie63994146978d8783f131299b576fc46a10878ad
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18831
Reviewed-by: David Neto <dneto@google.com>
This CL adds type determination for case statements.
Bug: tint:5
Change-Id: I353232bd68a524a09de60fa73256b51d2be51c57
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18830
Reviewed-by: David Neto <dneto@google.com>
This CL adds type determination for break statements.
Bug: tint:5
Change-Id: I5ca74a848ffd12fe404676910b08ea7518451eaf
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18829
Reviewed-by: David Neto <dneto@google.com>
This CL adds type determination for the assignment statements.
Bug: tint:5
Change-Id: Ica0e59a459bfedc0c649d279f93a31b188c27736
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18828
Reviewed-by: David Neto <dneto@google.com>
This CL adds type determination for the ScalarConstructorExpression and
TypeConstructorExpression.
Bug: tint:5
Change-Id: I46299140785eb420c3801de470d6423c25e9c700
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18827
Reviewed-by: David Neto <dneto@google.com>
This helps take advantage of the GN feature where when a directory is
used as a target name, like //foo/bar/baz, the //foo/bar/baz:baz target
is used automatically.
Bug: chromium:1064305
Change-Id: I2e2d9f308fda1b811482026962ab0770ac45e988
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18862
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This will help external projects that want to use Dawn, like Skia, refer
to GN targets without GN discovering Dawn's main BUILD.gn file that
causes all the tests and third_party dependencies to be discovered.
This CL just splits off chunks of BUILD.gn into separate file, adds
necessary includes and fixes up GN paths. It also introduces temporary
groups for targets that are used in Chromium so that the paths can be
fixed in a 3-way patch.
Bug: chromium:1064305
Change-Id: Ib4b73bd8d3121ef67d4ecee2e54ec158875f2117
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18861
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This is to match the WebGPU API change.
The only manual changes are in dawn.json and templates. The rest was
created with the following commands:
git grep -l BindGroupLayoutBinding | xargs sed -i "" -e "s/BindGroupLayoutBinding/BindGroupLayoutEntry/g"
git grep -l BindGroupBinding | xargs sed -i "" -e "s/BindGroupBinding/BindGroupEntry/g"
git cl format
Bug: dawn:22
Change-Id: I1377eef9ea9816578441c91d167909dedc7f8e96
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18863
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The changes in this CL are copied from Chromium.
Bug: dawn:355
Change-Id: I3772b5849b096dd11541b94331309293f1a64fb5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18903
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This reverts commit c7f454c241
and relands commit 2479860e4b.
> D3D12: Stage BindGroups on CPU descriptor heaps.
>
> Instead of directly populating GPU heaps, pre-encoded
> BindGroups are staged on CPU heaps then copied over
> to the GPU. Non-shader visible allocators are stored
> on the BGL, which hands out fixed-size chunks to
> simplify memory managment. To enable memory re-use,
> CPU allocations are tied to the lifetime of BindGroup
> objects.
Reason for revert: We can reland this CL now that the CTS suppression merged.
Note: Adds validation to ensure binding size > 0.
Bug: dawn:155
Bug: dawn:375
Change-Id: I75b9773bbb7c70bcea803a7ad8b6480d21ea90f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18904
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This adds enough infrastructure to type determiner to start building
out the statement and expression determination.
Bug: tint:5
Change-Id: I5e095cf652b5e3358e6fbabd66dd703348950857
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18826
Reviewed-by: David Neto <dneto@google.com>
This CL adds helper methods to the RelationalExpression to determine the
type of relation.
Bug: tint:5
Change-Id: I232c3a2e9f27a7efb91735516ee7e9cfc97882ae
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18825
Reviewed-by: David Neto <dneto@google.com>
This CL adds various using statements for the
std::vector<std::unique_ptr<CLASS>> constructs found in the AST.
Change-Id: Ic9a2357cd73b2aafd99e961a38727f2f9874cde5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18920
Reviewed-by: David Neto <dneto@google.com>
This CL adds a result_type into the expression to hold the computed
result type for the expression.
Bug: tint:5
Change-Id: I5f2ee35e520f918828cf8cf7bc6fdf6a1b5ebd5f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18824
Reviewed-by: David Neto <dneto@google.com>
This CL adds the Context object, variable ScopeStack and a Function map
into the type determiner.
The sample app is also updated to verify the module produced before
passing to the type determiner.
Bug: tint:5
Change-Id: Ib4af4e4305ee8a306f48e1bd328eaf3ad006fd9a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18823
Reviewed-by: David Neto <dneto@google.com>
The CONTRIBUTING was written before the decision to use the
dawn-reviews. This CL updates to the correct information.
Bug: tint:36
Change-Id: I7e15572a3ed4bc4bbaaba8972e84eeda111d953f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18921
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
RefCounted (and derived) destructors should be protected on the class
to ensure the objects can ONLY be destructed by calling Release. This
avoids errors cause by destroying objects out from under code which
has an active reference count.
Unfortunately, many of the 'base' classes must continue having public
destructors because they are used as "blueprint" objects created on
the stack.
Added final on most-derived classes.
Ideas for future improvement:
- Change "base" objects to have protected destructors but create new
blueprint objects that privately derive from base objects. This
limits the blueprint object's usefulness to only be a blueprint.
- Modify createX methods to return Ref<Object> instead of Object*
Change-Id: I6f3b3b178118d135c4342cb912e982a3873d71af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18780
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
VS2017 took issue with treating size_t and uint32_t the same. It also
couldn't find various alphanumeric is* functions without the <cctype>
header. Gcc complainted about a variable potentially used uninitialized.
Change-Id: I452b68c6597bae254f32e5a350656e65c8934b6e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18901
Reviewed-by: dan sinclair <dsinclair@google.com>
The depot_tools install was mentioned in the building section but was
missing from requirements. This CL fixes that oversight.
Bug: tint:35
Change-Id: I6900ba8916d26dc03bd001bde96561a468a2fb75
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18900
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
The shader with uninitialized variables will fail to compile on D3D12
backend. SPIRV-Cross has added an option for supporting forcefully
zero-initialized variables in latest version.
Bug: dawn:347
Change-Id: Id02fa486317c583ee11cfe3bc382816dc34121fb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18680
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Roll third_party/SPIRV-Tools/ fd773eb50..e95fbfb1f (9 commits)
fd773eb50d..e95fbfb1f5
$ git log fd773eb50..e95fbfb1f --date=short --no-merges --format='%ad %ae %s'
2020-04-02 afdx spirv-fuzz: Transformation to add OpConstantNull (#3273)
2020-04-02 afdx spirv-fuzz: Handle isomorphic types property in composite construction (#3262)
2020-04-02 afdx spirv-fuzz: Limit adding of new variables to 'basic' types (#3257)
2020-04-02 afdx spirv-fuzz: Only replace regular ids with synonyms (#3255)
2020-04-02 afdx spirv-fuzz: Introduce TransformationContext (#3272)
2020-04-02 afdx spirv-fuzz: Add validator options (#3254)
2020-04-02 alanbaker Update dominates to check for null nodes (#3271)
2020-04-01 alanbaker Set wrapped kill basic block's parent (#3269)
2020-03-31 caio.oliveira Validate Buffer and BufferBlock apply only to struct types (#3259)
Roll third_party/glslang/ 08c02ced7..b5757b950 (5 commits)
08c02ced79..b5757b9500
$ git log 08c02ced7..b5757b950 --date=short --no-merges --format='%ad %ae %s'
2020-04-03 rharrison Remove extra semicolons (#2170)
2020-04-02 mbechard Shader interface matching rework to fix#2136 (#2156)
2020-04-01 cepheus Build warning: Fix#2167: Remove nested reuse of 'unreachable'.
2020-03-31 cepheus Bump revision.
2020-03-30 alele Error assigns to objects of rayQueryEXT type.
Roll third_party/spirv-cross/ 9b3c5e12b..6637610b1 (7 commits)
9b3c5e12be..6637610b16
$ git log 9b3c5e12b..6637610b1 --date=short --no-merges --format='%ad %ae %s'
2020-04-03 post Expose a query if samplers or images are comparison resources.
2020-04-03 post Do not add NonWritable/NonReadable decorations for regular images.
2020-04-03 post MSL: Deal with cases where builtin is implicitly needed, declared, but unused.
2020-04-03 post HLSL: Add support for treating NonWritable UAV texture as SRV instead.
2020-04-03 troughton MSL: mark BuiltInFragCoord as implicitly used for subpass reads
2020-03-31 post MSL: Fix access chain for deep struct hierarchy on array of buffers.
2020-03-30 dsinclair Roll GLSLang, SPIRV-Tools and SPIRV-Headers
Created with:
roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers
Change-Id: Ia60a082e6d8b7bc954fedeb444cb5c91bf252f17
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18880
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This reverts commit 2479860e4b.
Reason for revert: Causes WebGPU CTS failures
Original change's description:
> D3D12: Stage BindGroups on CPU descriptor heaps.
>
> Instead of directly populating GPU heaps, pre-encoded
> BindGroups are staged on CPU heaps then copied over
> to the GPU. Non-shader visible allocators are stored
> on the BGL, which hands out fixed-size chunks to
> simplify memory managment. To enable memory re-use,
> CPU allocations are tied to the lifetime of BindGroup
> objects.
>
> BUG=dawn:155
>
> Change-Id: I402e6686c96f7450a077c627c8499600979e426c
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18100
> Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
TBR=cwallez@chromium.org,enga@chromium.org,rafael.cintron@microsoft.com,bryan.bernhart@intel.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:155
Change-Id: I3dfae3e15e2bc21de692513725c9cf3ca38110b5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18860
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
f085b9745f..f175adffa9
$ git log f085b9745..f175adffa --date=short --no-merges --format='%ad %ae %s'
2020-04-02 rharrison Add flag to control if we build with -Werror (#1032)
2020-03-31 rharrison Add knob to control force_zero_initialized_variables (#1028)
2020-03-31 dgkoch update glslang to SDK-Candidate-2 tag (#1027)
2020-03-30 rharrison Rolling 5 dependencies and updated exceptions (#1026)
Created with:
roll-dep third_party/shaderc
Bug: dawn:347
Change-Id: Iacd580226c983ad8db71a3b6624ee89ae5c66931
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18781
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>