dawn-cmake/src/dawn_native/d3d12
Jiawei Shao 872c1d7fe9 Add validations to the texture copies with BC formats
This patch adds the validation on the texture copies with BC formats.
1. BufferCopyView.offset in B2T and T2B copies must be a multiple of the
   compressed texel block size in bytes.
2. BufferCopyView.rowPitch in B2T and T2B copies refers to the number of
   bytes from the start of one row of blocks to the start of the next
   row of blocks.
3. BufferCopyView.imageHeight must be a multiple of the compressed texel
   block height (4 for BC formats).
4. All members in TextureCopyView.origin must be a multiple of the
   corresponding dimensions of the compressed texel block (4x4x1 for BC
   formats).
5. All the mumbers in 'copySize' must be a multiple of the corresponding
   dimensions of the compressed texel block (4x4x1 for BC formats)
   because D3D12 requires the width and height of a texture in BC
   formats must be multiples of 4.
6. Compute the texture size in non-zero mipmap levels with paddings for
   textures in BC formats when necessary.

BUG=dawn:42
TEST=dawn_unittests

Change-Id: Iac8d6c93ab8b37bb46becffd4175339722ab6016
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7860
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-06-18 01:06:09 +00:00
..
AdapterD3D12.cpp Improve D3D12 adapter initialization. 2019-06-12 18:54:57 +00:00
AdapterD3D12.h Improve D3D12 adapter initialization. 2019-06-12 18:54:57 +00:00
BackendD3D12.cpp Improve D3D12 adapter initialization. 2019-06-12 18:54:57 +00:00
BackendD3D12.h D3D12: Implement the backend connection and adapter. 2019-01-30 16:07:48 +00:00
BindGroupD3D12.cpp D3D12: Create descriptor heaps after computing the required size 2019-05-16 05:56:49 +00:00
BindGroupD3D12.h D3D12: Create descriptor heaps after computing the required size 2019-05-16 05:56:49 +00:00
BindGroupLayoutD3D12.cpp Make dawn idl support dynamic buffer offset 2019-03-18 06:01:37 +00:00
BindGroupLayoutD3D12.h Make dawn_native use its own header for Dawn datatypes 2018-07-27 12:56:26 +02:00
BufferD3D12.cpp Allow D3D12 Implicit State Transitions 2019-06-14 15:14:12 +00:00
BufferD3D12.h D3D12: Batch Usage Transitions For Render Pass 2019-06-07 17:08:47 +00:00
CommandAllocatorManager.cpp Let DeviceBase know about Completed and LastSubmitted command Serials 2018-12-01 03:20:19 +00:00
CommandAllocatorManager.h dawn_native: Fixup namespace from backend:: to dawn_native:: 2018-07-25 11:27:55 +02:00
CommandBufferD3D12.cpp Add validations to the texture copies with BC formats 2019-06-18 01:06:09 +00:00
CommandBufferD3D12.h Update VertexInput (InputState) to match spec - Part 1 2019-05-22 22:46:32 +00:00
ComputePipelineD3D12.cpp Update ComputePipelineDescriptor to use PipelineStageDescriptor 2019-04-09 15:17:30 +00:00
ComputePipelineD3D12.h Descriptorize ComputePipeline 2018-09-05 08:32:53 -04:00
D3D12Backend.cpp Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00
D3D12Info.cpp Fix casing of includes in D3D12Info 2019-06-14 12:44:22 +00:00
D3D12Info.h Improve D3D12 adapter initialization. 2019-06-12 18:54:57 +00:00
DescriptorHeapAllocator.cpp Let DeviceBase know about Completed and LastSubmitted command Serials 2018-12-01 03:20:19 +00:00
DescriptorHeapAllocator.h dawn_native: Fixup namespace from backend:: to dawn_native:: 2018-07-25 11:27:55 +02:00
DeviceD3D12.cpp Improve D3D12 adapter initialization. 2019-06-12 18:54:57 +00:00
DeviceD3D12.h Improve D3D12 adapter initialization. 2019-06-12 18:54:57 +00:00
Forward.h Input State Descriptorization 2019-03-27 18:08:50 +00:00
NativeSwapChainImplD3D12.cpp Increase D3D12 Swap Chain Buffers to 3 2019-04-30 08:31:38 +00:00
NativeSwapChainImplD3D12.h Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00
PipelineLayoutD3D12.cpp Add D3D12 Functionality For Multiple Bind Groups 2018-12-18 19:59:59 +00:00
PipelineLayoutD3D12.h Make dawn_native use its own header for Dawn datatypes 2018-07-27 12:56:26 +02:00
PlatformFunctions.cpp Add Debug Marker Functionality for D3D12 2019-05-22 22:35:22 +00:00
PlatformFunctions.h Add Debug Marker Functionality for D3D12 2019-05-22 22:35:22 +00:00
QueueD3D12.cpp Rename several parameters to match WebGPU IDL 2019-02-21 00:45:19 +00:00
QueueD3D12.h Rename several parameters to match WebGPU IDL 2019-02-21 00:45:19 +00:00
RenderPipelineD3D12.cpp Update VertexInput (InputState) to match the spec - Part 2 2019-06-06 01:56:57 +00:00
RenderPipelineD3D12.h Input State Descriptorization 2019-03-27 18:08:50 +00:00
ResourceAllocator.cpp Let DeviceBase know about Completed and LastSubmitted command Serials 2018-12-01 03:20:19 +00:00
ResourceAllocator.h dawn_native: Fixup namespace from backend:: to dawn_native:: 2018-07-25 11:27:55 +02:00
SamplerD3D12.cpp Remove sampler border color from Dawn to match WebGPU 2019-04-09 15:12:50 +00:00
SamplerD3D12.h Remove sampler border color from Dawn to match WebGPU 2019-04-09 15:12:50 +00:00
ShaderModuleD3D12.cpp Fix clip space on D3D12 and OpenGL 2019-03-27 00:01:33 +00:00
ShaderModuleD3D12.h D3D12 fix for register binding offsets. 2018-11-01 13:59:19 +00:00
StagingBufferD3D12.cpp Memory manager: buffer uploads (Metal+refactor) - Part 3 2019-02-15 21:18:40 +00:00
StagingBufferD3D12.h Memory manager: buffer uploads (D3D) - Part 1 2019-01-29 00:10:07 +00:00
SwapChainD3D12.cpp Improve usage of static_casts over reinterpret_casts 2019-05-03 00:58:27 +00:00
SwapChainD3D12.h Descriptorize SwapChain. 2019-02-15 11:15:58 +00:00
TextureCopySplitter.cpp Change buffer-related sizes/offsets to be uint64_t 2019-04-05 20:51:29 +00:00
TextureCopySplitter.h Change buffer-related sizes/offsets to be uint64_t 2019-04-05 20:51:29 +00:00
TextureD3D12.cpp Allow D3D12 Implicit State Transitions 2019-06-14 15:14:12 +00:00
TextureD3D12.h Clear Vulkan Textures at first usage 2019-06-11 18:11:05 +00:00
UtilsD3D12.cpp Complete the sampler object to match WebGPU 2019-01-04 04:56:08 +00:00
UtilsD3D12.h Complete the sampler object to match WebGPU 2019-01-04 04:56:08 +00:00
d3d12_platform.h Enable D3D12 validation layers 2019-05-15 06:06:26 +00:00