dawn-cmake/src/dawn_native
Yunchao He cb9b2f9fdd Implement readonly depth/stencil attachment on D3D12
This change adds a end2end test for readonly depth/stencil
attachment and implements it on D3D12.

This change focuses on depth. If it is OK, I will add test(s) for
stencil.

The key points are:
  - Set DEPTH_READ transition barrier to replace DEPTH_WRITE barrier
    if it is readonly depth/stencil attachment.
  - Set appropriate D3D12_DEPTH_STENCIL_DESC (which is already correct)
    and D3D12_DEPTH_STENCIL_VIEW_DESC (which needs some particular
    flags). Otherwise, the underlying driver (validation layer) may
    think we still need DEPTH_WRITE transition barrier.

Bug: dawn:485
Change-Id: I64d30426ed8042a98b3fef084bb90b125320a6f8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67742
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-11-02 19:53:09 +00:00
..
d3d12 Implement readonly depth/stencil attachment on D3D12 2021-11-02 19:53:09 +00:00
metal Remove deferred BufferLocation updates for drawIndexedIndirect 2021-11-02 18:23:49 +00:00
null Adds/refactors destroy handling for Buffer and QuerySet. 2021-11-01 23:42:52 +00:00
opengl Remove deferred BufferLocation updates for drawIndexedIndirect 2021-11-02 18:23:49 +00:00
vulkan Remove deferred BufferLocation updates for drawIndexedIndirect 2021-11-02 18:23:49 +00:00
Adapter.cpp Various validation error improvements 2021-10-20 17:42:38 +00:00
Adapter.h Populate supported Vulkan limits from the backend 2021-10-19 22:52:14 +00:00
AsyncTask.cpp D3D12: Support creating compute pipeline asynchronously 2021-06-04 05:12:06 +00:00
AsyncTask.h Triage Dawn TODOs 2021-06-04 22:23:56 +00:00
AttachmentState.cpp Refactors dawn_native objects for list tracking and adds destroy skeleton API. 2021-09-28 15:40:01 +00:00
AttachmentState.h Refactors dawn_native objects for list tracking and adds destroy skeleton API. 2021-09-28 15:40:01 +00:00
BUILD.gn Remove deferred BufferLocation updates for drawIndexedIndirect 2021-11-02 18:23:49 +00:00
BackendConnection.cpp Various validation error improvements 2021-10-20 17:42:38 +00:00
BackendConnection.h
BindGroup.cpp Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
BindGroup.h Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
BindGroupLayout.cpp Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
BindGroupLayout.h Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
BindGroupTracker.h Fix bind groups not being applied 2021-08-05 14:45:48 +00:00
BindingInfo.cpp Improve errors in BindGroupLayout, BindingInfo 2021-10-19 16:14:51 +00:00
BindingInfo.h Improve errors in BindGroupLayout, BindingInfo 2021-10-19 16:14:51 +00:00
BuddyAllocator.cpp Triage Dawn TODOs 2021-06-04 22:23:56 +00:00
BuddyAllocator.h Triage Dawn TODOs 2021-06-04 22:23:56 +00:00
BuddyMemoryAllocator.cpp
BuddyMemoryAllocator.h
Buffer.cpp Improve various error messages 2021-11-02 15:39:49 +00:00
Buffer.h Adds/refactors destroy handling for Buffer and QuerySet. 2021-11-01 23:42:52 +00:00
CMakeLists.txt Remove deferred BufferLocation updates for drawIndexedIndirect 2021-11-02 18:23:49 +00:00
CachedObject.cpp
CachedObject.h Refactors dawn_native objects for list tracking and adds destroy skeleton API. 2021-09-28 15:40:01 +00:00
CallbackTaskManager.cpp Implement CallbackTaskManager for Create*PipelineAsync 2021-05-02 03:22:30 +00:00
CallbackTaskManager.h Implement AsyncWaitableEvent with std::condition_variable 2021-05-27 00:49:03 +00:00
CommandAllocator.cpp Support flattening multiple CommandAllocators 2021-09-15 18:29:00 +00:00
CommandAllocator.h Support flattening multiple CommandAllocators 2021-09-15 18:29:00 +00:00
CommandBuffer.cpp Remove deferred BufferLocation updates for drawIndexedIndirect 2021-11-02 18:23:49 +00:00
CommandBuffer.h Remove deferred BufferLocation updates for drawIndexedIndirect 2021-11-02 18:23:49 +00:00
CommandBufferStateTracker.cpp Improve various error messages 2021-11-02 15:39:49 +00:00
CommandBufferStateTracker.h Implement GPU-based validation for dispatchIndirect 2021-10-29 18:52:33 +00:00
CommandEncoder.cpp Implement readonly depth/stencil attachment on D3D12 2021-11-02 19:53:09 +00:00
CommandEncoder.h Remove deferred BufferLocation updates for drawIndexedIndirect 2021-11-02 18:23:49 +00:00
CommandValidation.cpp Improve validation errors in CommandValidation 2021-10-05 00:34:30 +00:00
CommandValidation.h Improve validation errors for CopyTextureForBrowser 2021-10-01 17:05:55 +00:00
Commands.cpp Remove deferred BufferLocation updates for drawIndexedIndirect 2021-11-02 18:23:49 +00:00
Commands.h Implement readonly depth/stencil attachment on D3D12 2021-11-02 19:53:09 +00:00
CompilationMessages.cpp Emit tint warning when creating shader module 2021-06-18 13:29:39 +00:00
CompilationMessages.h Emit tint warning when creating shader module 2021-06-18 13:29:39 +00:00
ComputePassEncoder.cpp Unmark DispatchIndirect as an unsafe API 2021-11-01 18:01:32 +00:00
ComputePassEncoder.h Implement GPU-based validation for dispatchIndirect 2021-10-29 18:52:33 +00:00
ComputePipeline.cpp Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
ComputePipeline.h Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
CopyTextureForBrowserHelper.cpp Improve validation errors for CopyTextureForBrowser 2021-10-01 17:05:55 +00:00
CopyTextureForBrowserHelper.h
CreatePipelineAsyncTask.cpp Add trace events on the creation of shader module and pipeline 2021-11-02 03:07:52 +00:00
CreatePipelineAsyncTask.h Avoid redundant creation of ComputePipelineBase in GetCachedComputePipeline 2021-10-13 00:43:05 +00:00
DawnNative.cpp Remove "extension" 2021-10-12 13:21:56 +00:00
Device.cpp Add trace events on the creation of shader module and pipeline 2021-11-02 03:07:52 +00:00
Device.h Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
DynamicUploader.cpp Rolling build dependencies for new d3dcompiler_47.dll 2021-06-23 09:22:22 +00:00
DynamicUploader.h
EncodingContext.cpp Improve validation errors for encoders 2021-10-28 00:13:17 +00:00
EncodingContext.h Improve validation errors for encoders 2021-10-28 00:13:17 +00:00
EnumClassBitmasks.h
EnumMaskIterator.h
Error.cpp
Error.h Adds destroy handling for BindGroupLayout without new backend changes yet. 2021-10-12 18:53:57 +00:00
ErrorData.cpp Add debug group logging to validation errors 2021-09-29 19:39:02 +00:00
ErrorData.h Add debug group logging to validation errors 2021-09-29 19:39:02 +00:00
ErrorInjector.cpp
ErrorInjector.h
ErrorScope.cpp Fix all GCC 10 warnings 2021-09-23 17:34:53 +00:00
ErrorScope.h
ExternalTexture.cpp Improve validation errors for CreateExternalTexture 2021-10-01 15:34:25 +00:00
ExternalTexture.h Refactors dawn_native objects for list tracking and adds destroy skeleton API. 2021-09-28 15:40:01 +00:00
Features.cpp Make Dawn's feature name casing match WebGPU (- instead of _) 2021-10-11 10:18:09 +00:00
Features.h Rename "extension" to "feature" 2021-10-04 11:30:02 +00:00
Format.cpp Rename "extension" to "feature" 2021-10-04 11:30:02 +00:00
Format.h Make Dawn's feature name casing match WebGPU (- instead of _) 2021-10-11 10:18:09 +00:00
Forward.h Add FromAPI / ToAPI helpers for dawn_native 2021-10-27 19:07:37 +00:00
IndirectDrawMetadata.cpp Remove deferred BufferLocation updates for drawIndexedIndirect 2021-11-02 18:23:49 +00:00
IndirectDrawMetadata.h Remove deferred BufferLocation updates for drawIndexedIndirect 2021-11-02 18:23:49 +00:00
IndirectDrawValidationEncoder.cpp Remove deferred BufferLocation updates for drawIndexedIndirect 2021-11-02 18:23:49 +00:00
IndirectDrawValidationEncoder.h Remove several compile-time constants in favor of limits 2021-10-13 18:57:18 +00:00
Instance.cpp Various validation error improvements 2021-10-20 17:42:38 +00:00
Instance.h Rename "extension" to "feature" 2021-10-04 11:30:02 +00:00
IntegerTypes.h Update default pipeline layout compatibility rules 2021-09-01 22:15:41 +00:00
InternalPipelineStore.cpp Implement drawIndexedIndirect validation 2021-09-23 00:15:19 +00:00
InternalPipelineStore.h Implement GPU-based validation for dispatchIndirect 2021-10-29 18:52:33 +00:00
Limits.cpp Various validation error improvements 2021-10-20 17:42:38 +00:00
Limits.h Add a mechanism for finding the best tier for a set of limits 2021-09-28 01:04:10 +00:00
ObjectBase.cpp Adds/refactors destroy handling for Buffer and QuerySet. 2021-11-01 23:42:52 +00:00
ObjectBase.h Adds/refactors destroy handling for Buffer and QuerySet. 2021-11-01 23:42:52 +00:00
ObjectContentHasher.cpp
ObjectContentHasher.h
PassResourceUsage.h Implement External Texture Binding Functionality 2021-06-01 19:45:53 +00:00
PassResourceUsageTracker.cpp Remove readonly storage textures 2021-09-17 17:07:43 +00:00
PassResourceUsageTracker.h Validate a subresource can't be an attachment multiple times in a pass 2021-07-16 17:44:59 +00:00
PerStage.cpp Improve errors in BindGroupLayout, BindingInfo 2021-10-19 16:14:51 +00:00
PerStage.h Improve errors in BindGroupLayout, BindingInfo 2021-10-19 16:14:51 +00:00
PersistentCache.cpp D3D12: Support creating compute pipeline asynchronously 2021-06-04 05:12:06 +00:00
PersistentCache.h D3D12: Support creating compute pipeline asynchronously 2021-06-04 05:12:06 +00:00
Pipeline.cpp Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
Pipeline.h Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
PipelineLayout.cpp Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
PipelineLayout.h Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
PooledResourceMemoryAllocator.cpp
PooledResourceMemoryAllocator.h
ProgrammablePassEncoder.cpp Improve validation errors for encoders 2021-10-28 00:13:17 +00:00
ProgrammablePassEncoder.h Improve validation errors for encoders 2021-10-28 00:13:17 +00:00
QueryHelper.cpp Fix internal storage buffer usage 2021-07-02 09:51:18 +00:00
QueryHelper.h Fix query index of availability in timestamp shader 2021-05-18 01:13:08 +00:00
QuerySet.cpp Adds/refactors destroy handling for Buffer and QuerySet. 2021-11-01 23:42:52 +00:00
QuerySet.h Adds/refactors destroy handling for Buffer and QuerySet. 2021-11-01 23:42:52 +00:00
Queue.cpp Various validation error improvements 2021-10-20 17:42:38 +00:00
Queue.h Refactors dawn_native objects for list tracking and adds destroy skeleton API. 2021-09-28 15:40:01 +00:00
RenderBundle.cpp Add validation rule for depth/stencil between bundle and pass 2021-10-19 21:10:23 +00:00
RenderBundle.h Add validation rule for depth/stencil between bundle and pass 2021-10-19 21:10:23 +00:00
RenderBundleEncoder.cpp Improve validation errors for encoders 2021-10-28 00:13:17 +00:00
RenderBundleEncoder.h Add FromAPI / ToAPI helpers for dawn_native 2021-10-27 19:07:37 +00:00
RenderEncoderBase.cpp Remove deferred BufferLocation updates for drawIndexedIndirect 2021-11-02 18:23:49 +00:00
RenderEncoderBase.h Add validation rule for depth/stencil between bundle and pass 2021-10-19 21:10:23 +00:00
RenderPassEncoder.cpp Add validation rule for depth/stencil between bundle and pass 2021-10-19 21:10:23 +00:00
RenderPassEncoder.h Add FromAPI / ToAPI helpers for dawn_native 2021-10-27 19:07:37 +00:00
RenderPipeline.cpp Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
RenderPipeline.h Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
ResourceHeap.h
ResourceHeapAllocator.h
ResourceMemoryAllocation.cpp
ResourceMemoryAllocation.h Rolling build dependencies for new d3dcompiler_47.dll 2021-06-23 09:22:22 +00:00
RingBufferAllocator.cpp Triage Dawn TODOs 2021-06-07 18:23:52 +00:00
RingBufferAllocator.h Rolling build dependencies for new d3dcompiler_47.dll 2021-06-23 09:22:22 +00:00
Sampler.cpp Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
Sampler.h Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
ScratchBuffer.cpp Implement drawIndexedIndirect validation 2021-09-23 00:15:19 +00:00
ScratchBuffer.h Implement drawIndexedIndirect validation 2021-09-23 00:15:19 +00:00
ShaderModule.cpp Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
ShaderModule.h Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
SpirvValidation.cpp Improve validation messages for surface/swap chain 2021-10-21 19:25:04 +00:00
SpirvValidation.h Validate SPIRV produced by Tint 2021-08-12 05:20:48 +00:00
StagingBuffer.cpp
StagingBuffer.h
Subresource.cpp Fix all GCC 10 warnings 2021-09-23 17:34:53 +00:00
Subresource.h Add GPUExternalTexture Types 2021-04-01 20:46:42 +00:00
SubresourceStorage.h Enable -Wunused-but-set-variable. 2021-07-27 18:42:59 +00:00
Surface.cpp Improving Vulkan backend validation messages. 2021-10-21 23:45:54 +00:00
Surface.h Add FromAPI / ToAPI helpers for dawn_native 2021-10-27 19:07:37 +00:00
Surface_metal.mm
SwapChain.cpp Reland "Adds destroy handling for simple objects without new backend changes yet." 2021-11-01 18:14:21 +00:00
SwapChain.h Refactors dawn_native objects for list tracking and adds destroy skeleton API. 2021-09-28 15:40:01 +00:00
Texture.cpp Remove several compile-time constants in favor of limits 2021-10-13 18:57:18 +00:00
Texture.h Track read-only depth/stencil attachment as read-only usage 2021-10-01 01:45:14 +00:00
TintUtils.cpp Allow Dawn to surface Tint internal compiler errors as uncaptured validation errors 2021-03-25 15:37:44 +00:00
TintUtils.h Allow Dawn to surface Tint internal compiler errors as uncaptured validation errors 2021-03-25 15:37:44 +00:00
ToBackend.h dawn_native: Use refcount-safe methods for reentrant object creation 2021-04-19 08:52:35 +00:00
Toggles.cpp Remove the use_tint_generator toggle 2021-10-29 13:17:27 +00:00
Toggles.h Remove the use_tint_generator toggle 2021-10-29 13:17:27 +00:00
VertexFormat.cpp Replace VertexFormatUtils with a dawn_native table of formats 2021-07-22 08:57:29 +00:00
VertexFormat.h Replace VertexFormatUtils with a dawn_native table of formats 2021-07-22 08:57:29 +00:00
XlibXcbFunctions.cpp
XlibXcbFunctions.h
dawn_platform.h Add FromAPI / ToAPI helpers for dawn_native 2021-10-27 19:07:37 +00:00