Jiawei Shao 12e97ed6a7 Transition bind group resource states before dispatch in compute pass
This patch fixes a crash issue in both D3D12 and Vulkan backends.
Previously on D3D12 and Vulkan before a compute pass we transitioned
the states of all the resources used in the pass, and before each
dispatch call we only checked if the states of the storage buffers,
read-only storage textures and write-only storage textures need to
be transitioned. This behavior causes two issues:

1. In a compute pass a buffer or texture can be used as both read-only
and writable usages in different dispatch calls (e.g. as storage
buffer in the first dispatch, and as the uniform buffer in the next
dispatch), while this is invalid state combination on D3D12 and isn't
allowed by D3D12 validation layer.
2. In the above case, the state of the buffer is not transitioned into
UNIFORM, which does not match the required state in the next dispatch.

This patch fixes this issue by transitioning all the states in the
current bind group before each dispatch() instead of the beginning
of the compute pass.

BUG=dawn:522
TEST=dawn_end2end_tests
Change-Id: Ibeb6c41dc493ee1068b43bd89ed5a15f2331ef75
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/27942
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2020-09-09 01:14:38 +00:00
..
2020-09-09 00:08:38 +00:00
2020-09-02 22:09:08 +00:00
2020-09-09 00:08:38 +00:00
2020-09-09 00:08:38 +00:00
2020-06-19 21:39:23 +00:00
2020-09-09 00:08:38 +00:00
2020-04-10 19:04:42 +00:00
2020-09-09 00:08:38 +00:00
2020-07-17 09:02:46 +00:00
2020-09-09 00:08:38 +00:00
2020-07-01 10:48:16 +00:00
2020-06-11 00:34:14 +00:00
2020-09-09 00:08:38 +00:00
2020-04-20 17:36:22 +00:00
2020-07-01 10:48:16 +00:00
2020-07-01 10:48:16 +00:00
2020-09-09 00:08:38 +00:00
2020-09-09 00:08:38 +00:00
2020-09-09 00:08:38 +00:00
2020-04-20 17:36:22 +00:00
2020-06-11 00:34:14 +00:00