dawn-cmake/src/dawn/native
Corentin Wallez 943a1a2d7a Add SwapChain::GetCurrentTexture
This is to eventually allow more using swapchain textures as CopySrc and
CopyDst. Note that this commit doesn't add any additional usages.

Because textures can reflect their creation parameters, swapchains now
need to pass in the correct texture descriptor in all code paths. This
requires additional handling in dawn::native error swapchains, and
dawn::wire::client's SwapChain reservation and Device::CreateSwapChain
code.

Tests are added for all of these code paths except
dawn::wire::client::Device::CreateSwapChain because there is no way to
create a Surface in wire tests at the moment (they don't have an
instance).

Bug: dawn:1551
Change-Id: I22d5e909e1e94d48eb52cae57aabff8a7f0c04c1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133463
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
2023-05-26 10:32:17 +00:00
..
d3d Dawn: Deprecate DiscoverAdapters with DiscoverPhysicalDevices 2023-05-25 02:42:27 +00:00
d3d11 d3d11: enable NonzeroBufferCreationTests 2023-05-26 00:23:47 +00:00
d3d12 Dawn: Deprecate DiscoverAdapters with DiscoverPhysicalDevices 2023-05-25 02:42:27 +00:00
metal Dawn: Deprecate DiscoverAdapters with DiscoverPhysicalDevices 2023-05-25 02:42:27 +00:00
null Dawn: Deprecate DiscoverAdapters with DiscoverPhysicalDevices 2023-05-25 02:42:27 +00:00
opengl Dawn: Deprecate DiscoverAdapters with DiscoverPhysicalDevices 2023-05-25 02:42:27 +00:00
stream Namespace dawn/common/ and dawn/utils/ in dawn:: 2023-05-17 18:41:02 +00:00
utils Adds generation for WGSL descriptor to rename source->code. 2023-05-03 02:23:25 +00:00
vulkan Dawn: Deprecate DiscoverAdapters with DiscoverPhysicalDevices 2023-05-25 02:42:27 +00:00
Adapter.cpp Move Adapter toggles from PhysicalDevice to Adapter 2023-05-11 17:10:28 +00:00
Adapter.h Move Adapter toggles from PhysicalDevice to Adapter 2023-05-11 17:10:28 +00:00
ApplyClearColorValueWithDrawHelper.cpp Make TextureComponentType an internal enum 2023-05-02 04:34:55 +00:00
ApplyClearColorValueWithDrawHelper.h D3D12: Apply big integer clear color values with draw 2022-08-10 04:25:34 +00:00
AsyncTask.cpp [chromium-style] Adding/moving constructors and destructors. 2022-05-09 22:22:18 +00:00
AsyncTask.h [warnings] Add Wsuggest-override and Wsuggest-destructor-override. 2022-05-10 18:44:34 +00:00
AttachmentState.cpp Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
AttachmentState.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
BUILD.gn Compat GL/GLES: blit a depth texture to a buffer using compute 2023-05-17 22:25:34 +00:00
BackendConnection.cpp Dawn: Deprecate DiscoverAdapters with DiscoverPhysicalDevices 2023-05-25 02:42:27 +00:00
BackendConnection.h Dawn: Deprecate DiscoverAdapters with DiscoverPhysicalDevices 2023-05-25 02:42:27 +00:00
BindGroup.cpp Improve runtime minBindingSize validation message 2023-05-09 02:37:54 +00:00
BindGroup.h Improve runtime minBindingSize validation message 2023-05-09 02:37:54 +00:00
BindGroupLayout.cpp Removes deprecation period code for multisampled float sample type. 2023-04-21 05:57:20 +00:00
BindGroupLayout.h Retain descriptor labels for error objects 2023-04-20 23:35:14 +00:00
BindGroupTracker.h Support higher limits for maxDynamicUniform/StorageBuffers 2023-02-25 02:10:21 +00:00
BindingInfo.cpp Raise maxStorageTexturesPerShaderStage to 8 2023-02-27 20:22:51 +00:00
BindingInfo.h Support higher limits for maxDynamicUniform/StorageBuffers 2023-02-25 02:10:21 +00:00
BlitBufferToDepthStencil.cpp Adds generation for WGSL descriptor to rename source->code. 2023-05-03 02:23:25 +00:00
BlitBufferToDepthStencil.h Add workarounds to blit a buffer to a depth/stencil texture 2023-01-30 17:13:12 +00:00
BlitDepthStencilToBuffer.cpp Compat GL/GLES: blit a stencil texture to a buffer using compute 2023-05-24 20:59:21 +00:00
BlitDepthStencilToBuffer.h Compat GL/GLES: blit a stencil texture to a buffer using compute 2023-05-24 20:59:21 +00:00
BlitDepthToDepth.cpp Adds generation for WGSL descriptor to rename source->code. 2023-05-03 02:23:25 +00:00
BlitDepthToDepth.h Add workaround to blit depth to depth 2023-02-01 22:49:39 +00:00
Blob.cpp Cache WGSL -> DXBC/DXIL compilation 2022-08-05 20:09:07 +00:00
Blob.h IWYU: add cstdint for uint*_t in dawn::native::Blob 2022-08-01 16:02:43 +00:00
BlobCache.cpp Add dawn version hash to cache keys. 2022-06-24 23:39:49 +00:00
BlobCache.h Beautify visitable structs with more helpers 2022-08-12 20:39:03 +00:00
BuddyAllocator.cpp Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
BuddyAllocator.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
BuddyMemoryAllocator.cpp [chromium-style] Adding/moving constructors and destructors. 2022-05-09 22:22:18 +00:00
BuddyMemoryAllocator.h [chromium-style] Adding/moving constructors and destructors. 2022-05-09 22:22:18 +00:00
Buffer.cpp Compat GL/GLES: blit a stencil texture to a buffer using compute 2023-05-24 20:59:21 +00:00
Buffer.h Compat GL/GLES: blit a depth texture to a buffer using compute 2023-05-17 22:25:34 +00:00
CMakeLists.txt Compat GL/GLES: blit a depth texture to a buffer using compute 2023-05-17 22:25:34 +00:00
CacheKey.cpp Rename CacheKey-related files to Stream 2022-07-29 00:36:21 +00:00
CacheKey.h Refactor [de]serialization functions out of CacheKey 2022-07-28 23:04:31 +00:00
CacheRequest.cpp Add CacheRequest utilities and tests 2022-06-11 03:50:33 +00:00
CacheRequest.h Ensures blob cache is always available, even if it is just a placeholder 2022-11-23 08:55:57 +00:00
CacheResult.h Vulkan: Implement WGSL->SPIRV caching 2022-07-08 21:30:25 +00:00
CachedObject.cpp Refactors native mock classes to be more like the Null device. 2023-02-22 20:38:37 +00:00
CachedObject.h Adds pipeline cache and implementation for Vulkan backend. 2022-05-03 00:33:33 +00:00
CallbackTaskManager.cpp Forward callbacks to Instance after Device is destroyed. 2023-03-23 15:16:46 +00:00
CallbackTaskManager.h Forward callbacks to Instance after Device is destroyed. 2023-03-23 15:16:46 +00:00
CommandAllocator.cpp Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
CommandAllocator.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
CommandBuffer.cpp Show encoder in command buffer/render bundle messages 2023-04-26 21:19:29 +00:00
CommandBuffer.h Show encoder in command buffer/render bundle messages 2023-04-26 21:19:29 +00:00
CommandBufferStateTracker.cpp Unset vertex buffer: validations and unittests 2023-05-11 19:26:30 +00:00
CommandBufferStateTracker.h Unset vertex buffer: validations and unittests 2023-05-11 19:26:30 +00:00
CommandEncoder.cpp Compat GL/GLES: blit a stencil texture to a buffer using compute 2023-05-24 20:59:21 +00:00
CommandEncoder.h Compat GL/GLES: blit a depth texture to a buffer using compute 2023-05-17 22:25:34 +00:00
CommandValidation.cpp Compat GL/GLES: blit a depth texture to a buffer using compute 2023-05-17 22:25:34 +00:00
CommandValidation.h Compat GL/GLES: blit a depth texture to a buffer using compute 2023-05-17 22:25:34 +00:00
Commands.cpp Workaround stencil to buffer copies on Metal Intel 2023-01-18 17:55:14 +00:00
Commands.h Adds pass labels into the commands and plumbs through for Metal. 2023-05-03 07:33:18 +00:00
CompilationMessages.cpp Implement device.CreateErrorShaderModule() 2023-05-25 03:32:41 +00:00
CompilationMessages.h Implement device.CreateErrorShaderModule() 2023-05-25 03:32:41 +00:00
ComputePassEncoder.cpp Emit warning if zero-size dispatch/draw 2023-05-10 18:30:55 +00:00
ComputePassEncoder.h Removes deprecation period code for renamed APIs (i.e. endPass/dispatch) 2023-04-22 00:33:51 +00:00
ComputePipeline.cpp Retain descriptor labels for error objects 2023-04-20 23:35:14 +00:00
ComputePipeline.h Retain descriptor labels for error objects 2023-04-20 23:35:14 +00:00
CopyTextureForBrowserHelper.cpp Add missing locks to indirect draw validation & timestamp query. 2023-04-13 15:59:15 +00:00
CopyTextureForBrowserHelper.h Reland "Add CopyExternalTextureForBrowser()" 2022-10-26 00:58:46 +00:00
CreatePipelineAsyncTask.cpp DawnNative: Defer callbacks' triggerings to APITick(). 2023-03-06 19:03:26 +00:00
CreatePipelineAsyncTask.h DawnNative: Defer callbacks' triggerings to APITick(). 2023-03-06 19:03:26 +00:00
DawnNative.cpp Dawn: Deprecate DiscoverAdapters with DiscoverPhysicalDevices 2023-05-25 02:42:27 +00:00
Device.cpp Add SwapChain::GetCurrentTexture 2023-05-26 10:32:17 +00:00
Device.h Implement device.CreateErrorShaderModule() 2023-05-25 03:32:41 +00:00
DynamicUploader.cpp Delete StagingBuffer in favor of mappable buffers 2023-01-19 02:54:07 +00:00
DynamicUploader.h Delete StagingBuffer in favor of mappable buffers 2023-01-19 02:54:07 +00:00
EncodingContext.cpp Add missing locks to indirect draw validation & timestamp query. 2023-04-13 15:59:15 +00:00
EncodingContext.h Adds a check and message for when encoding on a finished encoder. 2023-05-05 23:14:42 +00:00
EnumClassBitmasks.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
EnumMaskIterator.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
Error.cpp Reland "Allow internal errors for pipeline creation failure" 2023-05-11 00:06:38 +00:00
Error.h Removes remaining V1 deprecation utilities. 2023-05-02 00:38:56 +00:00
ErrorData.cpp Add DAWN_DEBUG_BREAK_ON_ERROR environment var and debugging docs 2023-05-18 23:29:25 +00:00
ErrorData.h Adds error promoting to device loss when disallowed error occurs in a scope. 2023-02-28 04:34:32 +00:00
ErrorInjector.cpp Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
ErrorInjector.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
ErrorScope.cpp DawnNative: Defer callbacks' triggerings to APITick(). 2023-03-06 19:03:26 +00:00
ErrorScope.h DawnNative: Defer callbacks' triggerings to APITick(). 2023-03-06 19:03:26 +00:00
ExternalTexture.cpp Retain descriptor labels for error objects 2023-04-20 23:35:14 +00:00
ExternalTexture.h Retain descriptor labels for error objects 2023-04-20 23:35:14 +00:00
Features.cpp Implements float32-filterable feature. 2023-05-18 07:21:11 +00:00
Features.h Implements float32-filterable feature. 2023-05-18 07:21:11 +00:00
Format.cpp Implements float32-filterable feature. 2023-05-18 07:21:11 +00:00
Format.h Make TextureComponentType an internal enum 2023-05-02 04:34:55 +00:00
Forward.h Namespace dawn/common/ and dawn/utils/ in dawn:: 2023-05-17 18:41:02 +00:00
IndirectDrawMetadata.cpp Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
IndirectDrawMetadata.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
IndirectDrawValidationEncoder.cpp Add missing locks to indirect draw validation & timestamp query. 2023-04-13 15:59:15 +00:00
IndirectDrawValidationEncoder.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
Instance.cpp Dawn: Deprecate DiscoverAdapters with DiscoverPhysicalDevices 2023-05-25 02:42:27 +00:00
Instance.h Dawn: Deprecate DiscoverAdapters with DiscoverPhysicalDevices 2023-05-25 02:42:27 +00:00
IntegerTypes.h Reland "Implement maxBindingsPerBindGroup limit" 2022-09-21 17:42:24 +00:00
InternalPipelineStore.cpp Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
InternalPipelineStore.h Compat GL/GLES: blit a stencil texture to a buffer using compute 2023-05-24 20:59:21 +00:00
Limits.cpp Dawn: fix limit tiering for maxBufferSize and maxStorageBufferBindingSize 2023-05-05 02:14:31 +00:00
Limits.h Dawn: fix limit tiering for maxBufferSize and maxStorageBufferBindingSize 2023-05-05 02:14:31 +00:00
ObjectBase.cpp Add SwapChain::GetCurrentTexture 2023-05-26 10:32:17 +00:00
ObjectBase.h Add SwapChain::GetCurrentTexture 2023-05-26 10:32:17 +00:00
ObjectContentHasher.cpp Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
ObjectContentHasher.h Use SubstituteOverride transform to implement overrides 2022-09-07 20:09:54 +00:00
PassResourceUsage.cpp [chromium-style] Adding/moving constructors and destructors. 2022-05-09 20:28:54 +00:00
PassResourceUsage.h [chromium-style] Adding/moving constructors and destructors. 2022-05-09 20:28:54 +00:00
PassResourceUsageTracker.cpp [chromium-style] Adding/moving constructors and destructors. 2022-05-09 20:28:54 +00:00
PassResourceUsageTracker.h [chromium-style] Adding/moving constructors and destructors. 2022-05-09 20:28:54 +00:00
PerStage.cpp Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
PerStage.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
PhysicalDevice.cpp Move Adapter toggles from PhysicalDevice to Adapter 2023-05-11 17:10:28 +00:00
PhysicalDevice.h Move Adapter toggles from PhysicalDevice to Adapter 2023-05-11 17:10:28 +00:00
Pipeline.cpp Add missing default return values to slience Wreturn-type 2023-04-21 00:29:43 +00:00
Pipeline.h Retain descriptor labels for error objects 2023-04-20 23:35:14 +00:00
PipelineCache.cpp Ensures blob cache is always available, even if it is just a placeholder 2022-11-23 08:55:57 +00:00
PipelineCache.h Rename CachedBlob -> Blob; move to own file 2022-06-03 01:13:41 +00:00
PipelineLayout.cpp Retain descriptor labels for error objects 2023-04-20 23:35:14 +00:00
PipelineLayout.h Retain descriptor labels for error objects 2023-04-20 23:35:14 +00:00
PooledResourceMemoryAllocator.cpp Destroy ResourceAllocationManager in d3d12::Device::DestroyImpl 2022-11-30 21:40:59 +00:00
PooledResourceMemoryAllocator.h [chromium-style] Adding/moving constructors and destructors. 2022-05-09 22:22:18 +00:00
ProgrammableEncoder.cpp Retain descriptor labels for error objects 2023-04-20 23:35:14 +00:00
ProgrammableEncoder.h Show encoder in command buffer/render bundle messages 2023-04-26 21:19:29 +00:00
QueryHelper.cpp Add missing locks to indirect draw validation & timestamp query. 2023-04-13 15:59:15 +00:00
QueryHelper.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
QuerySet.cpp Adds AllowUnsafeAPIs toggle and fixes code-paths to use it. 2023-05-04 21:09:40 +00:00
QuerySet.h Refactors native mock classes to be more like the Null device. 2023-02-22 20:38:37 +00:00
Queue.cpp Add error context on Queue::API* methods 2023-05-03 00:43:42 +00:00
Queue.h Retain descriptor labels for error objects 2023-04-20 23:35:14 +00:00
RefCountedWithExternalCount.cpp Make child objects ref the device and add a mechanism to break cycles 2022-05-20 16:57:01 +00:00
RefCountedWithExternalCount.h Make child objects ref the device and add a mechanism to break cycles 2022-05-20 16:57:01 +00:00
RenderBundle.cpp Show encoder in command buffer/render bundle messages 2023-04-26 21:19:29 +00:00
RenderBundle.h Show encoder in command buffer/render bundle messages 2023-04-26 21:19:29 +00:00
RenderBundleEncoder.cpp Show encoder in command buffer/render bundle messages 2023-04-26 21:19:29 +00:00
RenderBundleEncoder.h Retain descriptor labels for error objects 2023-04-20 23:35:14 +00:00
RenderEncoderBase.cpp Unset vertex buffer: validations and unittests 2023-05-11 19:26:30 +00:00
RenderEncoderBase.h Retain descriptor labels for error objects 2023-04-20 23:35:14 +00:00
RenderPassEncoder.cpp Removes deprecation period code for renamed APIs (i.e. endPass/dispatch) 2023-04-22 00:33:51 +00:00
RenderPassEncoder.h Removes deprecation period code for renamed APIs (i.e. endPass/dispatch) 2023-04-22 00:33:51 +00:00
RenderPipeline.cpp Compat: Reject non-matching blend state / write mask 2023-05-25 04:37:12 +00:00
RenderPipeline.h Retain descriptor labels for error objects 2023-04-20 23:35:14 +00:00
ResourceHeap.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
ResourceHeapAllocator.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
ResourceMemoryAllocation.cpp Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
ResourceMemoryAllocation.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
RingBufferAllocator.cpp Fixup some grammar. 2022-09-21 14:44:33 +00:00
RingBufferAllocator.h [chromium-style] Adding/moving constructors and destructors. 2022-05-09 22:22:18 +00:00
Sampler.cpp Deprecates use of filter mode for mipmap filters. 2023-04-26 08:03:20 +00:00
Sampler.h Deprecates use of filter mode for mipmap filters. 2023-04-26 08:03:20 +00:00
ScratchBuffer.cpp Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
ScratchBuffer.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
Serializable.h Beautify visitable structs with more helpers 2022-08-12 20:39:03 +00:00
ShaderModule.cpp [tint] Make Transform base class 2023-05-17 01:21:45 +00:00
ShaderModule.h [tint] Make Transform base class 2023-05-17 01:21:45 +00:00
SpirvValidation.cpp Vulkan: Implement WGSL->SPIRV caching 2022-07-08 21:30:25 +00:00
SpirvValidation.h Vulkan: Implement WGSL->SPIRV caching 2022-07-08 21:30:25 +00:00
StreamImplTint.cpp [tint] Introduce an ast::transform namespace 2023-05-11 21:27:16 +00:00
Subresource.cpp Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
Subresource.h Validate writable storage texture bindings don't alias 2023-03-01 21:04:28 +00:00
SubresourceStorage.h Bubble up errors from EnsureSubresourceContentInitialized. 2023-03-01 21:53:31 +00:00
Surface.cpp Merge NewSwapChainBase in SwapChainBase 2023-04-07 13:30:50 +00:00
Surface.h Merge NewSwapChainBase in SwapChainBase 2023-04-07 13:30:50 +00:00
Surface_metal.mm Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
SwapChain.cpp Add SwapChain::GetCurrentTexture 2023-05-26 10:32:17 +00:00
SwapChain.h Add SwapChain::GetCurrentTexture 2023-05-26 10:32:17 +00:00
Texture.cpp Compat GL/GLES: blit a stencil texture to a buffer using compute 2023-05-24 20:59:21 +00:00
Texture.h d3d11: enable render related end2end tests 2023-05-01 18:06:39 +00:00
TintUtils.cpp [tint] Introduce an ast::transform namespace 2023-05-11 21:27:16 +00:00
TintUtils.h [tint] Introduce an ast::transform namespace 2023-05-11 21:27:16 +00:00
ToBackend.h Rename AdapterD3D* -> PhysicalDeviceD3D*. 2023-05-01 23:10:47 +00:00
Toggles.cpp Compat GL/GLES: blit a stencil texture to a buffer using compute 2023-05-24 20:59:21 +00:00
Toggles.h Compat GL/GLES: blit a stencil texture to a buffer using compute 2023-05-24 20:59:21 +00:00
UsageValidationMode.h Add internal usage for copyTextureForBrowser 2022-07-11 18:11:14 +00:00
VertexFormat.cpp Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
VertexFormat.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
VisitableMembers.h Beautify visitable structs with more helpers 2022-08-12 20:39:03 +00:00
XlibXcbFunctions.cpp Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
XlibXcbFunctions.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
dawn_platform.h Remove wgpu::TextureUsage::Present 2023-05-23 08:16:01 +00:00
webgpu_absl_format.cpp Make TextureComponentType an internal enum 2023-05-02 04:34:55 +00:00
webgpu_absl_format.h Namespace dawn/common/ and dawn/utils/ in dawn:: 2023-05-17 18:41:02 +00:00