mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +00:00
Implement texture subresource on D3D12
When we use a texture for different purpose, we need to add proper barrier(s) in order to make it ready. Previously, the barrier is done per entire texture. So it is invalid to sample/read/copy from one subresource (say a mip/array slice) and render/write/copy to another subresource of the same texture at the same time. With this patch, barrier is set per each texture subresource. So it is valid to use a subresource as source and use another subresource of the same texture as destination at the same time. However, planar slices like depth/stencil planes are not handled gracefully. This is a TODO task. Another task is to combine barriers into one if they can be combined. I will do this optimization in another patch in near future. Bug: dawn:157 Change-Id: I783a76cb88fcdffb60c307ddfb89d50f1583201a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22101 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Yunchao He <yunchao.he@intel.com>
This commit is contained in:
committed by
Commit Bot service account
parent
c8000bb02b
commit
182af0a4c2
@@ -196,4 +196,8 @@ TEST_P(TextureSubresourceTest, ArrayLayersTest) {
|
||||
//
|
||||
// * add tests for clear operation upon texture subresource if needed
|
||||
|
||||
DAWN_INSTANTIATE_TEST(TextureSubresourceTest, MetalBackend(), OpenGLBackend(), VulkanBackend());
|
||||
DAWN_INSTANTIATE_TEST(TextureSubresourceTest,
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
VulkanBackend());
|
||||
|
||||
Reference in New Issue
Block a user