dawn-cmake/src/dawn_native
Natasha Lee 20b0c33913 Buffer DestroyImpl check for buffer resource to avoid double free
Double free was happening if buffer.Destroy() was called right
before the buffer went out of scope since DestroyImpl wouldn't
check to see if the resource was already released.

Also refactor Destroy in Texture classes to match the pattern
of Buffer classes. Added validation of the texture object when
Destroy is called.

Bug: dawn:124, chromium:947323
Change-Id: I0e4a652ff5b86a151b4919c781c1dd385b4e3213
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6060
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Natasha Lee <natlee@microsoft.com>
2019-04-01 19:49:04 +00:00
..
d3d12 Buffer DestroyImpl check for buffer resource to avoid double free 2019-04-01 19:49:04 +00:00
metal Buffer DestroyImpl check for buffer resource to avoid double free 2019-04-01 19:49:04 +00:00
null Destroy frontend and backend for Textures 2019-03-27 22:04:10 +00:00
opengl Buffer DestroyImpl check for buffer resource to avoid double free 2019-04-01 19:49:04 +00:00
vulkan Buffer DestroyImpl check for buffer resource to avoid double free 2019-04-01 19:49:04 +00:00
Adapter.cpp dawn_native: Add Instance and Adapters 2019-01-04 10:30:40 +00:00
Adapter.h Gather PCI device info through the adapter when possible 2019-01-10 10:50:54 +00:00
BackendConnection.cpp OpenGL: Implement the backend connection and adapter. 2019-01-07 09:48:03 +00:00
BackendConnection.h OpenGL: Implement the backend connection and adapter. 2019-01-07 09:48:03 +00:00
BindGroup.cpp Make dawn idl support dynamic buffer offset 2019-03-18 06:01:37 +00:00
BindGroup.h WebGPU error handling 1: Return error objects on errors. 2019-02-13 13:09:18 +00:00
BindGroupLayout.cpp Rename several parameters to match WebGPU IDL 2019-02-21 00:45:19 +00:00
BindGroupLayout.h WebGPU error handling 1: Return error objects on errors. 2019-02-13 13:09:18 +00:00
Buffer.cpp Buffer DestroyImpl check for buffer resource to avoid double free 2019-04-01 19:49:04 +00:00
Buffer.h Buffer DestroyImpl check for buffer resource to avoid double free 2019-04-01 19:49:04 +00:00
CommandAllocator.cpp Fix overflow in CommandAllocator 2019-03-01 12:04:58 +00:00
CommandAllocator.h Fix overflow in CommandAllocator 2019-03-01 12:04:58 +00:00
CommandBuffer.cpp WebGPU error handling 5: Move CmdBufBuilder logic to CmdEncoder 2019-02-20 11:46:16 +00:00
CommandBuffer.h WebGPU error handling 5: Move CmdBufBuilder logic to CmdEncoder 2019-02-20 11:46:16 +00:00
CommandBufferStateTracker.cpp Fix null pointer dereference in CommandBufferStateTracker 2019-03-28 15:28:01 +00:00
CommandBufferStateTracker.h WebGPU error handling 5: Move CmdBufBuilder logic to CmdEncoder 2019-02-20 11:46:16 +00:00
CommandEncoder.cpp CommandEncoder: prevent calls even after a failed finish 2019-03-28 14:10:01 +00:00
CommandEncoder.h Implement Texture-to-Texture Copies 2019-03-26 11:06:23 +00:00
Commands.cpp Implement Texture-to-Texture Copies 2019-03-26 11:06:23 +00:00
Commands.h Implement Texture-to-Texture Copies 2019-03-26 11:06:23 +00:00
ComputePassEncoder.cpp Return an error ComputePassEncoder when error occurs in BeginComputePass 2019-03-05 01:02:47 +00:00
ComputePassEncoder.h Return an error ComputePassEncoder when error occurs in BeginComputePass 2019-03-05 01:02:47 +00:00
ComputePipeline.cpp WebGPU error handling 1: Return error objects on errors. 2019-02-13 13:09:18 +00:00
ComputePipeline.h WebGPU error handling 1: Return error objects on errors. 2019-02-13 13:09:18 +00:00
DawnNative.cpp Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00
Device.cpp Input State Descriptorization 2019-03-27 18:08:50 +00:00
Device.h Nuke Builders Part 1: remove the testing BufferBuilder. 2019-03-28 17:12:47 +00:00
DynamicUploader.cpp Memory manager: buffer uploads (Metal+refactor) - Part 3 2019-02-15 21:18:40 +00:00
DynamicUploader.h Memory manager: buffer uploads (Metal+refactor) - Part 3 2019-02-15 21:18:40 +00:00
Error.cpp Vulkan: Handle errors on device creation. 2018-12-03 12:49:56 +00:00
Error.h WebGPU error handling 1: Return error objects on errors. 2019-02-13 13:09:18 +00:00
ErrorData.cpp Make Dawn error macro more explicit and have an "error type" 2018-09-11 07:55:27 -04:00
ErrorData.h Make Dawn error macro more explicit and have an "error type" 2018-09-11 07:55:27 -04:00
Fence.cpp Move CreateFence from Device to Queue 2019-03-06 22:42:22 +00:00
Fence.h Move CreateFence from Device to Queue 2019-03-06 22:42:22 +00:00
FenceSignalTracker.cpp Implement timeline fences in Dawn 2018-12-03 16:57:34 +00:00
FenceSignalTracker.h Implement timeline fences in Dawn 2018-12-03 16:57:34 +00:00
Forward.h Input State Descriptorization 2019-03-27 18:08:50 +00:00
Instance.cpp Reorder backend connections so that explicit APIs come first 2019-03-11 17:16:52 +00:00
Instance.h Instance: Only discover default adapters once. 2019-02-25 17:42:56 +00:00
ObjectBase.cpp WebGPU error handling 1: Return error objects on errors. 2019-02-13 13:09:18 +00:00
ObjectBase.h WebGPU error handling 1: Return error objects on errors. 2019-02-13 13:09:18 +00:00
PassResourceUsage.h Validate that mapped buffers aren't used in submits. 2018-11-07 10:02:43 +00:00
PerStage.cpp dawn_native: Fixup namespace from backend:: to dawn_native:: 2018-07-25 11:27:55 +02:00
PerStage.h Descriptorize ComputePipeline 2018-09-05 08:32:53 -04:00
Pipeline.cpp Input State Descriptorization 2019-03-27 18:08:50 +00:00
Pipeline.h Nuke Builders Part 1: remove the testing BufferBuilder. 2019-03-28 17:12:47 +00:00
PipelineLayout.cpp Rename several parameters to match WebGPU IDL 2019-02-21 00:45:19 +00:00
PipelineLayout.h WebGPU error handling 1: Return error objects on errors. 2019-02-13 13:09:18 +00:00
ProgrammablePassEncoder.cpp Make dawn idl support dynamic buffer offset 2019-03-18 06:01:37 +00:00
ProgrammablePassEncoder.h Make dawn idl support dynamic buffer offset 2019-03-18 06:01:37 +00:00
Queue.cpp Move CreateFence from Device to Queue 2019-03-06 22:42:22 +00:00
Queue.h Nuke Builders Part 1: remove the testing BufferBuilder. 2019-03-28 17:12:47 +00:00
RefCounted.cpp dawn_native: Fixup namespace from backend:: to dawn_native:: 2018-07-25 11:27:55 +02:00
RefCounted.h dawn_native: Fixup namespace from backend:: to dawn_native:: 2018-07-25 11:27:55 +02:00
RenderPassEncoder.cpp Return an error ComputePassEncoder when error occurs in BeginComputePass 2019-03-05 01:02:47 +00:00
RenderPassEncoder.h Return an error ComputePassEncoder when error occurs in BeginComputePass 2019-03-05 01:02:47 +00:00
RenderPipeline.cpp Move vertex index format from RenderPipelineDesc to InputStateDesc 2019-03-28 17:09:23 +00:00
RenderPipeline.h Move vertex index format from RenderPipelineDesc to InputStateDesc 2019-03-28 17:09:23 +00:00
RingBuffer.cpp Memory manager: buffer uploads (Metal+refactor) - Part 3 2019-02-15 21:18:40 +00:00
RingBuffer.h Fix missing include for std::unique_ptr in RingBuffer.h 2019-01-30 16:27:28 +00:00
Sampler.cpp WebGPU error handling 1: Return error objects on errors. 2019-02-13 13:09:18 +00:00
Sampler.h WebGPU error handling 1: Return error objects on errors. 2019-02-13 13:09:18 +00:00
ShaderModule.cpp WebGPU error handling 1: Return error objects on errors. 2019-02-13 13:09:18 +00:00
ShaderModule.h Nuke Builders Part 1: remove the testing BufferBuilder. 2019-03-28 17:12:47 +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
SwapChain.cpp Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00
SwapChain.h Nuke Builders Part 1: remove the testing BufferBuilder. 2019-03-28 17:12:47 +00:00
Texture.cpp Buffer DestroyImpl check for buffer resource to avoid double free 2019-04-01 19:49:04 +00:00
Texture.h Buffer DestroyImpl check for buffer resource to avoid double free 2019-04-01 19:49:04 +00:00
ToBackend.h Input State Descriptorization 2019-03-27 18:08:50 +00:00
dawn_platform.h Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00