Commit Graph

416 Commits

Author SHA1 Message Date
Jiawei Shao db3b893675 Add entry points for creating a cube map/cube map array texture view
This patch adds the entry points for creating cube map and cube map
array texture views. This patch also adds validations that the array
layer in the texture view descriptor must be 6 when the texture view
dimension is cube map, and a multiple of 6 when the texture view
dimension is cube map array.

BUG=dawn:16
TEST=dawn_unittests

Change-Id: I86a66c3753a7678351f65b43f6cd54b96d1b762c
Reviewed-on: https://dawn-review.googlesource.com/c/2200
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2018-11-07 09:52:33 +00:00
Jiawei Shao 84cde51741 Rename mipLevel to levelCount in TextureDescriptor
This patch renames the field "mipLevel" of TextureDescriptor to
"levelCount" to align with the WebGPU idl.

BUG=dawn:16

Change-Id: I36b30d78831786e4c21ffd641f820375e95a1be5
Reviewed-on: https://dawn-review.googlesource.com/c/2100
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2018-10-31 10:51:11 +00:00
Yunchao He c35103dc19 Use blend descriptor to replace a blend struct.
Bug=dawn:32

Change-Id: I74db6c1e9cf57a168967131ea2c9e1d802853ab4
Reviewed-on: https://dawn-review.googlesource.com/c/2020
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2018-10-29 09:06:55 +00:00
Yunchao He 56e5974c2c make the names in dawn.json consistent.
Most of names in dawn.json are in lower case, and we leave a blank space
between words. This tiny patch revises a few names, in order to conform
to the rule.

BUG=

Change-Id: I8f3f706bd48ce04fcca207a28f1b8725d7e0a7bc
Reviewed-on: https://dawn-review.googlesource.com/c/2000
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2018-10-26 06:35:48 +00:00
Jiawei Shao 6329e5ad47 Add entry point of creating texture view by TextureViewDescriptor
This patch adds the entry point creating texture view with a
TextureViewDescriptor and all the validations on the parameters
according to https://github.com/gpuweb/gpuweb/issues/79.

BUG=dawn:16
TEST=dawn_unittests

Change-Id: Ibc04a0f7b9f334c57da191606313ab156e18af1f
Reviewed-on: https://dawn-review.googlesource.com/c/1800
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2018-10-12 08:32:58 +00:00
Corentin Wallez 82fbccbd78 Introduce [Render|Compute]PassEncoder.
This splits off part of CommandBufferBuilder in separate
RenderPassEncoder and ComputePassEncoder objects. To match the WebGPU
IDL and factor some code, both these encoders inherit from
ProgrammablePassEncoder.

These encoders are pure frontend objects and record into the
CommandBufferBuilder command allocator objects, so no changes to the
backends were needed.

Error handling is still ew, because the "builder" mechanism we had
doesn't allow for "split builders". Nicer error handling will have to
wait on Dawn matching WebGPU.

All the tests and samples were updated to the new structure.

BUG=dawn:5

Change-Id: I5f5d4ad866e2c07fedd1ba7a122258c6610941f1
Reviewed-on: https://dawn-review.googlesource.com/1543
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2018-09-21 00:24:37 +00:00
Corentin Wallez 29353d6ee3 dawn.json: Make textureDescriptor use Extent3D
This matches WebGPU and is a good test of having structures include
other structures by value.

BUG=dawn:13

Change-Id: Ibd5ea1340338e5aa16069499c498ac5a455fc2cd
Reviewed-on: https://dawn-review.googlesource.com/1500
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2018-09-18 12:49:22 +00:00
Jiawei Shao 3d670506e3 Remove TextureViewBuilder and add CreateDefaultTextureView entry point
This patch is the first one to descriptorze texture view. In this
patch, we completely remove TextureViewBuilder and add the entry
point CreateDefaultTextureView for creating a texture view on a
non-array 2D texture using the same type and format.

Texture view descriptors and 2D array texture views will be supported
in the next patch.

BUG=dawn:1, dawn:16

Change-Id: Ibd2a0bcf02cbb567a98d2faaaaa897eff2c062e5
Reviewed-on: https://dawn-review.googlesource.com/1440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2018-09-18 00:31:57 +00:00
Corentin Wallez a60799f5e1 dawn.json: Fix ordering of types.
BUG=

Change-Id: Ie9257c58f523c3b760a4acb6e0d34111164ff135
Reviewed-on: https://dawn-review.googlesource.com/1420
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2018-09-11 18:16:54 +00:00
Corentin Wallez 8e335a5585 Descriptorize ComputePipeline
Change-Id: Ic9d7014ba44d927d7f9ddf81a8870432c68941e8
2018-09-05 08:32:53 -04:00
Jiawei Shao 4b74dbef7b Implement copying between a buffer and a texture 2D array on Vulkan (#257)
Implement copying between a buffer and a texture 2D array on Vulkan

This patch implements the creation of a 2D array texture and data
copying between a buffer and a layer of a 2D array texture on
Vulkan back-ends.

TEST=dawn_end2end_tests
2018-08-30 04:27:38 -04:00
Jiawei Shao 425428f97b Descriptorize Texture
This patch introduces texture descriptor for texture creation instead
of texture builders.

This patch also adds "arrayLayer" to texture descriptor and removes
mDevice in TextureD3D12.
2018-08-28 03:00:48 -04:00
Corentin Wallez 82b6573d54 Descriptorize Buffer
We still keep a dummy BufferBuilder object around so that it can be used
for the builder error callback tests of the wire.

Change-Id: If0c502bb8b62ee3ed61815e34e9b6ee6c03a65ef
2018-08-23 08:23:06 -04:00
Corentin Wallez f35eff3fde Remove BindGroupBuilder::SetUsage
BindGroup usage isn't something that's part of WebGPU's sketch.idl and
it might never exist. Remove it to simplify the migration of bindgroup
to descriptor.

Change-Id: I21e0a98eb60434d4009e748cd9afcbf89edd7e6a
2018-08-21 02:27:12 -04:00
Corentin Wallez df6710358b Descriptorize ShaderModule
Change-Id: Ic79d00380f583485de0fb05bd47b1f869919ebe6
2018-08-21 02:26:24 -04:00
Corentin Wallez a22335c2b7 Rename next.json to dawn.json 2018-07-18 22:54:06 +02:00