Refactor subresource related variables to a struct

This patch put subresource related variables like baseMipLevel,
levelCount, baseArrayLayer, layerCount into a single struct at
front-end. We have a lot more at backend too, a following patch
will do that.

Bug: dawn:157

Change-Id: Iab5633a4246b6ae89b80c39f5672dbb31d7a3e78
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22704
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This commit is contained in:
Yunchao He
2020-06-12 00:37:31 +00:00
committed by Commit Bot service account
parent c7778a27cb
commit 5fafb49c7b
16 changed files with 275 additions and 305 deletions

View File

@@ -178,8 +178,8 @@ namespace dawn_native {
uint32_t layerCount) {
dawn_native::TextureBase* textureBase =
reinterpret_cast<dawn_native::TextureBase*>(texture);
return textureBase->IsSubresourceContentInitialized(baseMipLevel, levelCount,
baseArrayLayer, layerCount);
SubresourceRange range = {baseMipLevel, levelCount, baseArrayLayer, layerCount};
return textureBase->IsSubresourceContentInitialized(range);
}
std::vector<const char*> GetProcMapNamesForTestingInternal();