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>
This commit is contained in:
Jiawei Shao
2018-10-29 09:07:25 +00:00
committed by Commit Bot service account
parent c35103dc19
commit c72ab8ce84
6 changed files with 64 additions and 33 deletions

View File

@@ -163,10 +163,6 @@ protected:
uint32_t textureMipLevels,
uint32_t textureViewBaseLayer,
uint32_t textureViewBaseMipLevel) {
// TODO(jiawei.shao@intel.com): support creating texture view with a texture view descriptor
// on OpenGL.
DAWN_SKIP_TEST_IF(IsOpenGL());
ASSERT(textureViewBaseLayer < textureArrayLayers);
ASSERT(textureViewBaseMipLevel < textureMipLevels);
@@ -200,10 +196,6 @@ protected:
uint32_t textureMipLevels,
uint32_t textureViewBaseLayer,
uint32_t textureViewBaseMipLevel) {
// TODO(jiawei.shao@intel.com): support creating texture view with a texture view descriptor
// on OpenGL.
DAWN_SKIP_TEST_IF(IsOpenGL());
ASSERT(textureViewBaseLayer < textureArrayLayers);
ASSERT(textureViewBaseMipLevel < textureMipLevels);