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>
This commit is contained in:
Jiawei Shao
2018-10-26 06:29:38 +00:00
committed by Commit Bot service account
parent aa7109c148
commit e8d12b44b6
5 changed files with 74 additions and 29 deletions

View File

@@ -164,8 +164,8 @@ protected:
uint32_t textureViewBaseLayer,
uint32_t textureViewBaseMipLevel) {
// TODO(jiawei.shao@intel.com): support creating texture view with a texture view descriptor
// on D3D12, Metal and OpenGL.
DAWN_SKIP_TEST_IF(IsD3D12() || IsMetal() || IsOpenGL());
// on OpenGL.
DAWN_SKIP_TEST_IF(IsOpenGL());
ASSERT(textureViewBaseLayer < textureArrayLayers);
ASSERT(textureViewBaseMipLevel < textureMipLevels);
@@ -201,8 +201,8 @@ protected:
uint32_t textureViewBaseLayer,
uint32_t textureViewBaseMipLevel) {
// TODO(jiawei.shao@intel.com): support creating texture view with a texture view descriptor
// on D3D12, Metal and OpenGL.
DAWN_SKIP_TEST_IF(IsD3D12() || IsMetal() || IsOpenGL());
// on OpenGL.
DAWN_SKIP_TEST_IF(IsOpenGL());
ASSERT(textureViewBaseLayer < textureArrayLayers);
ASSERT(textureViewBaseMipLevel < textureMipLevels);