dawn-cmake/src/dawn_native
Loko Kung 79f62081c0 Fixes bad mem-read in Vulkan's ~DescriptorSetAllocator.
Bug was a result of an external BGL reference that lingered after device was destroyed leading to a bad read on the device's FencedDeleter when the BGL reference was finally released. Fix just makes sure that the previous code path runs during the device destruction instead of afterwards.

- Removes passthrough call in BGL to the allocator and instead has the device keep track of the allocator directly so that the list can be used to both deallocate bind groups and bind group layouts at the end.
- Makes the allocator an ObjectBase so that we can have an explicit copy of the device since getting it from the layout can be dangerous now that the allocator may outlive the layout.

Bug: chromium:1276928
Change-Id: Ibca5e3c313fc0c0980ecaaa9ad2c871e204ac153
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71860
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
2021-12-08 20:27:14 +00:00
..
d3d12 Complete per-backend AdapterDiscoveryOptions 2021-12-06 20:58:56 +00:00
metal Complete per-backend AdapterDiscoveryOptions 2021-12-06 20:58:56 +00:00
null Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
opengl Replace reinterpret_cast with FromAPI/ToAPI where possible 2021-12-03 16:47:18 +00:00
utils Add label to the trace events for pipeline and shader module creation 2021-11-21 11:18:19 +00:00
vulkan Fixes bad mem-read in Vulkan's ~DescriptorSetAllocator. 2021-12-08 20:27:14 +00:00
Adapter.cpp Replace reinterpret_cast with FromAPI/ToAPI where possible 2021-12-03 16:47:18 +00:00
Adapter.h Rename DeviceDescriptor -> DawnDeviceDescriptor 2021-11-23 18:03:16 +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 Fixes Dawn to use custom Vulkan loader on Linux systems. 2021-11-29 18:18:58 +00:00
BackendConnection.cpp Various validation error improvements 2021-10-20 17:42:38 +00:00
BackendConnection.h Add WGPUAdapterProperties and expose it in DawnNative 2020-01-10 13:28:18 +00:00
BindGroup.cpp Validate that storage texture views have a single miplevel 2021-12-02 05:38:30 +00:00
BindGroup.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
BindGroupLayout.cpp Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
BindGroupLayout.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +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 Prevent size overflow for sub-allocation. 2020-06-11 18:58:26 +00:00
BuddyMemoryAllocator.h Add some missing #includes. 2019-10-29 18:40:12 +00:00
Buffer.cpp Implement GPUCommandEncoder::ClearBuffer 2021-12-02 21:43:49 +00:00
Buffer.h Implement GPUCommandEncoder::ClearBuffer 2021-12-02 21:43:49 +00:00
CMakeLists.txt Add/update destruction handling for command encoding objects 2021-11-16 22:46:34 +00:00
CachedObject.cpp Pipeline caching: refactor object hashing 2020-12-03 18:42:13 +00:00
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 Add label tracking for several object types (pt 2) 2021-11-23 00:09:25 +00:00
CommandBuffer.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
CommandBufferStateTracker.cpp Validate stripIndexFormat at draw time. 2021-12-08 17:24:37 +00:00
CommandBufferStateTracker.h Implement GPU-based validation for dispatchIndirect 2021-10-29 18:52:33 +00:00
CommandEncoder.cpp Implement GPUCommandEncoder::ClearBuffer 2021-12-02 21:43:49 +00:00
CommandEncoder.h Implement GPUCommandEncoder::ClearBuffer 2021-12-02 21:43: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 Implement GPUCommandEncoder::ClearBuffer 2021-12-02 21:43:49 +00:00
Commands.h Implement GPUCommandEncoder::ClearBuffer 2021-12-02 21:43:49 +00:00
CompilationMessages.cpp Make CompilationInfo extensible. 2021-11-16 09:25:35 +00:00
CompilationMessages.h Emit tint warning when creating shader module 2021-06-18 13:29:39 +00:00
ComputePassEncoder.cpp Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
ComputePassEncoder.h Add label tracking for several object types (pt 2) 2021-11-23 00:09:25 +00:00
ComputePipeline.cpp Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
ComputePipeline.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
CopyTextureForBrowserHelper.cpp Remove *-srgb formats from CopyTextureForBrowser() supporting lists 2021-11-23 02:18:28 +00:00
CopyTextureForBrowserHelper.h Rename Buffer/TextureCopyView to ImageCopyBuffer/Texture. 2021-03-04 18:13:45 +00:00
CreatePipelineAsyncTask.cpp Replace reinterpret_cast with FromAPI/ToAPI where possible 2021-12-03 16:47:18 +00:00
CreatePipelineAsyncTask.h Avoid redundant creation of ComputePipelineBase in GetCachedComputePipeline 2021-10-13 00:43:05 +00:00
DawnNative.cpp Replace reinterpret_cast with FromAPI/ToAPI where possible 2021-12-03 16:47:18 +00:00
Device.cpp Replace reinterpret_cast with FromAPI/ToAPI where possible 2021-12-03 16:47:18 +00:00
Device.h Expose device.destroy upwards and add end2end tests 2021-12-01 17:55:30 +00:00
DynamicUploader.cpp Rolling build dependencies for new d3dcompiler_47.dll 2021-06-23 09:22:22 +00:00
DynamicUploader.h Use typed integers for the ExecutionSerial 2020-09-28 19:35:14 +00:00
EncodingContext.cpp Add/update destruction handling for command encoding objects 2021-11-16 22:46:34 +00:00
EncodingContext.h Add/update destruction handling for command encoding objects 2021-11-16 22:46:34 +00:00
EnumClassBitmasks.h Move EnumClassBitmasks from wgpu to dawn namespace 2021-12-08 05:46:17 +00:00
EnumMaskIterator.h EnumMaskIterator: ASSERT when the mask is too big. 2021-01-21 10:11:54 +00:00
Error.cpp Fix AssertAndIgnoreDeviceLossError to handle errors injected by fuzzer 2020-06-16 17:53:38 +00:00
Error.h Support multiple Vulkan instances in the Vulkan backend 2021-12-06 19:31:12 +00:00
ErrorData.cpp Add descriptive error contexts to adapter initialization 2021-11-16 00:50:04 +00:00
ErrorData.h Add debug group logging to validation errors 2021-09-29 19:39:02 +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 Remove wgpu::ErrorFilter::None 2021-12-08 02:42:17 +00:00
ErrorScope.h Simplify ErrorScopes 2021-02-19 18:17:22 +00:00
ExternalTexture.cpp Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
ExternalTexture.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
Features.cpp Add features of depth24unorm-stencil8 and depth32float-stencil8 texture formats 2021-11-25 01:11:57 +00:00
Features.h Add features of depth24unorm-stencil8 and depth32float-stencil8 texture formats 2021-11-25 01:11:57 +00:00
Format.cpp Add features of depth24unorm-stencil8 and depth32float-stencil8 texture formats 2021-11-25 01:11:57 +00:00
Format.h Move EnumClassBitmasks from wgpu to dawn namespace 2021-12-08 05:46:17 +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 Copy some WGPUHelpers into dawn_native to simplify reentrant code 2021-11-04 22:21:20 +00:00
IndirectDrawValidationEncoder.h Remove several compile-time constants in favor of limits 2021-10-13 18:57:18 +00:00
Instance.cpp Support multiple Vulkan instances in the Vulkan backend 2021-12-06 19:31:12 +00:00
Instance.h Don't connect to backends that aren't needed 2021-12-02 18:12:57 +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 Revert "Bump maxUniformBindingSize to 2^16 from 2^14" 2021-12-06 23:06:09 +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 Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
ObjectBase.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
ObjectContentHasher.cpp Pipeline caching: refactor object hashing 2020-12-03 18:42:13 +00:00
ObjectContentHasher.h Rename STRIDE_UNDEFINED to COPY_STRIDE_UNDEFINED 2020-12-16 07:53:30 +00:00
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 Replace reinterpret_cast with FromAPI/ToAPI where possible 2021-12-03 16:47:18 +00:00
PersistentCache.h D3D12: Support creating compute pipeline asynchronously 2021-06-04 05:12:06 +00:00
Pipeline.cpp Pipeline overridable constants: D3D12 backend 2021-11-18 17:47:45 +00:00
Pipeline.h Pipeline overridable constants: D3D12 backend 2021-11-18 17:47:45 +00:00
PipelineLayout.cpp Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
PipelineLayout.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
PooledResourceMemoryAllocator.cpp Rename STRIDE_UNDEFINED to COPY_STRIDE_UNDEFINED 2020-12-16 07:53:30 +00:00
PooledResourceMemoryAllocator.h Pool sub-allocated resource heaps. 2020-08-17 17:47:15 +00:00
ProgrammableEncoder.cpp Add label tracking for several object types (pt 2) 2021-11-23 00:09:25 +00:00
ProgrammableEncoder.h Add label tracking for several object types (pt 2) 2021-11-23 00:09:25 +00:00
QueryHelper.cpp Copy some WGPUHelpers into dawn_native to simplify reentrant code 2021-11-04 22:21:20 +00:00
QueryHelper.h Fix query index of availability in timestamp shader 2021-05-18 01:13:08 +00:00
QuerySet.cpp Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
QuerySet.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
Queue.cpp Align offset to 4 bytes in writeTexture on depth stencil textures 2021-12-07 01:33:36 +00:00
Queue.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
RenderBundle.cpp Add/update destruction handling for command encoding objects 2021-11-16 22:46:34 +00:00
RenderBundle.h Add/update destruction handling for command encoding objects 2021-11-16 22:46:34 +00:00
RenderBundleEncoder.cpp Add label tracking for several object types (pt 2) 2021-11-23 00:09:25 +00:00
RenderBundleEncoder.h Add/update destruction handling for command encoding objects 2021-11-16 22:46:34 +00:00
RenderEncoderBase.cpp Add label tracking for several object types (pt 2) 2021-11-23 00:09:25 +00:00
RenderEncoderBase.h Add label tracking for several object types (pt 2) 2021-11-23 00:09:25 +00:00
RenderPassEncoder.cpp Add label tracking for several object types (pt 2) 2021-11-23 00:09:25 +00:00
RenderPassEncoder.h Add label tracking for several object types (pt 2) 2021-11-23 00:09:25 +00:00
RenderPipeline.cpp Validate stripIndexFormat at draw time. 2021-12-08 17:24:37 +00:00
RenderPipeline.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
ResourceHeap.h Autoformat everything except tests/examples 2020-07-10 18:19:38 +00:00
ResourceHeapAllocator.h Add another missing #include. 2019-10-30 00:19:43 +00:00
ResourceMemoryAllocation.cpp Autoformat everything except tests/examples 2020-07-10 18:19:38 +00:00
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 Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
Sampler.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +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 Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
ShaderModule.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +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 Autoformat everything except tests/examples 2020-07-10 18:19:38 +00:00
StagingBuffer.h Autoformat everything except tests/examples 2020-07-10 18:19:38 +00:00
Subresource.cpp Fix all GCC 10 warnings 2021-09-23 17:34:53 +00:00
Subresource.h Move EnumClassBitmasks from wgpu to dawn namespace 2021-12-08 05:46:17 +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 Introduce wgpu::Surface and implement it for HWND, X11 and Metal 2020-01-15 13:14:12 +00:00
SwapChain.cpp Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
SwapChain.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
Texture.cpp Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +00:00
Texture.h Refactors Destroy to be upward calls instead of overriding. 2021-12-01 18:54:40 +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 Add "fxc_optimizations" toggle set to false by default 2021-11-25 13:24:50 +00:00
Toggles.h Add "fxc_optimizations" toggle set to false by default 2021-11-25 13:24:50 +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 Reland "Vulkan: Fallback to XCB for Xlib surfaces" 2021-02-11 08:26:38 +00:00
XlibXcbFunctions.h Reland "Vulkan: Fallback to XCB for Xlib surfaces" 2021-02-11 08:26:38 +00:00
dawn_platform.h Don't connect to backends that aren't needed 2021-12-02 18:12:57 +00:00