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>
This commit is contained in:
Jiawei Shao
2018-10-12 08:32:58 +00:00
committed by Commit Bot service account
parent c35be1a4dd
commit 6329e5ad47
18 changed files with 367 additions and 6 deletions

View File

@@ -109,6 +109,12 @@ namespace dawn_native { namespace opengl {
TextureViewBase* Device::CreateDefaultTextureView(TextureBase* texture) {
return new TextureView(texture);
}
// TODO(jiawei.shao@intel.com): implement creating texture view with TextureViewDescriptor
ResultOrError<TextureViewBase*> Device::CreateTextureViewImpl(
TextureBase* texture,
const TextureViewDescriptor* descriptor) {
return DAWN_UNIMPLEMENTED_ERROR("Creating texture view with descriptor is unimplemented.");
}
void Device::TickImpl() {
}

View File

@@ -62,6 +62,9 @@ namespace dawn_native { namespace opengl {
ResultOrError<ShaderModuleBase*> CreateShaderModuleImpl(
const ShaderModuleDescriptor* descriptor) override;
ResultOrError<TextureBase*> CreateTextureImpl(const TextureDescriptor* descriptor) override;
ResultOrError<TextureViewBase*> CreateTextureViewImpl(
TextureBase* texture,
const TextureViewDescriptor* descriptor) override;
void CollectPCIInfo();
dawn_native::PCIInfo mPCIInfo;