Implement 3D texture sampling with e2e tests

This change implements 3D texture sampling with an en2end test.
It turns out that the implementation has already been done. The
test can pass with minor changes.

Bug: dawn:547

Change-Id: I5dfe1a446de3287392e39cb4dd58143e115b02cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This commit is contained in:
Yunchao He
2021-06-29 04:56:01 +00:00
committed by Dawn LUCI CQ
parent 98ab91b474
commit 405bec157e
4 changed files with 129 additions and 4 deletions

View File

@@ -793,8 +793,8 @@ namespace dawn_native { namespace d3d12 {
const ExecutionSerial pendingCommandSerial =
ToBackend(GetDevice())->GetPendingCommandSerial();
// This transitions assume it is a 2D texture
ASSERT(GetDimension() == wgpu::TextureDimension::e2D);
// TODO(crbug.com/dawn/814): support 1D textures.
ASSERT(GetDimension() != wgpu::TextureDimension::e1D);
mSubresourceStateAndDecay.Merge(textureUsages, [&](const SubresourceRange& mergeRange,
StateAndDecay* state,

View File

@@ -904,8 +904,8 @@ namespace dawn_native { namespace vulkan {
wgpu::TextureUsage allUsages = wgpu::TextureUsage::None;
wgpu::TextureUsage allLastUsages = wgpu::TextureUsage::None;
// This transitions assume it is a 2D texture
ASSERT(GetDimension() == wgpu::TextureDimension::e2D);
// TODO(crbug.com/dawn/814): support 1D textures.
ASSERT(GetDimension() != wgpu::TextureDimension::e1D);
mSubresourceLastUsages.Merge(
subresourceUsages, [&](const SubresourceRange& range, wgpu::TextureUsage* lastUsage,