New issue
Advanced search Search tips
Starred by 2 users

Issue metadata

Status: Accepted
Owner:
Components:
OS: ----
Pri: 2
Type: Task



Sign in to add a comment
link

Issue 16: Add support for 2D Array / Cubemap

Reported by cwallez@chromium.org, Sep 11 Project Member

Issue description

The Aquarium demo needs Cubemaps to render correctly. In WebGPU cubemaps are 2D array textures viewed as cubemaps, so we should implement both 2D Array and cubemaps.
 

Comment 1 by bugdroid1@chromium.org, Sep 18

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/3d670506e39cb575842697409c52680a7978992e

commit 3d670506e39cb575842697409c52680a7978992e
Author: Jiawei Shao <jiawei.shao@intel.com>
Date: Tue Sep 18 00:31:57 2018

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>

[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/vulkan/DeviceVk.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/tests/end2end/DepthStencilStateTests.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/vulkan/DeviceVk.h
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/examples/CppHelloTriangle.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/metal/TextureMTL.mm
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/null/NullBackend.h
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/null/NullBackend.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/opengl/DeviceGL.h
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/Device.h
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/examples/SampleUtils.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/tests/end2end/BlendStateTests.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/vulkan/TextureVk.h
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/examples/CHelloTriangle.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/metal/DeviceMTL.mm
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/opengl/TextureGL.h
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/d3d12/DeviceD3D12.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/opengl/TextureGL.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/tests/unittests/validation/ValidationTest.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/Texture.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/vulkan/TextureVk.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/d3d12/TextureD3D12.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/tests/end2end/RenderPassLoadOpTests.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/Texture.h
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/examples/glTFViewer/glTFViewer.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/d3d12/DeviceD3D12.h
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/tests/end2end/SamplerTests.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/opengl/DeviceGL.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/utils/DawnHelpers.cpp
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/dawn.json
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/metal/TextureMTL.h
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/d3d12/TextureD3D12.h
[modify] https://crrev.com/3d670506e39cb575842697409c52680a7978992e/src/dawn_native/metal/DeviceMTL.h

Comment 2 by bugdroid1@chromium.org, Oct 9

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/c35be1a4dd88a2681e234aca23ed9813f2d0777e

commit c35be1a4dd88a2681e234aca23ed9813f2d0777e
Author: Jiawei Shao <jiawei.shao@intel.com>
Date: Tue Oct 09 00:31:58 2018

Support creating default texture view on 2D array textures

This patch intends to implement creating default texture view on
2D array textures.

BUG=dawn:16

Change-Id: I4321c9506b2e875146645ad60291196dcfcc8ea0
Reviewed-on: https://dawn-review.googlesource.com/c/1660
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>

[modify] https://crrev.com/c35be1a4dd88a2681e234aca23ed9813f2d0777e/BUILD.gn
[modify] https://crrev.com/c35be1a4dd88a2681e234aca23ed9813f2d0777e/src/dawn_native/vulkan/TextureVk.cpp
[add] https://crrev.com/c35be1a4dd88a2681e234aca23ed9813f2d0777e/src/tests/end2end/TextureViewTests.cpp
[modify] https://crrev.com/c35be1a4dd88a2681e234aca23ed9813f2d0777e/src/dawn_native/d3d12/TextureD3D12.cpp

Comment 3 by bugdroid1@chromium.org, Oct 12

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b

commit 6329e5ad475968ddcd1e7093b8c03ab4386c8d0b
Author: Jiawei Shao <jiawei.shao@intel.com>
Date: Fri Oct 12 08:32:58 2018

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>

[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/Error.h
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/opengl/DeviceGL.h
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/vulkan/DeviceVk.h
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/d3d12/DeviceD3D12.cpp
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/metal/DeviceMTL.mm
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/d3d12/DeviceD3D12.h
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/Texture.cpp
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/opengl/DeviceGL.cpp
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/vulkan/DeviceVk.cpp
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/Device.h
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/Texture.h
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/BUILD.gn
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/dawn.json
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/null/NullBackend.h
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/null/NullBackend.cpp
[add] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/tests/unittests/validation/TextureViewValidationTests.cpp
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/metal/DeviceMTL.h
[modify] https://crrev.com/6329e5ad475968ddcd1e7093b8c03ab4386c8d0b/src/dawn_native/Device.cpp

Comment 4 by bugdroid1@chromium.org, Oct 16

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 18

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/aef480bcfe9ba15b2bba167e4ce077957c8ffe37

commit aef480bcfe9ba15b2bba167e4ce077957c8ffe37
Author: Jiawei Shao <jiawei.shao@intel.com>
Date: Thu Oct 18 06:00:09 2018

Implement CreateDefaultTextureView by CreateTextureView

This patch removes CreateDefaultTextureView in all the back-ends of
class Device and implements this function by CreateTextureView using
a TextureViewDescriptor created from the original texture.

Note that this patch only refactors the original implementation of
creating default texture. The support of creating texture views from
a texture view descriptor will be added in the next several patches.

BUG=dawn:16

Change-Id: Iadfc1e17e1cf23a4c1fa8ff44b1fb1a765d21e3f
Reviewed-on: https://dawn-review.googlesource.com/c/1840
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>

[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/metal/DeviceMTL.mm
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/opengl/DeviceGL.h
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/opengl/TextureGL.h
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/vulkan/DeviceVk.h
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/d3d12/DeviceD3D12.cpp
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/vulkan/TextureVk.cpp
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/opengl/TextureGL.cpp
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/d3d12/DeviceD3D12.h
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/Texture.cpp
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/opengl/DeviceGL.cpp
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/vulkan/DeviceVk.cpp
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/d3d12/TextureD3D12.cpp
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/Device.h
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/Texture.h
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/null/NullBackend.cpp
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/metal/TextureMTL.mm
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/null/NullBackend.h
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/metal/TextureMTL.h
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/vulkan/TextureVk.h
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/d3d12/TextureD3D12.h
[modify] https://crrev.com/aef480bcfe9ba15b2bba167e4ce077957c8ffe37/src/dawn_native/metal/DeviceMTL.h

Comment 6 by bugdroid1@chromium.org, Oct 23

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/f9d217b0e90085f56982a166159e38ab4e0dc825

commit f9d217b0e90085f56982a166159e38ab4e0dc825
Author: Jiawei Shao <jiawei.shao@intel.com>
Date: Tue Oct 23 11:08:20 2018

Implement creating texture view with descriptor on Vulkan

This patch implements creating a texture view with given texture
view descriptor on Vulkan back-ends.

This patch also updates TextureViewTests to test various mipmap
levels and adds several tests to cover all added features.

BUG=dawn:16
TEST=dawn_end2end_tests

Change-Id: I602e5a076e4f717f555cb9a9ef98d5dfceadbe81
Reviewed-on: https://dawn-review.googlesource.com/c/1880
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>

[modify] https://crrev.com/f9d217b0e90085f56982a166159e38ab4e0dc825/src/dawn_native/vulkan/TextureVk.cpp
[modify] https://crrev.com/f9d217b0e90085f56982a166159e38ab4e0dc825/src/tests/end2end/TextureViewTests.cpp

Comment 7 by bugdroid1@chromium.org, Oct 26

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/e8d12b44b6a2a2bf0b0a27417b4dfd76f65e583f

commit e8d12b44b6a2a2bf0b0a27417b4dfd76f65e583f
Author: Jiawei Shao <jiawei.shao@intel.com>
Date: Fri Oct 26 06:29:38 2018

Create texture view with descriptor on D3D12 and Metal - Part I

This patch is the first part to implement creating a texture view
with a texture view descriptor on D3D12 and Metal back-ends. With
this patch the texture views created with descriptor can be bound
as sampledTextures on D3D12 and Metal back-ends.

Note that the support of rendering into a layer or a mipmap level of
a texture on D3D12 and Metal back-ends is not included in this patch.

BUG=dawn:16
TEST=dawn_end2end_tests

Change-Id: I62473ec5a4bb6b84d797ef7fd9cb98689ff763f4
Reviewed-on: https://dawn-review.googlesource.com/c/1940
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>

[modify] https://crrev.com/e8d12b44b6a2a2bf0b0a27417b4dfd76f65e583f/src/dawn_native/metal/TextureMTL.h
[modify] https://crrev.com/e8d12b44b6a2a2bf0b0a27417b4dfd76f65e583f/src/dawn_native/metal/TextureMTL.mm
[modify] https://crrev.com/e8d12b44b6a2a2bf0b0a27417b4dfd76f65e583f/src/tests/end2end/TextureViewTests.cpp
[modify] https://crrev.com/e8d12b44b6a2a2bf0b0a27417b4dfd76f65e583f/src/dawn_native/d3d12/TextureD3D12.cpp
[modify] https://crrev.com/e8d12b44b6a2a2bf0b0a27417b4dfd76f65e583f/src/dawn_native/metal/CommandBufferMTL.mm

Comment 8 by bugdroid1@chromium.org, Oct 29

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/c72ab8ce849d200b5d8685b10c3f339f381d2d79

commit c72ab8ce849d200b5d8685b10c3f339f381d2d79
Author: Jiawei Shao <jiawei.shao@intel.com>
Date: Mon Oct 29 09:07:25 2018

Support creating texture view with descriptor on OpenGL version >= 4.3

This patch implements creating texture view with texture view descriptor
with glTextureView, which is supported on OpenGL version >= 4.3. As is
required by glTextureView, we allocate storage for a texture by
glTexStorage*D instead of glTexImage*D.

BUG=dawn:16
TEST=dawn_end2end_tests

Change-Id: I29bcf6d538a70b4d6d1e5a21276b9e8d6e93ca51
Reviewed-on: https://dawn-review.googlesource.com/c/1980
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>

[modify] https://crrev.com/c72ab8ce849d200b5d8685b10c3f339f381d2d79/src/dawn_native/opengl/TextureGL.h
[modify] https://crrev.com/c72ab8ce849d200b5d8685b10c3f339f381d2d79/src/tests/end2end/TextureViewTests.cpp
[modify] https://crrev.com/c72ab8ce849d200b5d8685b10c3f339f381d2d79/src/dawn_native/opengl/PipelineGL.cpp
[modify] https://crrev.com/c72ab8ce849d200b5d8685b10c3f339f381d2d79/src/dawn_native/opengl/TextureGL.cpp
[modify] https://crrev.com/c72ab8ce849d200b5d8685b10c3f339f381d2d79/src/dawn_native/opengl/PipelineGL.h
[modify] https://crrev.com/c72ab8ce849d200b5d8685b10c3f339f381d2d79/src/dawn_native/opengl/CommandBufferGL.cpp

Comment 9 by bugdroid1@chromium.org, Oct 31

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/84cde517413409aac388567ce1cb1a563f57bc0a

commit 84cde517413409aac388567ce1cb1a563f57bc0a
Author: Jiawei Shao <jiawei.shao@intel.com>
Date: Wed Oct 31 10:51:11 2018

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>

[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/src/tests/unittests/validation/ValidationTest.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/src/tests/end2end/RenderPassLoadOpTests.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/examples/glTFViewer/glTFViewer.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/src/tests/unittests/validation/CopyCommandsValidationTests.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/src/tests/end2end/TextureViewTests.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/src/tests/end2end/BlendStateTests.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/src/tests/end2end/DepthStencilStateTests.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/src/dawn_native/Texture.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/src/tests/end2end/SamplerTests.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/src/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/src/tests/end2end/CopyTests.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/examples/SampleUtils.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/examples/CppHelloTriangle.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/dawn.json
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/src/utils/DawnHelpers.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/src/tests/unittests/validation/TextureViewValidationTests.cpp
[modify] https://crrev.com/84cde517413409aac388567ce1cb1a563f57bc0a/src/dawn_native/SwapChain.cpp

Comment 10 by bugdroid1@chromium.org, Nov 7

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/db3b89367574b9f974023dc378048750fbc879d8

commit db3b89367574b9f974023dc378048750fbc879d8
Author: Jiawei Shao <jiawei.shao@intel.com>
Date: Wed Nov 07 09:52:33 2018

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>

[modify] https://crrev.com/db3b89367574b9f974023dc378048750fbc879d8/src/dawn_native/Texture.cpp
[modify] https://crrev.com/db3b89367574b9f974023dc378048750fbc879d8/dawn.json
[modify] https://crrev.com/db3b89367574b9f974023dc378048750fbc879d8/src/tests/unittests/validation/TextureViewValidationTests.cpp

Comment 11 by bugdroid1@chromium.org, Nov 16

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 21

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/ad3d9bafbc24a3f336ef4d3040d795d4dd612e15

commit ad3d9bafbc24a3f336ef4d3040d795d4dd612e15
Author: Jiawei Shao <jiawei.shao@intel.com>
Date: Wed Nov 21 01:00:20 2018

Fix missing validations and Vulkan flags on cube map texture views

This patch adds checks that we can only create cube map and cube
map array texture views on textures with width == height as is
required in Vulkan.

This patch enables the imageCubeArray feature on Vulkan back-ends
to ensure we can create cube map array image views on all Vulkan
back-ends.

This patch also adds a missing VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT
flag when creating Vulkan images with arrayLayer >= 6. Without this
flag we cannot create cube map or cube map array views.

This patch fixes all the cube map end2end tests on Linux using
Vulkan back-ends.

BUG=dawn:16
TEST=dawn_end2end_tests

Change-Id: Id9386b9ee509d18a5ba8ae1ca085134486b242d7
Reviewed-on: https://dawn-review.googlesource.com/c/2522
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>

[modify] https://crrev.com/ad3d9bafbc24a3f336ef4d3040d795d4dd612e15/src/dawn_native/Texture.cpp
[modify] https://crrev.com/ad3d9bafbc24a3f336ef4d3040d795d4dd612e15/src/dawn_native/vulkan/TextureVk.cpp
[modify] https://crrev.com/ad3d9bafbc24a3f336ef4d3040d795d4dd612e15/src/tests/unittests/validation/TextureViewValidationTests.cpp
[modify] https://crrev.com/ad3d9bafbc24a3f336ef4d3040d795d4dd612e15/src/dawn_native/vulkan/DeviceVk.cpp

Comment 13 by bugdroid1@chromium.org, Nov 28

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/cf714a81c86e56827563e20c1b2750e674aec322

commit cf714a81c86e56827563e20c1b2750e674aec322
Author: Jiawei Shao <jiawei.shao@intel.com>
Date: Wed Nov 28 02:44:17 2018

Add checks on the texture view used as color or depth stencil attachment

This patch adds checks when we set a texture view as color or depth
stencil attachments:
1. The mipmap level of the texture view must be 1 as it is limited in
   D3D12, Metal and Vulkan.
2. The array layer count of the texture view must be 1 as currently we
   do not plan to support layered rendering in WebGPU.
3. The format of the texture view must be color renderable when it is
   used as a color attachment.
4. The format of the texture view must be a depth stencil format when it
   is used as a depth stencil attachment.

BUG=dawn:16
TEST=dawn_unittests

Change-Id: Ibce3bda20d49a725c26796aa627c5067532761ad
Reviewed-on: https://dawn-review.googlesource.com/c/2661
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>

[modify] https://crrev.com/cf714a81c86e56827563e20c1b2750e674aec322/src/dawn_native/Texture.h
[modify] https://crrev.com/cf714a81c86e56827563e20c1b2750e674aec322/src/dawn_native/Texture.cpp
[modify] https://crrev.com/cf714a81c86e56827563e20c1b2750e674aec322/src/dawn_native/RenderPassDescriptor.cpp
[modify] https://crrev.com/cf714a81c86e56827563e20c1b2750e674aec322/src/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp
[modify] https://crrev.com/cf714a81c86e56827563e20c1b2750e674aec322/src/dawn_native/RenderPassDescriptor.h

Comment 14 by bugdroid1@chromium.org, Dec 5

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/33af94fd8d592438a73c9cbeb5687737345418cd

commit 33af94fd8d592438a73c9cbeb5687737345418cd
Author: Jiawei Shao <jiawei.shao@intel.com>
Date: Wed Dec 05 03:22:04 2018

Implement using a layer of a texture as color attachment - Part I

This patch implements using a layer of a texture as a color
attachment on D3D12, Metal and Vulkan.

This feature is not implemented on OpenGL back-ends in this patch.

BUG=dawn:16
TEST=dawn_unittests

Change-Id: Iffc194c6117f6e3e6506c6fcbfd51ca2fbe9ede8
Reviewed-on: https://dawn-review.googlesource.com/c/2660
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>

[modify] https://crrev.com/33af94fd8d592438a73c9cbeb5687737345418cd/src/tests/end2end/RenderPassLoadOpTests.cpp
[modify] https://crrev.com/33af94fd8d592438a73c9cbeb5687737345418cd/src/tests/end2end/TextureViewTests.cpp
[modify] https://crrev.com/33af94fd8d592438a73c9cbeb5687737345418cd/src/dawn_native/Texture.cpp
[modify] https://crrev.com/33af94fd8d592438a73c9cbeb5687737345418cd/src/dawn_native/RenderPassDescriptor.cpp
[modify] https://crrev.com/33af94fd8d592438a73c9cbeb5687737345418cd/src/dawn_native/d3d12/TextureD3D12.cpp
[modify] https://crrev.com/33af94fd8d592438a73c9cbeb5687737345418cd/src/tests/end2end/CopyTests.cpp
[modify] https://crrev.com/33af94fd8d592438a73c9cbeb5687737345418cd/src/dawn_native/Texture.h
[modify] https://crrev.com/33af94fd8d592438a73c9cbeb5687737345418cd/src/dawn_native/metal/CommandBufferMTL.mm
[modify] https://crrev.com/33af94fd8d592438a73c9cbeb5687737345418cd/src/tests/DawnTest.cpp
[modify] https://crrev.com/33af94fd8d592438a73c9cbeb5687737345418cd/src/dawn_native/d3d12/TextureD3D12.h
[modify] https://crrev.com/33af94fd8d592438a73c9cbeb5687737345418cd/src/tests/DawnTest.h

Comment 15 by bugdroid1@chromium.org, Jan 3

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/d238bb67a52a6b940dd8299675c368230d2c7064

commit d238bb67a52a6b940dd8299675c368230d2c7064
Author: Jiawei Shao <jiawei.shao@intel.com>
Date: Thu Jan 03 00:07:44 2019

Support using a layer of a texture as a color attachment on OpenGL

This patch implements using a layer of a texture as a color attachment
on OpenGL by using glFramebufferTextureLayer. As WebGPU won't support
rendering into a texture view whose format is different from the
original texture, it is correct to use glFramebufferTexture on the
OpenGL backends.

BUG=dawn:16

Change-Id: Iab6d905ee119bb9bb2d1bb212134cf757483c4d4
Reviewed-on: https://dawn-review.googlesource.com/c/3560
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>

[modify] https://crrev.com/d238bb67a52a6b940dd8299675c368230d2c7064/src/tests/end2end/TextureViewTests.cpp
[modify] https://crrev.com/d238bb67a52a6b940dd8299675c368230d2c7064/src/dawn_native/opengl/CommandBufferGL.cpp

Sign in to add a comment