dawn-cmake/src/dawn_native
Austin Eng 0c66bcd13a Reland "Metal: Add CommandRecordingContext"
This is a reland of 2b3975f808

The previous CL failed to retain autoreleased ObjC objects which
should live longer than the autoreleasepool block. This reland fixes
the issue and adds tests for it.

Original change's description:
> Metal: Add CommandRecordingContext
>
> Introduces the idea of a CommandRecordingContext to the Metal backend,
> similar to other backends. This is a class to track which Metal encoder
> is open on the device-global pending MTLCommandBuffer.
> It will be needed to open/close encoders for lazy clearing.
>
> Bug: dawn:145
> Change-Id: Ief6b71a079d73943677d2b61382d1c36b88a4f87
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14780
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

Bug: dawn:145
Change-Id: I67494b35225ce8f6443a3fa9787d054522e5d422
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15042
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-01-15 18:22:53 +00:00
..
d3d12 Switch over to using CheckSpvcSuccess where possible 2020-01-15 16:58:23 +00:00
metal Reland "Metal: Add CommandRecordingContext" 2020-01-15 18:22:53 +00:00
null Return errors in ExtractSpirvInfo instead of sending to the device 2020-01-15 14:56:22 +00:00
opengl Switch over to using CheckSpvcSuccess where possible 2020-01-15 16:58:23 +00:00
vulkan Switch over to using CheckSpvcSuccess where possible 2020-01-15 16:58:23 +00:00
Adapter.cpp Add WGPUAdapterProperties and expose it in DawnNative 2020-01-10 13:28:18 +00:00
Adapter.h Add WGPUAdapterProperties and expose it in DawnNative 2020-01-10 13:28:18 +00:00
AttachmentState.cpp Only mark objects as cached right before inserting into the cache 2019-10-30 00:20:03 +00:00
AttachmentState.h Only mark objects as cached right before inserting into the cache 2019-10-30 00:20:03 +00:00
BackendConnection.cpp Add WGPUAdapterProperties and expose it in DawnNative 2020-01-10 13:28:18 +00:00
BackendConnection.h Add WGPUAdapterProperties and expose it in DawnNative 2020-01-10 13:28:18 +00:00
BindGroup.cpp Reland "Implement readonly storage buffer - validation at API side" 2019-11-07 07:09:07 +00:00
BindGroup.h Vulkan: Reuse descriptor pools 2019-11-05 15:44:05 +00:00
BindGroupAndStorageBarrierTracker.h Update SetBindGroup dynamic offsets to uint32_t 2019-11-01 15:51:01 +00:00
BindGroupLayout.cpp Disallow storage buffer binding in vertex shader 2019-12-19 18:50:18 +00:00
BindGroupLayout.h Only mark objects as cached right before inserting into the cache 2019-10-30 00:20:03 +00:00
BindGroupTracker.h Update SetBindGroup dynamic offsets to uint32_t 2019-11-01 15:51:01 +00:00
BuddyAllocator.cpp Rename INVALID_OFFSET to kInvalidOffset. 2019-09-27 15:11:52 +00:00
BuddyAllocator.h Rename INVALID_OFFSET to kInvalidOffset. 2019-09-27 15:11:52 +00:00
BuddyMemoryAllocator.cpp Preliminary changes to Vulkan memory suballocation 2019-10-24 21:28:16 +00:00
BuddyMemoryAllocator.h Add some missing #includes. 2019-10-29 18:40:12 +00:00
Buffer.cpp Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
Buffer.h Reland "Implement readonly storage buffer - validation at API side" 2019-11-07 07:09:07 +00:00
CachedObject.cpp Only mark objects as cached right before inserting into the cache 2019-10-30 00:20:03 +00:00
CachedObject.h Only mark objects as cached right before inserting into the cache 2019-10-30 00:20:03 +00:00
CommandAllocator.cpp Inline CommandAllocator/Iterator 2019-12-10 01:10:27 +00:00
CommandAllocator.h Inline CommandAllocator/Iterator 2019-12-10 01:10:27 +00:00
CommandBuffer.cpp Remove the "Base" from pure-frontend dawn_native types 2019-11-13 17:00:37 +00:00
CommandBuffer.h Remove the "Base" from pure-frontend dawn_native types 2019-11-13 17:00:37 +00:00
CommandBufferStateTracker.cpp Update naming for vertex state 2019-11-07 22:23:29 +00:00
CommandBufferStateTracker.h Update naming for vertex state 2019-11-07 22:23:29 +00:00
CommandEncoder.cpp Add two missing checks on render pass descriptor 2019-12-12 01:29:01 +00:00
CommandEncoder.h Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
CommandValidation.cpp Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
CommandValidation.h Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
Commands.cpp Allow SetBindGroup command to be skipped with dynamic offsets. 2019-11-18 23:09:38 +00:00
Commands.h Make dawn_native use the webgpu.h header 2019-10-23 11:57:41 +00:00
ComputePassEncoder.cpp Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
ComputePassEncoder.h Remove the "Base" from pure-frontend dawn_native types 2019-11-13 17:00:37 +00:00
ComputePipeline.cpp Implement getBindGroupLayout 2019-11-22 17:02:22 +00:00
ComputePipeline.h Only mark objects as cached right before inserting into the cache 2019-10-30 00:20:03 +00:00
DawnNative.cpp Add WGPUAdapterProperties and expose it in DawnNative 2020-01-10 13:28:18 +00:00
Device.cpp Improve Memory Management of Result class 2020-01-10 17:58:28 +00:00
Device.h Improve Memory Management of Result class 2020-01-10 17:58:28 +00:00
DynamicUploader.cpp Limit heap growth when uploading with SetSubData. 2019-10-29 22:49:43 +00:00
DynamicUploader.h Limit heap growth when uploading with SetSubData. 2019-10-29 22:49:43 +00:00
EncodingContext.cpp Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
EncodingContext.h Improve Memory Management of Result class 2020-01-10 17:58:28 +00:00
Error.h Improve Memory Management of Result class 2020-01-10 17:58:28 +00:00
ErrorData.cpp Improve Memory Management of Result class 2020-01-10 17:58:28 +00:00
ErrorData.h Improve Memory Management of Result class 2020-01-10 17:58:28 +00:00
ErrorInjector.cpp Reland "fuzzing: Add supportsErrorInjection option to DawnWireServerFuzzer" 2020-01-06 19:56:17 +00:00
ErrorInjector.h Reland "fuzzing: Add supportsErrorInjection option to DawnWireServerFuzzer" 2020-01-06 19:56:17 +00:00
ErrorScope.cpp Make dawn_native use the webgpu.h header 2019-10-23 11:57:41 +00:00
ErrorScope.h Make dawn_native use the webgpu.h header 2019-10-23 11:57:41 +00:00
ErrorScopeTracker.cpp Fixed compilation issues when using libstdc++ 2019-09-25 19:32:01 +00:00
ErrorScopeTracker.h Support ErrorScopes for asynchronous GPU execution 2019-09-17 18:24:07 +00:00
Extensions.cpp Implement querying WGPUDeviceProperties from dawn_native::Adapter 2019-11-13 01:53:25 +00:00
Extensions.h Implement querying WGPUDeviceProperties from dawn_native::Adapter 2019-11-13 01:53:25 +00:00
Fence.cpp Remove the "Base" from pure-frontend dawn_native types 2019-11-13 17:00:37 +00:00
Fence.h Remove the "Base" from pure-frontend dawn_native types 2019-11-13 17:00:37 +00:00
FenceSignalTracker.cpp Remove the "Base" from pure-frontend dawn_native types 2019-11-13 17:00:37 +00:00
FenceSignalTracker.h Remove the "Base" from pure-frontend dawn_native types 2019-11-13 17:00:37 +00:00
Format.cpp Add checks to TextureUsage::Storage 2020-01-15 00:09:42 +00:00
Format.h Add checks to TextureUsage::Storage 2020-01-15 00:09:42 +00:00
Forward.h Remove the "Base" from pure-frontend dawn_native types 2019-11-13 17:00:37 +00:00
Instance.cpp Introduce wgpu::Surface and implement it for HWND, X11 and Metal 2020-01-15 13:14:12 +00:00
Instance.h Introduce wgpu::Surface and implement it for HWND, X11 and Metal 2020-01-15 13:14:12 +00:00
ObjectBase.cpp Inline a 1 bit payload in RefCounted 2019-11-19 14:35:10 +00:00
ObjectBase.h Inline a 1 bit payload in RefCounted 2019-11-19 14:35:10 +00:00
PassResourceUsage.h Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
PassResourceUsageTracker.cpp Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
PassResourceUsageTracker.h Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
PerStage.cpp Make dawn_native use the webgpu.h header 2019-10-23 11:57:41 +00:00
PerStage.h Make dawn_native use the webgpu.h header 2019-10-23 11:57:41 +00:00
Pipeline.cpp Implement getBindGroupLayout 2019-11-22 17:02:22 +00:00
Pipeline.h Implement getBindGroupLayout 2019-11-22 17:02:22 +00:00
PipelineLayout.cpp Disallow storage buffer binding in vertex shader 2019-12-19 18:50:18 +00:00
PipelineLayout.h Implement getBindGroupLayout 2019-11-22 17:02:22 +00:00
ProgrammablePassEncoder.cpp Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
ProgrammablePassEncoder.h Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
Queue.cpp Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
Queue.h Remove the "Base" from pure-frontend dawn_native types 2019-11-13 17:00:37 +00:00
RefCounted.cpp RefCounted: use more precise barriers 2019-12-12 10:40:22 +00:00
RefCounted.h Inline a 1 bit payload in RefCounted 2019-11-19 14:35:10 +00:00
RenderBundle.cpp Remove the "Base" from pure-frontend dawn_native types 2019-11-13 17:00:37 +00:00
RenderBundle.h Remove the "Base" from pure-frontend dawn_native types 2019-11-13 17:00:37 +00:00
RenderBundleEncoder.cpp Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
RenderBundleEncoder.h Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
RenderEncoderBase.cpp Validate SetVertexBuffers' slot is less than kMaxVertexBuffers 2020-01-06 19:36:07 +00:00
RenderEncoderBase.h Change setVertexBuffers to setVertexBuffer 2019-10-10 07:29:58 +00:00
RenderPassEncoder.cpp Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
RenderPassEncoder.h Skip validation during command recording when skip_validation is on 2019-11-21 22:09:41 +00:00
RenderPipeline.cpp RenderPipeline: validate depth bias params are not NaN 2019-12-12 11:41:02 +00:00
RenderPipeline.h Remove the "Base" from pure-frontend dawn_native types 2019-11-13 17:00:37 +00:00
ResourceHeap.h Resource Management 7: Device memory sub-allocation using buddy allocator. 2019-10-03 18:17:31 +00:00
ResourceHeapAllocator.h Add another missing #include. 2019-10-30 00:19:43 +00:00
ResourceMemoryAllocation.cpp Resource Management 7: Device memory sub-allocation using buddy allocator. 2019-10-03 18:17:31 +00:00
ResourceMemoryAllocation.h Fix ResourceHeapAllocation Memory Leak 2019-11-08 21:47:00 +00:00
RingBufferAllocator.cpp Replace size_t with uint64_t in ringbuffer. 2019-10-18 16:19:00 +00:00
RingBufferAllocator.h Replace size_t with uint64_t in ringbuffer. 2019-10-18 16:19:00 +00:00
Sampler.cpp RenderPipeline: validate depth bias params are not NaN 2019-12-12 11:41:02 +00:00
Sampler.h Only mark objects as cached right before inserting into the cache 2019-10-30 00:20:03 +00:00
ShaderModule.cpp Return errors in ExtractSpirvInfo instead of sending to the device 2020-01-15 14:56:22 +00:00
ShaderModule.h Switch over to using CheckSpvcSuccess where possible 2020-01-15 16:58:23 +00:00
StagingBuffer.cpp Memory manager: buffer uploads (D3D) - Part 1 2019-01-29 00:10:07 +00:00
StagingBuffer.h Memory manager: buffer uploads (D3D) - Part 1 2019-01-29 00:10:07 +00:00
Surface.cpp Introduce wgpu::Surface and implement it for HWND, X11 and Metal 2020-01-15 13:14:12 +00:00
Surface.h Introduce wgpu::Surface and implement it for HWND, X11 and Metal 2020-01-15 13:14:12 +00:00
Surface_metal.mm Introduce wgpu::Surface and implement it for HWND, X11 and Metal 2020-01-15 13:14:12 +00:00
SwapChain.cpp Make the SwapChain interface match webgpu.h 2019-11-12 18:30:11 +00:00
SwapChain.h Make the SwapChain interface match webgpu.h 2019-11-12 18:30:11 +00:00
Texture.cpp Add checks to TextureUsage::Storage 2020-01-15 00:09:42 +00:00
Texture.h Make dawn_native use the webgpu.h header 2019-10-23 11:57:41 +00:00
ToBackend.h Resource Management 5: D3D support for resource allocation. 2019-08-27 23:36:26 +00:00
Toggles.cpp Vulkan: Choose D32S8 or D24S8 depending on availability 2019-12-05 14:02:11 +00:00
Toggles.h Vulkan: Choose D32S8 or D24S8 depending on availability 2019-12-05 14:02:11 +00:00
dawn_platform.h Make dawn_native use the webgpu.h header 2019-10-23 11:57:41 +00:00