mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-11 23:56:05 +00:00
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>