dawn-cmake/src
Jiawei Shao 1e1c13ed87 Add validations to multisampled color attachments and resolve targets
This patch adds validations to the multisampled color attachments and
resolve targets.

The resolve target must be a valid texture view, and it must follow
the following validations:

According to Vulkan SPEC:
1. If we set resolve target, the texture of the color attachment must
   be a multisampled texture, and the texture of the resolve target
   must be a non-multisampled texture.
2. The format of the resolve target must be the same as that of the
   color attachment.
3. The sample count of all the color attachments must be same.
4. The resolve target must have dawn::TextureUsage::OutputAttachment
   usage bit set when it was created.

On D3D12:
1. ID3D12GraphicsCommandList::ResolveSubresource() method only allow
   resolving in a subresource of a texture, thus the level count and
   mipmap level count of the resolve target can only be 1.
2. ID3D12GraphicsCommandList::ResolveSubresource() method requires
   the dimension of the source and destination must match.

BUG=dawn:56
TEST=dawn_unittests

Change-Id: I080415bef0d600600083a95f641815188798dca3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5340
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-03-11 18:41:02 +00:00
..
common Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00
dawn Split off common and libdawn / dawn_headers from BUILD.gn 2019-03-07 01:46:39 +00:00
dawn_native Add validations to multisampled color attachments and resolve targets 2019-03-11 18:41:02 +00:00
dawn_wire Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00
fuzzers Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00
include Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00
tests Add validations to multisampled color attachments and resolve targets 2019-03-11 18:41:02 +00:00
utils Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00