From 818001d32ea782c784d42dbaedf66868a31cc9af Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Fri, 4 Feb 2022 17:07:46 +0000 Subject: [PATCH] tint->dawn: Move src/dawn_native -> src/dawn/native Bug: dawn:1275 Change-Id: Ic60a00107a015bc677ff929c492f1085ffc38482 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79083 Reviewed-by: Corentin Wallez Commit-Queue: Ben Clayton --- BUILD.gn | 2 +- CMakeLists.txt | 2 +- docs/dawn/codegen.md | 2 +- docs/dawn/device_facilities.md | 8 +- docs/dawn/overview.md | 2 +- examples/BUILD.gn | 3 +- examples/ManualSwapChainTest.cpp | 2 +- examples/SampleUtils.cpp | 2 +- generator/BUILD.gn | 2 +- generator/dawn_generator.gni | 6 +- generator/dawn_json_generator.py | 34 +- generator/opengl_loader_generator.py | 6 +- .../native}/ChainUtils.cpp | 2 +- .../{dawn_native => dawn/native}/ChainUtils.h | 2 +- .../native}/ObjectType.cpp | 2 +- .../{dawn_native => dawn/native}/ObjectType.h | 0 .../native}/ProcTable.cpp | 2 +- .../native}/ValidationUtils.cpp | 2 +- .../native}/ValidationUtils.h | 2 +- .../native}/api_absl_format.cpp | 2 +- .../native}/api_absl_format.h | 2 +- .../native}/api_dawn_native_proc.cpp | 2 +- .../native}/api_structs.cpp | 2 +- .../native}/api_structs.h | 2 +- .../native}/dawn_platform.h | 2 +- .../templates/opengl/OpenGLFunctionsBase.cpp | 2 +- .../templates/opengl/OpenGLFunctionsBase.h | 4 +- src/{dawn_native => dawn/native}/Adapter.cpp | 8 +- src/{dawn_native => dawn/native}/Adapter.h | 10 +- .../native}/AsyncTask.cpp | 2 +- src/{dawn_native => dawn/native}/AsyncTask.h | 0 .../native}/AttachmentState.cpp | 8 +- .../native}/AttachmentState.h | 8 +- src/dawn/native/BUILD.gn | 776 ++++++++++++++++++ .../native}/BackendConnection.cpp | 2 +- .../native}/BackendConnection.h | 4 +- .../native}/BindGroup.cpp | 20 +- src/{dawn_native => dawn/native}/BindGroup.h | 10 +- .../native}/BindGroupLayout.cpp | 16 +- .../native}/BindGroupLayout.h | 12 +- .../native}/BindGroupTracker.h | 6 +- .../native}/BindingInfo.cpp | 4 +- .../native}/BindingInfo.h | 10 +- .../native}/BuddyAllocator.cpp | 2 +- .../native}/BuddyAllocator.h | 0 .../native}/BuddyMemoryAllocator.cpp | 4 +- .../native}/BuddyMemoryAllocator.h | 6 +- src/{dawn_native => dawn/native}/Buffer.cpp | 16 +- src/{dawn_native => dawn/native}/Buffer.h | 10 +- .../native}/CMakeLists.txt | 18 +- .../native}/CachedObject.cpp | 2 +- .../native}/CachedObject.h | 0 .../native}/CallbackTaskManager.cpp | 2 +- .../native}/CallbackTaskManager.h | 0 .../native}/CommandAllocator.cpp | 2 +- .../native}/CommandAllocator.h | 0 .../native}/CommandBuffer.cpp | 16 +- .../native}/CommandBuffer.h | 14 +- .../native}/CommandBufferStateTracker.cpp | 16 +- .../native}/CommandBufferStateTracker.h | 6 +- .../native}/CommandEncoder.cpp | 36 +- .../native}/CommandEncoder.h | 10 +- .../native}/CommandValidation.cpp | 22 +- .../native}/CommandValidation.h | 6 +- src/{dawn_native => dawn/native}/Commands.cpp | 18 +- src/{dawn_native => dawn/native}/Commands.h | 8 +- .../native}/CompilationMessages.cpp | 4 +- .../native}/CompilationMessages.h | 2 +- .../native}/ComputePassEncoder.cpp | 28 +- .../native}/ComputePassEncoder.h | 10 +- .../native}/ComputePipeline.cpp | 8 +- .../native}/ComputePipeline.h | 4 +- .../native}/CopyTextureForBrowserHelper.cpp | 32 +- .../native}/CopyTextureForBrowserHelper.h | 4 +- .../native}/CreatePipelineAsyncTask.cpp | 12 +- .../native}/CreatePipelineAsyncTask.h | 4 +- .../native}/DawnNative.cpp | 12 +- src/{dawn_native => dawn/native}/Device.cpp | 62 +- src/{dawn_native => dawn/native}/Device.h | 33 +- .../native}/DynamicUploader.cpp | 4 +- .../native}/DynamicUploader.h | 8 +- .../native}/EncodingContext.cpp | 14 +- .../native}/EncodingContext.h | 12 +- .../native}/EnumClassBitmasks.h | 0 .../native}/EnumMaskIterator.h | 2 +- src/{dawn_native => dawn/native}/Error.cpp | 6 +- src/{dawn_native => dawn/native}/Error.h | 4 +- .../native}/ErrorData.cpp | 8 +- src/{dawn_native => dawn/native}/ErrorData.h | 0 .../native}/ErrorInjector.cpp | 4 +- .../native}/ErrorInjector.h | 0 .../native}/ErrorScope.cpp | 2 +- src/{dawn_native => dawn/native}/ErrorScope.h | 2 +- .../native}/ExternalTexture.cpp | 14 +- .../native}/ExternalTexture.h | 8 +- src/{dawn_native => dawn/native}/Features.cpp | 2 +- src/{dawn_native => dawn/native}/Features.h | 2 +- src/{dawn_native => dawn/native}/Format.cpp | 10 +- src/{dawn_native => dawn/native}/Format.h | 8 +- src/{dawn_native => dawn/native}/Forward.h | 0 .../native}/IndirectDrawMetadata.cpp | 8 +- .../native}/IndirectDrawMetadata.h | 6 +- .../native}/IndirectDrawValidationEncoder.cpp | 20 +- .../native}/IndirectDrawValidationEncoder.h | 4 +- src/{dawn_native => dawn/native}/Instance.cpp | 14 +- src/{dawn_native => dawn/native}/Instance.h | 10 +- .../native}/IntegerTypes.h | 0 .../native}/InternalPipelineStore.cpp | 10 +- .../native}/InternalPipelineStore.h | 6 +- src/{dawn_native => dawn/native}/Limits.cpp | 2 +- src/{dawn_native => dawn/native}/Limits.h | 4 +- .../native}/ObjectBase.cpp | 4 +- src/{dawn_native => dawn/native}/ObjectBase.h | 2 +- .../native}/ObjectContentHasher.cpp | 2 +- .../native}/ObjectContentHasher.h | 0 .../native}/PassResourceUsage.h | 4 +- .../native}/PassResourceUsageTracker.cpp | 16 +- .../native}/PassResourceUsageTracker.h | 4 +- src/{dawn_native => dawn/native}/PerStage.cpp | 2 +- src/{dawn_native => dawn/native}/PerStage.h | 4 +- .../native}/PersistentCache.cpp | 4 +- .../native}/PersistentCache.h | 2 +- src/{dawn_native => dawn/native}/Pipeline.cpp | 14 +- src/{dawn_native => dawn/native}/Pipeline.h | 14 +- .../native}/PipelineLayout.cpp | 12 +- .../native}/PipelineLayout.h | 12 +- .../native}/PooledResourceMemoryAllocator.cpp | 4 +- .../native}/PooledResourceMemoryAllocator.h | 2 +- .../native}/ProgrammableEncoder.cpp | 16 +- .../native}/ProgrammableEncoder.h | 12 +- .../native}/QueryHelper.cpp | 20 +- .../native}/QueryHelper.h | 4 +- src/{dawn_native => dawn/native}/QuerySet.cpp | 10 +- src/{dawn_native => dawn/native}/QuerySet.h | 8 +- src/{dawn_native => dawn/native}/Queue.cpp | 30 +- src/{dawn_native => dawn/native}/Queue.h | 10 +- .../native}/RenderBundle.cpp | 10 +- .../native}/RenderBundle.h | 16 +- .../native}/RenderBundleEncoder.cpp | 16 +- .../native}/RenderBundleEncoder.h | 10 +- .../native}/RenderEncoderBase.cpp | 16 +- .../native}/RenderEncoderBase.h | 12 +- .../native}/RenderPassEncoder.cpp | 20 +- .../native}/RenderPassEncoder.h | 6 +- .../native}/RenderPipeline.cpp | 18 +- .../native}/RenderPipeline.h | 10 +- .../native}/ResourceHeap.h | 2 +- .../native}/ResourceHeapAllocator.h | 4 +- .../native}/ResourceMemoryAllocation.cpp | 2 +- .../native}/ResourceMemoryAllocation.h | 0 .../native}/RingBufferAllocator.cpp | 2 +- .../native}/RingBufferAllocator.h | 2 +- src/{dawn_native => dawn/native}/Sampler.cpp | 8 +- src/{dawn_native => dawn/native}/Sampler.h | 10 +- .../native}/ScratchBuffer.cpp | 4 +- .../native}/ScratchBuffer.h | 2 +- .../native}/ShaderModule.cpp | 20 +- .../native}/ShaderModule.h | 22 +- .../native}/SpirvValidation.cpp | 4 +- .../native}/SpirvValidation.h | 2 +- .../native}/StagingBuffer.cpp | 2 +- .../native}/StagingBuffer.h | 2 +- .../native}/Subresource.cpp | 4 +- .../native}/Subresource.h | 4 +- .../native}/SubresourceStorage.h | 6 +- src/{dawn_native => dawn/native}/Surface.cpp | 8 +- src/{dawn_native => dawn/native}/Surface.h | 8 +- .../native}/Surface_metal.mm | 0 .../native}/SwapChain.cpp | 14 +- src/{dawn_native => dawn/native}/SwapChain.h | 8 +- src/{dawn_native => dawn/native}/Texture.cpp | 16 +- src/{dawn_native => dawn/native}/Texture.h | 10 +- .../native}/TintUtils.cpp | 6 +- src/{dawn_native => dawn/native}/TintUtils.h | 0 src/{dawn_native => dawn/native}/ToBackend.h | 2 +- src/{dawn_native => dawn/native}/Toggles.cpp | 2 +- src/{dawn_native => dawn/native}/Toggles.h | 2 +- .../native}/VertexFormat.cpp | 2 +- .../native}/VertexFormat.h | 2 +- .../native}/XlibXcbFunctions.cpp | 2 +- .../native}/XlibXcbFunctions.h | 2 +- .../native}/d3d12/AdapterD3D12.cpp | 12 +- .../native}/d3d12/AdapterD3D12.h | 6 +- .../native}/d3d12/BackendD3D12.cpp | 12 +- .../native}/d3d12/BackendD3D12.h | 4 +- .../native}/d3d12/BindGroupD3D12.cpp | 16 +- .../native}/d3d12/BindGroupD3D12.h | 6 +- .../native}/d3d12/BindGroupLayoutD3D12.cpp | 10 +- .../native}/d3d12/BindGroupLayoutD3D12.h | 4 +- .../native}/d3d12/BufferD3D12.cpp | 18 +- .../native}/d3d12/BufferD3D12.h | 6 +- .../CPUDescriptorHeapAllocationD3D12.cpp | 4 +- .../d3d12/CPUDescriptorHeapAllocationD3D12.h | 2 +- .../native}/d3d12/CommandAllocatorManager.cpp | 6 +- .../native}/d3d12/CommandAllocatorManager.h | 6 +- .../native}/d3d12/CommandBufferD3D12.cpp | 41 +- .../native}/d3d12/CommandBufferD3D12.h | 4 +- .../native}/d3d12/CommandRecordingContext.cpp | 12 +- .../native}/d3d12/CommandRecordingContext.h | 8 +- .../native}/d3d12/ComputePipelineD3D12.cpp | 16 +- .../native}/d3d12/ComputePipelineD3D12.h | 4 +- .../native}/d3d12/D3D11on12Util.cpp | 8 +- .../native}/d3d12/D3D11on12Util.h | 6 +- .../native}/d3d12/D3D12Backend.cpp | 12 +- .../native}/d3d12/D3D12Error.cpp | 2 +- .../native}/d3d12/D3D12Error.h | 4 +- .../native}/d3d12/D3D12Info.cpp | 10 +- .../native}/d3d12/D3D12Info.h | 6 +- .../native}/d3d12/DeviceD3D12.cpp | 54 +- .../native}/d3d12/DeviceD3D12.h | 10 +- .../native}/d3d12/Forward.h | 2 +- .../GPUDescriptorHeapAllocationD3D12.cpp | 2 +- .../d3d12/GPUDescriptorHeapAllocationD3D12.h | 6 +- .../native}/d3d12/HeapAllocatorD3D12.cpp | 10 +- .../native}/d3d12/HeapAllocatorD3D12.h | 6 +- .../native}/d3d12/HeapD3D12.cpp | 2 +- .../native}/d3d12/HeapD3D12.h | 6 +- .../native}/d3d12/IntegerTypes.h | 0 .../d3d12/NativeSwapChainImplD3D12.cpp | 6 +- .../native}/d3d12/NativeSwapChainImplD3D12.h | 6 +- .../native}/d3d12/PageableD3D12.cpp | 2 +- .../native}/d3d12/PageableD3D12.h | 6 +- .../native}/d3d12/PipelineLayoutD3D12.cpp | 10 +- .../native}/d3d12/PipelineLayoutD3D12.h | 6 +- .../native}/d3d12/PlatformFunctions.cpp | 2 +- .../native}/d3d12/PlatformFunctions.h | 4 +- .../native}/d3d12/QuerySetD3D12.cpp | 8 +- .../native}/d3d12/QuerySetD3D12.h | 4 +- .../native}/d3d12/QueueD3D12.cpp | 14 +- .../native}/d3d12/QueueD3D12.h | 6 +- .../native}/d3d12/RenderPassBuilderD3D12.cpp | 12 +- .../native}/d3d12/RenderPassBuilderD3D12.h | 6 +- .../native}/d3d12/RenderPipelineD3D12.cpp | 18 +- .../native}/d3d12/RenderPipelineD3D12.h | 6 +- .../native}/d3d12/ResidencyManagerD3D12.cpp | 12 +- .../native}/d3d12/ResidencyManagerD3D12.h | 8 +- .../d3d12/ResourceAllocatorManagerD3D12.cpp | 14 +- .../d3d12/ResourceAllocatorManagerD3D12.h | 10 +- .../d3d12/ResourceHeapAllocationD3D12.cpp | 6 +- .../d3d12/ResourceHeapAllocationD3D12.h | 6 +- .../native}/d3d12/SamplerD3D12.cpp | 6 +- .../native}/d3d12/SamplerD3D12.h | 4 +- .../native}/d3d12/SamplerHeapCacheD3D12.cpp | 16 +- .../native}/d3d12/SamplerHeapCacheD3D12.h | 6 +- .../native}/d3d12/ShaderModuleD3D12.cpp | 18 +- .../native}/d3d12/ShaderModuleD3D12.h | 6 +- .../ShaderVisibleDescriptorAllocatorD3D12.cpp | 10 +- .../ShaderVisibleDescriptorAllocatorD3D12.h | 10 +- .../native}/d3d12/StagingBufferD3D12.cpp | 12 +- .../native}/d3d12/StagingBufferD3D12.h | 6 +- .../d3d12/StagingDescriptorAllocatorD3D12.cpp | 6 +- .../d3d12/StagingDescriptorAllocatorD3D12.h | 4 +- .../native}/d3d12/SwapChainD3D12.cpp | 16 +- .../native}/d3d12/SwapChainD3D12.h | 12 +- .../native}/d3d12/TextureCopySplitter.cpp | 6 +- .../native}/d3d12/TextureCopySplitter.h | 2 +- .../native}/d3d12/TextureD3D12.cpp | 30 +- .../native}/d3d12/TextureD3D12.h | 14 +- .../native}/d3d12/UtilsD3D12.cpp | 12 +- .../native}/d3d12/UtilsD3D12.h | 12 +- .../native}/d3d12/d3d12_platform.h | 0 .../native}/dawn_platform.h | 2 +- .../native}/metal/BackendMTL.h | 2 +- .../native}/metal/BackendMTL.mm | 10 +- .../native}/metal/BindGroupLayoutMTL.h | 2 +- .../native}/metal/BindGroupLayoutMTL.mm | 4 +- .../native}/metal/BindGroupMTL.h | 2 +- .../native}/metal/BindGroupMTL.mm | 6 +- .../native}/metal/BufferMTL.h | 2 +- .../native}/metal/BufferMTL.mm | 8 +- .../native}/metal/CommandBufferMTL.h | 4 +- .../native}/metal/CommandBufferMTL.mm | 41 +- .../native}/metal/CommandRecordingContext.h | 2 +- .../native}/metal/CommandRecordingContext.mm | 2 +- .../native}/metal/ComputePipelineMTL.h | 2 +- .../native}/metal/ComputePipelineMTL.mm | 10 +- .../native}/metal/DeviceMTL.h | 10 +- .../native}/metal/DeviceMTL.mm | 40 +- .../native}/metal/Forward.h | 2 +- .../native}/metal/MetalBackend.mm | 6 +- .../native}/metal/PipelineLayoutMTL.h | 6 +- .../native}/metal/PipelineLayoutMTL.mm | 6 +- .../native}/metal/QuerySetMTL.h | 2 +- .../native}/metal/QuerySetMTL.mm | 4 +- .../native}/metal/QueueMTL.h | 2 +- .../native}/metal/QueueMTL.mm | 14 +- .../native}/metal/RenderPipelineMTL.h | 2 +- .../native}/metal/RenderPipelineMTL.mm | 16 +- .../native}/metal/SamplerMTL.h | 2 +- .../native}/metal/SamplerMTL.mm | 6 +- .../native}/metal/ShaderModuleMTL.h | 4 +- .../native}/metal/ShaderModuleMTL.mm | 12 +- .../native}/metal/StagingBufferMTL.h | 2 +- .../native}/metal/StagingBufferMTL.mm | 4 +- .../native}/metal/SwapChainMTL.h | 2 +- .../native}/metal/SwapChainMTL.mm | 8 +- .../native}/metal/TextureMTL.h | 4 +- .../native}/metal/TextureMTL.mm | 12 +- .../native}/metal/UtilsMetal.h | 8 +- .../native}/metal/UtilsMetal.mm | 8 +- .../native}/null/DeviceNull.cpp | 12 +- .../native}/null/DeviceNull.h | 40 +- .../native}/null/NullBackend.cpp | 4 +- .../native}/opengl/BackendGL.cpp | 8 +- .../native}/opengl/BackendGL.h | 2 +- .../native}/opengl/BindGroupGL.cpp | 8 +- .../native}/opengl/BindGroupGL.h | 2 +- .../native}/opengl/BindGroupLayoutGL.cpp | 4 +- .../native}/opengl/BindGroupLayoutGL.h | 2 +- .../native}/opengl/BufferGL.cpp | 6 +- .../native}/opengl/BufferGL.h | 4 +- .../native}/opengl/CommandBufferGL.cpp | 36 +- .../native}/opengl/CommandBufferGL.h | 2 +- .../native}/opengl/ComputePipelineGL.cpp | 4 +- .../native}/opengl/ComputePipelineGL.h | 6 +- .../native}/opengl/DeviceGL.cpp | 36 +- .../native}/opengl/DeviceGL.h | 12 +- .../native}/opengl/Forward.h | 2 +- .../native}/opengl/GLFormat.cpp | 2 +- .../native}/opengl/GLFormat.h | 4 +- .../native}/opengl/NativeSwapChainImplGL.cpp | 4 +- .../native}/opengl/NativeSwapChainImplGL.h | 6 +- .../native}/opengl/OWNERS | 0 .../native}/opengl/OpenGLBackend.cpp | 6 +- .../native}/opengl/OpenGLFunctions.cpp | 2 +- .../native}/opengl/OpenGLFunctions.h | 4 +- .../native}/opengl/OpenGLVersion.cpp | 2 +- .../native}/opengl/OpenGLVersion.h | 2 +- .../opengl/PersistentPipelineStateGL.cpp | 4 +- .../opengl/PersistentPipelineStateGL.h | 4 +- .../native}/opengl/PipelineGL.cpp | 18 +- .../native}/opengl/PipelineGL.h | 6 +- .../native}/opengl/PipelineLayoutGL.cpp | 6 +- .../native}/opengl/PipelineLayoutGL.h | 6 +- .../native}/opengl/QuerySetGL.cpp | 4 +- .../native}/opengl/QuerySetGL.h | 2 +- .../native}/opengl/QueueGL.cpp | 10 +- .../native}/opengl/QueueGL.h | 2 +- .../native}/opengl/RenderPipelineGL.cpp | 10 +- .../native}/opengl/RenderPipelineGL.h | 6 +- .../native}/opengl/SamplerGL.cpp | 6 +- .../native}/opengl/SamplerGL.h | 4 +- .../native}/opengl/ShaderModuleGL.cpp | 14 +- .../native}/opengl/ShaderModuleGL.h | 4 +- .../native}/opengl/SpirvUtils.cpp | 2 +- .../native}/opengl/SpirvUtils.h | 8 +- .../native}/opengl/SwapChainGL.cpp | 8 +- .../native}/opengl/SwapChainGL.h | 4 +- .../native}/opengl/TextureGL.cpp | 12 +- .../native}/opengl/TextureGL.h | 4 +- .../native}/opengl/UtilsGL.cpp | 2 +- .../native}/opengl/UtilsGL.h | 4 +- .../native}/opengl/opengl_platform.h | 2 +- .../native}/opengl/supported_extensions.json | 0 .../native}/utils/WGPUHelpers.cpp | 18 +- .../native}/utils/WGPUHelpers.h | 4 +- .../native}/vulkan/AdapterVk.cpp | 8 +- .../native}/vulkan/AdapterVk.h | 4 +- .../native}/vulkan/BackendVk.cpp | 12 +- .../native}/vulkan/BackendVk.h | 6 +- .../native}/vulkan/BindGroupLayoutVk.cpp | 14 +- .../native}/vulkan/BindGroupLayoutVk.h | 2 +- .../native}/vulkan/BindGroupVk.cpp | 20 +- .../native}/vulkan/BindGroupVk.h | 6 +- .../native}/vulkan/BufferVk.cpp | 16 +- .../native}/vulkan/BufferVk.h | 4 +- .../native}/vulkan/CommandBufferVk.cpp | 44 +- .../native}/vulkan/CommandBufferVk.h | 4 +- .../native}/vulkan/CommandRecordingContext.h | 2 +- .../native}/vulkan/ComputePipelineVk.cpp | 16 +- .../native}/vulkan/ComputePipelineVk.h | 4 +- .../native}/vulkan/DescriptorSetAllocation.h | 0 .../native}/vulkan/DescriptorSetAllocator.cpp | 10 +- .../native}/vulkan/DescriptorSetAllocator.h | 8 +- .../native}/vulkan/DeviceVk.cpp | 54 +- .../native}/vulkan/DeviceVk.h | 20 +- .../native}/vulkan/ExternalHandle.h | 0 .../native}/vulkan/FencedDeleter.cpp | 4 +- .../native}/vulkan/FencedDeleter.h | 2 +- .../native}/vulkan/Forward.h | 2 +- .../native}/vulkan/NativeSwapChainImplVk.cpp | 8 +- .../native}/vulkan/NativeSwapChainImplVk.h | 4 +- .../native}/vulkan/PipelineLayoutVk.cpp | 12 +- .../native}/vulkan/PipelineLayoutVk.h | 4 +- .../native}/vulkan/QuerySetVk.cpp | 10 +- .../native}/vulkan/QuerySetVk.h | 2 +- .../native}/vulkan/QueueVk.cpp | 16 +- .../native}/vulkan/QueueVk.h | 2 +- .../native}/vulkan/RenderPassCache.cpp | 8 +- .../native}/vulkan/RenderPassCache.h | 6 +- .../native}/vulkan/RenderPipelineVk.cpp | 20 +- .../native}/vulkan/RenderPipelineVk.h | 4 +- .../native}/vulkan/ResourceHeapVk.cpp | 2 +- .../native}/vulkan/ResourceHeapVk.h | 2 +- .../vulkan/ResourceMemoryAllocatorVk.cpp | 14 +- .../vulkan/ResourceMemoryAllocatorVk.h | 8 +- .../native}/vulkan/SamplerVk.cpp | 10 +- .../native}/vulkan/SamplerVk.h | 4 +- .../native}/vulkan/ShaderModuleVk.cpp | 18 +- .../native}/vulkan/ShaderModuleVk.h | 4 +- .../native}/vulkan/StagingBufferVk.cpp | 14 +- .../native}/vulkan/StagingBufferVk.h | 4 +- .../native}/vulkan/SwapChainVk.cpp | 20 +- .../native}/vulkan/SwapChainVk.h | 2 +- .../native}/vulkan/TextureVk.cpp | 30 +- .../native}/vulkan/TextureVk.h | 10 +- .../native}/vulkan/UtilsVulkan.cpp | 18 +- .../native}/vulkan/UtilsVulkan.h | 4 +- .../native}/vulkan/VulkanBackend.cpp | 8 +- .../native}/vulkan/VulkanError.cpp | 2 +- .../native}/vulkan/VulkanError.h | 4 +- .../native}/vulkan/VulkanExtensions.cpp | 2 +- .../native}/vulkan/VulkanExtensions.h | 0 .../native}/vulkan/VulkanFunctions.cpp | 4 +- .../native}/vulkan/VulkanFunctions.h | 2 +- .../native}/vulkan/VulkanInfo.cpp | 10 +- .../native}/vulkan/VulkanInfo.h | 4 +- .../vulkan/external_memory/MemoryService.h | 6 +- .../external_memory/MemoryServiceDmaBuf.cpp | 14 +- .../external_memory/MemoryServiceNull.cpp | 4 +- .../external_memory/MemoryServiceOpaqueFD.cpp | 12 +- .../MemoryServiceZirconHandle.cpp | 12 +- .../external_semaphore/SemaphoreService.h | 8 +- .../external_semaphore/SemaphoreServiceFD.cpp | 10 +- .../SemaphoreServiceNull.cpp | 4 +- .../SemaphoreServiceZirconHandle.cpp | 10 +- .../native}/webgpu_absl_format.cpp | 65 +- .../native}/webgpu_absl_format.h | 52 +- src/dawn/node/README.md | 4 +- src/dawn/node/binding/Converter.h | 2 +- src/dawn/node/binding/GPU.h | 2 +- src/dawn/node/binding/GPUAdapter.cpp | 2 +- src/dawn/node/binding/GPUAdapter.h | 2 +- src/dawn/node/binding/GPUBindGroup.h | 2 +- src/dawn/node/binding/GPUBindGroupLayout.h | 2 +- src/dawn/node/binding/GPUBuffer.h | 2 +- src/dawn/node/binding/GPUCommandBuffer.h | 2 +- src/dawn/node/binding/GPUCommandEncoder.h | 2 +- src/dawn/node/binding/GPUComputePassEncoder.h | 2 +- src/dawn/node/binding/GPUComputePipeline.h | 2 +- src/dawn/node/binding/GPUPipelineLayout.h | 2 +- src/dawn/node/binding/GPUQuerySet.h | 2 +- src/dawn/node/binding/GPUQueue.h | 2 +- src/dawn/node/binding/GPURenderBundle.h | 2 +- .../node/binding/GPURenderBundleEncoder.h | 2 +- src/dawn/node/binding/GPURenderPassEncoder.h | 2 +- src/dawn/node/binding/GPURenderPipeline.h | 2 +- src/dawn/node/binding/GPUSampler.h | 2 +- src/dawn/node/binding/GPUShaderModule.h | 2 +- src/dawn/node/binding/GPUSupportedLimits.h | 2 +- src/dawn/node/binding/GPUTexture.h | 2 +- src/dawn/node/binding/GPUTextureView.h | 2 +- src/dawn/utils/BUILD.gn | 4 +- src/dawn/utils/BackendBinding.cpp | 2 +- src/dawn/utils/BackendBinding.h | 2 +- src/dawn/utils/D3D12Binding.cpp | 2 +- src/dawn/utils/MetalBinding.mm | 2 +- src/dawn/utils/NullBinding.cpp | 2 +- src/dawn/utils/OpenGLBinding.cpp | 2 +- src/dawn/utils/VulkanBinding.cpp | 2 +- src/dawn/utils/WireHelper.cpp | 2 +- src/dawn_native/BUILD.gn | 770 +---------------- src/fuzzers/dawn/BUILD.gn | 2 +- .../DawnWireServerAndD3D12BackendFuzzer.cpp | 2 +- .../dawn/DawnWireServerAndFrontendFuzzer.cpp | 2 +- .../DawnWireServerAndVulkanBackendFuzzer.cpp | 2 +- src/fuzzers/dawn/DawnWireServerFuzzer.cpp | 2 +- src/include/dawn/native/D3D12Backend.h | 111 +++ src/include/dawn/native/DawnNative.h | 261 ++++++ src/include/dawn/native/MetalBackend.h | 71 ++ src/include/dawn/native/NullBackend.h | 25 + src/include/dawn/native/OpenGLBackend.h | 55 ++ src/include/dawn/native/VulkanBackend.h | 140 ++++ src/include/dawn/native/dawn_native_export.h | 36 + src/include/dawn_native/D3D12Backend.h | 112 +-- src/include/dawn_native/DawnNative.h | 262 +----- src/include/dawn_native/MetalBackend.h | 72 +- src/include/dawn_native/NullBackend.h | 26 +- src/include/dawn_native/OpenGLBackend.h | 56 +- src/include/dawn_native/VulkanBackend.h | 141 +--- src/include/dawn_native/dawn_native_export.h | 37 +- src/tests/BUILD.gn | 24 +- src/tests/DawnNativeTest.cpp | 2 +- src/tests/DawnNativeTest.h | 4 +- src/tests/DawnTest.cpp | 2 +- src/tests/DawnTest.h | 2 +- src/tests/end2end/AdapterDiscoveryTests.cpp | 12 +- .../end2end/D3D12ResourceWrappingTests.cpp | 2 +- src/tests/end2end/IOSurfaceWrappingTests.cpp | 2 +- src/tests/end2end/VideoViewsTests_gbm.cpp | 2 +- src/tests/end2end/VideoViewsTests_win.cpp | 2 +- src/tests/end2end/WindowSurfaceTests.cpp | 2 +- src/tests/unittests/AsyncTaskTests.cpp | 2 +- src/tests/unittests/BuddyAllocatorTests.cpp | 2 +- .../unittests/BuddyMemoryAllocatorTests.cpp | 6 +- src/tests/unittests/ChainUtilsTests.cpp | 4 +- src/tests/unittests/CommandAllocatorTests.cpp | 2 +- src/tests/unittests/ConcurrentCacheTests.cpp | 2 +- src/tests/unittests/EnumMaskIteratorTests.cpp | 2 +- src/tests/unittests/ErrorTests.cpp | 4 +- src/tests/unittests/FeatureTests.cpp | 6 +- src/tests/unittests/GetProcAddressTests.cpp | 4 +- src/tests/unittests/LimitsTests.cpp | 2 +- src/tests/unittests/PerStageTests.cpp | 2 +- src/tests/unittests/PerThreadProcTests.cpp | 6 +- .../unittests/RingBufferAllocatorTests.cpp | 2 +- .../unittests/SubresourceStorageTests.cpp | 2 +- src/tests/unittests/ToBackendTests.cpp | 2 +- src/tests/unittests/d3d12/CopySplitTests.cpp | 6 +- .../native/CommandBufferEncodingTests.cpp | 6 +- .../unittests/native/DestroyObjectTests.cpp | 2 +- .../unittests/native/DeviceCreationTests.cpp | 2 +- .../native/mocks/BindGroupLayoutMock.h | 4 +- .../unittests/native/mocks/BindGroupMock.h | 4 +- src/tests/unittests/native/mocks/BufferMock.h | 4 +- .../native/mocks/CommandBufferMock.h | 4 +- .../native/mocks/ComputePipelineMock.h | 4 +- src/tests/unittests/native/mocks/DeviceMock.h | 4 +- .../native/mocks/ExternalTextureMock.h | 4 +- .../native/mocks/PipelineLayoutMock.h | 4 +- .../unittests/native/mocks/QuerySetMock.h | 4 +- .../native/mocks/RenderPipelineMock.h | 4 +- .../unittests/native/mocks/SamplerMock.h | 4 +- .../unittests/native/mocks/ShaderModuleMock.h | 6 +- .../unittests/native/mocks/SwapChainMock.h | 4 +- .../unittests/native/mocks/TextureMock.h | 4 +- .../CommandBufferValidationTests.cpp | 2 +- .../validation/DeviceValidationTests.cpp | 4 +- .../ShaderModuleValidationTests.cpp | 2 +- .../unittests/validation/ValidationTest.cpp | 2 +- .../unittests/validation/ValidationTest.h | 2 +- .../white_box/BufferAllocatedSizeTests.cpp | 2 +- .../white_box/D3D12DescriptorHeapTests.cpp | 12 +- src/tests/white_box/D3D12ResidencyTests.cpp | 10 +- .../white_box/D3D12ResourceHeapTests.cpp | 4 +- src/tests/white_box/EGLImageWrappingTests.cpp | 4 +- .../white_box/InternalResourceUsageTests.cpp | 2 +- .../InternalStorageBufferBindingTests.cpp | 6 +- .../white_box/MetalAutoreleasePoolTests.mm | 2 +- .../white_box/QueryInternalShaderTests.cpp | 6 +- .../white_box/VulkanErrorInjectorTests.cpp | 8 +- .../white_box/VulkanImageWrappingTests.cpp | 4 +- .../white_box/VulkanImageWrappingTests.h | 2 +- .../VulkanImageWrappingTests_OpaqueFD.cpp | 6 +- 544 files changed, 3425 insertions(+), 3397 deletions(-) rename generator/templates/{dawn_native => dawn/native}/ChainUtils.cpp (97%) rename generator/templates/{dawn_native => dawn/native}/ChainUtils.h (98%) rename generator/templates/{dawn_native => dawn/native}/ObjectType.cpp (95%) rename generator/templates/{dawn_native => dawn/native}/ObjectType.h (100%) rename generator/templates/{dawn_native => dawn/native}/ProcTable.cpp (99%) rename generator/templates/{dawn_native => dawn/native}/ValidationUtils.cpp (96%) rename generator/templates/{dawn_native => dawn/native}/ValidationUtils.h (95%) rename generator/templates/{dawn_native => dawn/native}/api_absl_format.cpp (98%) rename generator/templates/{dawn_native => dawn/native}/api_absl_format.h (97%) rename generator/templates/{dawn_native => dawn/native}/api_dawn_native_proc.cpp (99%) rename generator/templates/{dawn_native => dawn/native}/api_structs.cpp (98%) rename generator/templates/{dawn_native => dawn/native}/api_structs.h (98%) rename generator/templates/{dawn_native => dawn/native}/dawn_platform.h (98%) rename src/{dawn_native => dawn/native}/Adapter.cpp (98%) rename src/{dawn_native => dawn/native}/Adapter.h (95%) rename src/{dawn_native => dawn/native}/AsyncTask.cpp (98%) rename src/{dawn_native => dawn/native}/AsyncTask.h (100%) rename src/{dawn_native => dawn/native}/AttachmentState.cpp (97%) rename src/{dawn_native => dawn/native}/AttachmentState.h (95%) create mode 100644 src/dawn/native/BUILD.gn rename src/{dawn_native => dawn/native}/BackendConnection.cpp (96%) rename src/{dawn_native => dawn/native}/BackendConnection.h (96%) rename src/{dawn_native => dawn/native}/BindGroup.cpp (98%) rename src/{dawn_native => dawn/native}/BindGroup.h (94%) rename src/{dawn_native => dawn/native}/BindGroupLayout.cpp (98%) rename src/{dawn_native => dawn/native}/BindGroupLayout.h (96%) rename src/{dawn_native => dawn/native}/BindGroupTracker.h (98%) rename src/{dawn_native => dawn/native}/BindingInfo.cpp (99%) rename src/{dawn_native => dawn/native}/BindingInfo.h (95%) rename src/{dawn_native => dawn/native}/BuddyAllocator.cpp (99%) rename src/{dawn_native => dawn/native}/BuddyAllocator.h (100%) rename src/{dawn_native => dawn/native}/BuddyMemoryAllocator.cpp (98%) rename src/{dawn_native => dawn/native}/BuddyMemoryAllocator.h (95%) rename src/{dawn_native => dawn/native}/Buffer.cpp (98%) rename src/{dawn_native => dawn/native}/Buffer.h (96%) rename src/{dawn_native => dawn/native}/CMakeLists.txt (97%) rename src/{dawn_native => dawn/native}/CachedObject.cpp (97%) rename src/{dawn_native => dawn/native}/CachedObject.h (100%) rename src/{dawn_native => dawn/native}/CallbackTaskManager.cpp (96%) rename src/{dawn_native => dawn/native}/CallbackTaskManager.h (100%) rename src/{dawn_native => dawn/native}/CommandAllocator.cpp (99%) rename src/{dawn_native => dawn/native}/CommandAllocator.h (100%) rename src/{dawn_native => dawn/native}/CommandBuffer.cpp (97%) rename src/{dawn_native => dawn/native}/CommandBuffer.h (90%) rename src/{dawn_native => dawn/native}/CommandBufferStateTracker.cpp (98%) rename src/{dawn_native => dawn/native}/CommandBufferStateTracker.h (97%) rename src/{dawn_native => dawn/native}/CommandEncoder.cpp (98%) rename src/{dawn_native => dawn/native}/CommandEncoder.h (96%) rename src/{dawn_native => dawn/native}/CommandValidation.cpp (98%) rename src/{dawn_native => dawn/native}/CommandValidation.h (97%) rename src/{dawn_native => dawn/native}/Commands.cpp (97%) rename src/{dawn_native => dawn/native}/Commands.h (97%) rename src/{dawn_native => dawn/native}/CompilationMessages.cpp (98%) rename src/{dawn_native => dawn/native}/CompilationMessages.h (98%) rename src/{dawn_native => dawn/native}/ComputePassEncoder.cpp (97%) rename src/{dawn_native => dawn/native}/ComputePassEncoder.h (94%) rename src/{dawn_native => dawn/native}/ComputePipeline.cpp (95%) rename src/{dawn_native => dawn/native}/ComputePipeline.h (96%) rename src/{dawn_native => dawn/native}/CopyTextureForBrowserHelper.cpp (97%) rename src/{dawn_native => dawn/native}/CopyTextureForBrowserHelper.h (96%) rename src/{dawn_native => dawn/native}/CreatePipelineAsyncTask.cpp (97%) rename src/{dawn_native => dawn/native}/CreatePipelineAsyncTask.h (98%) rename src/{dawn_native => dawn/native}/DawnNative.cpp (98%) rename src/{dawn_native => dawn/native}/Device.cpp (98%) rename src/{dawn_native => dawn/native}/Device.h (97%) rename src/{dawn_native => dawn/native}/DynamicUploader.cpp (98%) rename src/{dawn_native => dawn/native}/DynamicUploader.h (93%) rename src/{dawn_native => dawn/native}/EncodingContext.cpp (96%) rename src/{dawn_native => dawn/native}/EncodingContext.h (96%) rename src/{dawn_native => dawn/native}/EnumClassBitmasks.h (100%) rename src/{dawn_native => dawn/native}/EnumMaskIterator.h (98%) rename src/{dawn_native => dawn/native}/Error.cpp (95%) rename src/{dawn_native => dawn/native}/Error.h (99%) rename src/{dawn_native => dawn/native}/ErrorData.cpp (95%) rename src/{dawn_native => dawn/native}/ErrorData.h (100%) rename src/{dawn_native => dawn/native}/ErrorInjector.cpp (96%) rename src/{dawn_native => dawn/native}/ErrorInjector.h (100%) rename src/{dawn_native => dawn/native}/ErrorScope.cpp (98%) rename src/{dawn_native => dawn/native}/ErrorScope.h (97%) rename src/{dawn_native => dawn/native}/ExternalTexture.cpp (97%) rename src/{dawn_native => dawn/native}/ExternalTexture.h (94%) rename src/{dawn_native => dawn/native}/Features.cpp (99%) rename src/{dawn_native => dawn/native}/Features.h (98%) rename src/{dawn_native => dawn/native}/Format.cpp (99%) rename src/{dawn_native => dawn/native}/Format.h (97%) rename src/{dawn_native => dawn/native}/Forward.h (100%) rename src/{dawn_native => dawn/native}/IndirectDrawMetadata.cpp (97%) rename src/{dawn_native => dawn/native}/IndirectDrawMetadata.h (97%) rename src/{dawn_native => dawn/native}/IndirectDrawValidationEncoder.cpp (97%) rename src/{dawn_native => dawn/native}/IndirectDrawValidationEncoder.h (95%) rename src/{dawn_native => dawn/native}/Instance.cpp (98%) rename src/{dawn_native => dawn/native}/Instance.h (96%) rename src/{dawn_native => dawn/native}/IntegerTypes.h (100%) rename src/{dawn_native => dawn/native}/InternalPipelineStore.cpp (85%) rename src/{dawn_native => dawn/native}/InternalPipelineStore.h (94%) rename src/{dawn_native => dawn/native}/Limits.cpp (99%) rename src/{dawn_native => dawn/native}/Limits.h (95%) rename src/{dawn_native => dawn/native}/ObjectBase.cpp (97%) rename src/{dawn_native => dawn/native}/ObjectBase.h (99%) rename src/{dawn_native => dawn/native}/ObjectContentHasher.cpp (94%) rename src/{dawn_native => dawn/native}/ObjectContentHasher.h (100%) rename src/{dawn_native => dawn/native}/PassResourceUsage.h (98%) rename src/{dawn_native => dawn/native}/PassResourceUsageTracker.cpp (97%) rename src/{dawn_native => dawn/native}/PassResourceUsageTracker.h (97%) rename src/{dawn_native => dawn/native}/PerStage.cpp (98%) rename src/{dawn_native => dawn/native}/PerStage.h (97%) rename src/{dawn_native => dawn/native}/PersistentCache.cpp (97%) rename src/{dawn_native => dawn/native}/PersistentCache.h (99%) rename src/{dawn_native => dawn/native}/Pipeline.cpp (97%) rename src/{dawn_native => dawn/native}/Pipeline.h (92%) rename src/{dawn_native => dawn/native}/PipelineLayout.cpp (98%) rename src/{dawn_native => dawn/native}/PipelineLayout.h (94%) rename src/{dawn_native => dawn/native}/PooledResourceMemoryAllocator.cpp (96%) rename src/{dawn_native => dawn/native}/PooledResourceMemoryAllocator.h (97%) rename src/{dawn_native => dawn/native}/ProgrammableEncoder.cpp (96%) rename src/{dawn_native => dawn/native}/ProgrammableEncoder.h (91%) rename src/{dawn_native => dawn/native}/QueryHelper.cpp (95%) rename src/{dawn_native => dawn/native}/QueryHelper.h (95%) rename src/{dawn_native => dawn/native}/QuerySet.cpp (97%) rename src/{dawn_native => dawn/native}/QuerySet.h (94%) rename src/{dawn_native => dawn/native}/Queue.cpp (97%) rename src/{dawn_native => dawn/native}/Queue.h (96%) rename src/{dawn_native => dawn/native}/RenderBundle.cpp (94%) rename src/{dawn_native => dawn/native}/RenderBundle.h (87%) rename src/{dawn_native => dawn/native}/RenderBundleEncoder.cpp (95%) rename src/{dawn_native => dawn/native}/RenderBundleEncoder.h (90%) rename src/{dawn_native => dawn/native}/RenderEncoderBase.cpp (98%) rename src/{dawn_native => dawn/native}/RenderEncoderBase.h (92%) rename src/{dawn_native => dawn/native}/RenderPassEncoder.cpp (97%) rename src/{dawn_native => dawn/native}/RenderPassEncoder.h (96%) rename src/{dawn_native => dawn/native}/RenderPipeline.cpp (99%) rename src/{dawn_native => dawn/native}/RenderPipeline.h (96%) rename src/{dawn_native => dawn/native}/ResourceHeap.h (96%) rename src/{dawn_native => dawn/native}/ResourceHeapAllocator.h (94%) rename src/{dawn_native => dawn/native}/ResourceMemoryAllocation.cpp (97%) rename src/{dawn_native => dawn/native}/ResourceMemoryAllocation.h (100%) rename src/{dawn_native => dawn/native}/RingBufferAllocator.cpp (99%) rename src/{dawn_native => dawn/native}/RingBufferAllocator.h (98%) rename src/{dawn_native => dawn/native}/Sampler.cpp (97%) rename src/{dawn_native => dawn/native}/Sampler.h (93%) rename src/{dawn_native => dawn/native}/ScratchBuffer.cpp (95%) rename src/{dawn_native => dawn/native}/ScratchBuffer.h (98%) rename src/{dawn_native => dawn/native}/ShaderModule.cpp (99%) rename src/{dawn_native => dawn/native}/ShaderModule.h (96%) rename src/{dawn_native => dawn/native}/SpirvValidation.cpp (97%) rename src/{dawn_native => dawn/native}/SpirvValidation.h (96%) rename src/{dawn_native => dawn/native}/StagingBuffer.cpp (95%) rename src/{dawn_native => dawn/native}/StagingBuffer.h (97%) rename src/{dawn_native => dawn/native}/Subresource.cpp (98%) rename src/{dawn_native => dawn/native}/Subresource.h (98%) rename src/{dawn_native => dawn/native}/SubresourceStorage.h (99%) rename src/{dawn_native => dawn/native}/Surface.cpp (98%) rename src/{dawn_native => dawn/native}/Surface.h (95%) rename src/{dawn_native => dawn/native}/Surface_metal.mm (100%) rename src/{dawn_native => dawn/native}/SwapChain.cpp (98%) rename src/{dawn_native => dawn/native}/SwapChain.h (97%) rename src/{dawn_native => dawn/native}/Texture.cpp (99%) rename src/{dawn_native => dawn/native}/Texture.h (97%) rename src/{dawn_native => dawn/native}/TintUtils.cpp (94%) rename src/{dawn_native => dawn/native}/TintUtils.h (100%) rename src/{dawn_native => dawn/native}/ToBackend.h (99%) rename src/{dawn_native => dawn/native}/Toggles.cpp (99%) rename src/{dawn_native => dawn/native}/Toggles.h (98%) rename src/{dawn_native => dawn/native}/VertexFormat.cpp (98%) rename src/{dawn_native => dawn/native}/VertexFormat.h (96%) rename src/{dawn_native => dawn/native}/XlibXcbFunctions.cpp (95%) rename src/{dawn_native => dawn/native}/XlibXcbFunctions.h (97%) rename src/{dawn_native => dawn/native}/d3d12/AdapterD3D12.cpp (98%) rename src/{dawn_native => dawn/native}/d3d12/AdapterD3D12.h (94%) rename src/{dawn_native => dawn/native}/d3d12/BackendD3D12.cpp (96%) rename src/{dawn_native => dawn/native}/d3d12/BackendD3D12.h (95%) rename src/{dawn_native => dawn/native}/d3d12/BindGroupD3D12.cpp (97%) rename src/{dawn_native => dawn/native}/d3d12/BindGroupD3D12.h (93%) rename src/{dawn_native => dawn/native}/d3d12/BindGroupLayoutD3D12.cpp (96%) rename src/{dawn_native => dawn/native}/d3d12/BindGroupLayoutD3D12.h (97%) rename src/{dawn_native => dawn/native}/d3d12/BufferD3D12.cpp (98%) rename src/{dawn_native => dawn/native}/d3d12/BufferD3D12.h (96%) rename src/{dawn_native => dawn/native}/d3d12/CPUDescriptorHeapAllocationD3D12.cpp (94%) rename src/{dawn_native => dawn/native}/d3d12/CPUDescriptorHeapAllocationD3D12.h (97%) rename src/{dawn_native => dawn/native}/d3d12/CommandAllocatorManager.cpp (95%) rename src/{dawn_native => dawn/native}/d3d12/CommandAllocatorManager.h (94%) rename src/{dawn_native => dawn/native}/d3d12/CommandBufferD3D12.cpp (98%) rename src/{dawn_native => dawn/native}/d3d12/CommandBufferD3D12.h (97%) rename src/{dawn_native => dawn/native}/d3d12/CommandRecordingContext.cpp (96%) rename src/{dawn_native => dawn/native}/d3d12/CommandRecordingContext.h (92%) rename src/{dawn_native => dawn/native}/d3d12/ComputePipelineD3D12.cpp (91%) rename src/{dawn_native => dawn/native}/d3d12/ComputePipelineD3D12.h (95%) rename src/{dawn_native => dawn/native}/d3d12/D3D11on12Util.cpp (97%) rename src/{dawn_native => dawn/native}/d3d12/D3D11on12Util.h (96%) rename src/{dawn_native => dawn/native}/d3d12/D3D12Backend.cpp (96%) rename src/{dawn_native => dawn/native}/d3d12/D3D12Error.cpp (97%) rename src/{dawn_native => dawn/native}/d3d12/D3D12Error.h (96%) rename src/{dawn_native => dawn/native}/d3d12/D3D12Info.cpp (96%) rename src/{dawn_native => dawn/native}/d3d12/D3D12Info.h (92%) rename src/{dawn_native => dawn/native}/d3d12/DeviceD3D12.cpp (95%) rename src/{dawn_native => dawn/native}/d3d12/DeviceD3D12.h (98%) rename src/{dawn_native => dawn/native}/d3d12/Forward.h (98%) rename src/{dawn_native => dawn/native}/d3d12/GPUDescriptorHeapAllocationD3D12.cpp (95%) rename src/{dawn_native => dawn/native}/d3d12/GPUDescriptorHeapAllocationD3D12.h (92%) rename src/{dawn_native => dawn/native}/d3d12/HeapAllocatorD3D12.cpp (93%) rename src/{dawn_native => dawn/native}/d3d12/HeapAllocatorD3D12.h (92%) rename src/{dawn_native => dawn/native}/d3d12/HeapD3D12.cpp (96%) rename src/{dawn_native => dawn/native}/d3d12/HeapD3D12.h (91%) rename src/{dawn_native => dawn/native}/d3d12/IntegerTypes.h (100%) rename src/{dawn_native => dawn/native}/d3d12/NativeSwapChainImplD3D12.cpp (97%) rename src/{dawn_native => dawn/native}/d3d12/NativeSwapChainImplD3D12.h (93%) rename src/{dawn_native => dawn/native}/d3d12/PageableD3D12.cpp (98%) rename src/{dawn_native => dawn/native}/d3d12/PageableD3D12.h (96%) rename src/{dawn_native => dawn/native}/d3d12/PipelineLayoutD3D12.cpp (98%) rename src/{dawn_native => dawn/native}/d3d12/PipelineLayoutD3D12.h (97%) rename src/{dawn_native => dawn/native}/d3d12/PlatformFunctions.cpp (99%) rename src/{dawn_native => dawn/native}/d3d12/PlatformFunctions.h (98%) rename src/{dawn_native => dawn/native}/d3d12/QuerySetD3D12.cpp (93%) rename src/{dawn_native => dawn/native}/d3d12/QuerySetD3D12.h (94%) rename src/{dawn_native => dawn/native}/d3d12/QueueD3D12.cpp (85%) rename src/{dawn_native => dawn/native}/d3d12/QueueD3D12.h (88%) rename src/{dawn_native => dawn/native}/d3d12/RenderPassBuilderD3D12.cpp (97%) rename src/{dawn_native => dawn/native}/d3d12/RenderPassBuilderD3D12.h (97%) rename src/{dawn_native => dawn/native}/d3d12/RenderPipelineD3D12.cpp (98%) rename src/{dawn_native => dawn/native}/d3d12/RenderPipelineD3D12.h (93%) rename src/{dawn_native => dawn/native}/d3d12/ResidencyManagerD3D12.cpp (98%) rename src/{dawn_native => dawn/native}/d3d12/ResidencyManagerD3D12.h (95%) rename src/{dawn_native => dawn/native}/d3d12/ResourceAllocatorManagerD3D12.cpp (98%) rename src/{dawn_native => dawn/native}/d3d12/ResourceAllocatorManagerD3D12.h (93%) rename src/{dawn_native => dawn/native}/d3d12/ResourceHeapAllocationD3D12.cpp (91%) rename src/{dawn_native => dawn/native}/d3d12/ResourceHeapAllocationD3D12.h (92%) rename src/{dawn_native => dawn/native}/d3d12/SamplerD3D12.cpp (96%) rename src/{dawn_native => dawn/native}/d3d12/SamplerD3D12.h (93%) rename src/{dawn_native => dawn/native}/d3d12/SamplerHeapCacheD3D12.cpp (94%) rename src/{dawn_native => dawn/native}/d3d12/SamplerHeapCacheD3D12.h (95%) rename src/{dawn_native => dawn/native}/d3d12/ShaderModuleD3D12.cpp (99%) rename src/{dawn_native => dawn/native}/d3d12/ShaderModuleD3D12.h (94%) rename src/{dawn_native => dawn/native}/d3d12/ShaderVisibleDescriptorAllocatorD3D12.cpp (97%) rename src/{dawn_native => dawn/native}/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h (95%) rename src/{dawn_native => dawn/native}/d3d12/StagingBufferD3D12.cpp (91%) rename src/{dawn_native => dawn/native}/d3d12/StagingBufferD3D12.h (88%) rename src/{dawn_native => dawn/native}/d3d12/StagingDescriptorAllocatorD3D12.cpp (97%) rename src/{dawn_native => dawn/native}/d3d12/StagingDescriptorAllocatorD3D12.h (97%) rename src/{dawn_native => dawn/native}/d3d12/SwapChainD3D12.cpp (97%) rename src/{dawn_native => dawn/native}/d3d12/SwapChainD3D12.h (88%) rename src/{dawn_native => dawn/native}/d3d12/TextureCopySplitter.cpp (99%) rename src/{dawn_native => dawn/native}/d3d12/TextureCopySplitter.h (99%) rename src/{dawn_native => dawn/native}/d3d12/TextureD3D12.cpp (98%) rename src/{dawn_native => dawn/native}/d3d12/TextureD3D12.h (96%) rename src/{dawn_native => dawn/native}/d3d12/UtilsD3D12.cpp (98%) rename src/{dawn_native => dawn/native}/d3d12/UtilsD3D12.h (91%) rename src/{dawn_native => dawn/native}/d3d12/d3d12_platform.h (100%) rename src/{dawn_native => dawn/native}/dawn_platform.h (98%) rename src/{dawn_native => dawn/native}/metal/BackendMTL.h (96%) rename src/{dawn_native => dawn/native}/metal/BackendMTL.mm (99%) rename src/{dawn_native => dawn/native}/metal/BindGroupLayoutMTL.h (97%) rename src/{dawn_native => dawn/native}/metal/BindGroupLayoutMTL.mm (94%) rename src/{dawn_native => dawn/native}/metal/BindGroupMTL.h (97%) rename src/{dawn_native => dawn/native}/metal/BindGroupMTL.mm (89%) rename src/{dawn_native => dawn/native}/metal/BufferMTL.h (98%) rename src/{dawn_native => dawn/native}/metal/BufferMTL.mm (98%) rename src/{dawn_native => dawn/native}/metal/CommandBufferMTL.h (97%) rename src/{dawn_native => dawn/native}/metal/CommandBufferMTL.mm (98%) rename src/{dawn_native => dawn/native}/metal/CommandRecordingContext.h (98%) rename src/{dawn_native => dawn/native}/metal/CommandRecordingContext.mm (98%) rename src/{dawn_native => dawn/native}/metal/ComputePipelineMTL.h (97%) rename src/{dawn_native => dawn/native}/metal/ComputePipelineMTL.mm (93%) rename src/{dawn_native => dawn/native}/metal/DeviceMTL.h (97%) rename src/{dawn_native => dawn/native}/metal/DeviceMTL.mm (96%) rename src/{dawn_native => dawn/native}/metal/Forward.h (98%) rename src/{dawn_native => dawn/native}/metal/MetalBackend.mm (93%) rename src/{dawn_native => dawn/native}/metal/PipelineLayoutMTL.h (95%) rename src/{dawn_native => dawn/native}/metal/PipelineLayoutMTL.mm (96%) rename src/{dawn_native => dawn/native}/metal/QuerySetMTL.h (98%) rename src/{dawn_native => dawn/native}/metal/QuerySetMTL.mm (98%) rename src/{dawn_native => dawn/native}/metal/QueueMTL.h (97%) rename src/{dawn_native => dawn/native}/metal/QueueMTL.mm (84%) rename src/{dawn_native => dawn/native}/metal/RenderPipelineMTL.h (98%) rename src/{dawn_native => dawn/native}/metal/RenderPipelineMTL.mm (98%) rename src/{dawn_native => dawn/native}/metal/SamplerMTL.h (97%) rename src/{dawn_native => dawn/native}/metal/SamplerMTL.mm (97%) rename src/{dawn_native => dawn/native}/metal/ShaderModuleMTL.h (97%) rename src/{dawn_native => dawn/native}/metal/ShaderModuleMTL.mm (97%) rename src/{dawn_native => dawn/native}/metal/StagingBufferMTL.h (96%) rename src/{dawn_native => dawn/native}/metal/StagingBufferMTL.mm (94%) rename src/{dawn_native => dawn/native}/metal/SwapChainMTL.h (98%) rename src/{dawn_native => dawn/native}/metal/SwapChainMTL.mm (97%) rename src/{dawn_native => dawn/native}/metal/TextureMTL.h (98%) rename src/{dawn_native => dawn/native}/metal/TextureMTL.mm (99%) rename src/{dawn_native => dawn/native}/metal/UtilsMetal.h (95%) rename src/{dawn_native => dawn/native}/metal/UtilsMetal.mm (98%) rename src/{dawn_native => dawn/native}/null/DeviceNull.cpp (98%) rename src/{dawn_native => dawn/native}/null/DeviceNull.h (94%) rename src/{dawn_native => dawn/native}/null/NullBackend.cpp (93%) rename src/{dawn_native => dawn/native}/opengl/BackendGL.cpp (98%) rename src/{dawn_native => dawn/native}/opengl/BackendGL.h (96%) rename src/{dawn_native => dawn/native}/opengl/BindGroupGL.cpp (93%) rename src/{dawn_native => dawn/native}/opengl/BindGroupGL.h (97%) rename src/{dawn_native => dawn/native}/opengl/BindGroupLayoutGL.cpp (93%) rename src/{dawn_native => dawn/native}/opengl/BindGroupLayoutGL.h (97%) rename src/{dawn_native => dawn/native}/opengl/BufferGL.cpp (98%) rename src/{dawn_native => dawn/native}/opengl/BufferGL.h (96%) rename src/{dawn_native => dawn/native}/opengl/CommandBufferGL.cpp (98%) rename src/{dawn_native => dawn/native}/opengl/CommandBufferGL.h (97%) rename src/{dawn_native => dawn/native}/opengl/ComputePipelineGL.cpp (93%) rename src/{dawn_native => dawn/native}/opengl/ComputePipelineGL.h (90%) rename src/{dawn_native => dawn/native}/opengl/DeviceGL.cpp (94%) rename src/{dawn_native => dawn/native}/opengl/DeviceGL.h (95%) rename src/{dawn_native => dawn/native}/opengl/Forward.h (98%) rename src/{dawn_native => dawn/native}/opengl/GLFormat.cpp (99%) rename src/{dawn_native => dawn/native}/opengl/GLFormat.h (94%) rename src/{dawn_native => dawn/native}/opengl/NativeSwapChainImplGL.cpp (97%) rename src/{dawn_native => dawn/native}/opengl/NativeSwapChainImplGL.h (93%) rename src/{dawn_native => dawn/native}/opengl/OWNERS (100%) rename src/{dawn_native => dawn/native}/opengl/OpenGLBackend.cpp (94%) rename src/{dawn_native => dawn/native}/opengl/OpenGLFunctions.cpp (97%) rename src/{dawn_native => dawn/native}/opengl/OpenGLFunctions.h (92%) rename src/{dawn_native => dawn/native}/opengl/OpenGLVersion.cpp (98%) rename src/{dawn_native => dawn/native}/opengl/OpenGLVersion.h (95%) rename src/{dawn_native => dawn/native}/opengl/PersistentPipelineStateGL.cpp (95%) rename src/{dawn_native => dawn/native}/opengl/PersistentPipelineStateGL.h (94%) rename src/{dawn_native => dawn/native}/opengl/PipelineGL.cpp (95%) rename src/{dawn_native => dawn/native}/opengl/PipelineGL.h (95%) rename src/{dawn_native => dawn/native}/opengl/PipelineLayoutGL.cpp (96%) rename src/{dawn_native => dawn/native}/opengl/PipelineLayoutGL.h (92%) rename src/{dawn_native => dawn/native}/opengl/QuerySetGL.cpp (90%) rename src/{dawn_native => dawn/native}/opengl/QuerySetGL.h (96%) rename src/{dawn_native => dawn/native}/opengl/QueueGL.cpp (93%) rename src/{dawn_native => dawn/native}/opengl/QueueGL.h (97%) rename src/{dawn_native => dawn/native}/opengl/RenderPipelineGL.cpp (98%) rename src/{dawn_native => dawn/native}/opengl/RenderPipelineGL.h (93%) rename src/{dawn_native => dawn/native}/opengl/SamplerGL.cpp (97%) rename src/{dawn_native => dawn/native}/opengl/SamplerGL.h (94%) rename src/{dawn_native => dawn/native}/opengl/ShaderModuleGL.cpp (98%) rename src/{dawn_native => dawn/native}/opengl/ShaderModuleGL.h (97%) rename src/{dawn_native => dawn/native}/opengl/SpirvUtils.cpp (99%) rename src/{dawn_native => dawn/native}/opengl/SpirvUtils.h (93%) rename src/{dawn_native => dawn/native}/opengl/SwapChainGL.cpp (90%) rename src/{dawn_native => dawn/native}/opengl/SwapChainGL.h (93%) rename src/{dawn_native => dawn/native}/opengl/TextureGL.cpp (99%) rename src/{dawn_native => dawn/native}/opengl/TextureGL.h (96%) rename src/{dawn_native => dawn/native}/opengl/UtilsGL.cpp (97%) rename src/{dawn_native => dawn/native}/opengl/UtilsGL.h (91%) rename src/{dawn_native => dawn/native}/opengl/opengl_platform.h (91%) rename src/{dawn_native => dawn/native}/opengl/supported_extensions.json (100%) rename src/{dawn_native => dawn/native}/utils/WGPUHelpers.cpp (95%) rename src/{dawn_native => dawn/native}/utils/WGPUHelpers.h (98%) rename src/{dawn_native => dawn/native}/vulkan/AdapterVk.cpp (99%) rename src/{dawn_native => dawn/native}/vulkan/AdapterVk.h (96%) rename src/{dawn_native => dawn/native}/vulkan/BackendVk.cpp (98%) rename src/{dawn_native => dawn/native}/vulkan/BackendVk.h (95%) rename src/{dawn_native => dawn/native}/vulkan/BindGroupLayoutVk.cpp (96%) rename src/{dawn_native => dawn/native}/vulkan/BindGroupLayoutVk.h (98%) rename src/{dawn_native => dawn/native}/vulkan/BindGroupVk.cpp (94%) rename src/{dawn_native => dawn/native}/vulkan/BindGroupVk.h (92%) rename src/{dawn_native => dawn/native}/vulkan/BufferVk.cpp (97%) rename src/{dawn_native => dawn/native}/vulkan/BufferVk.h (97%) rename src/{dawn_native => dawn/native}/vulkan/CommandBufferVk.cpp (98%) rename src/{dawn_native => dawn/native}/vulkan/CommandBufferVk.h (96%) rename src/{dawn_native => dawn/native}/vulkan/CommandRecordingContext.h (97%) rename src/{dawn_native => dawn/native}/vulkan/ComputePipelineVk.cpp (92%) rename src/{dawn_native => dawn/native}/vulkan/ComputePipelineVk.h (95%) rename src/{dawn_native => dawn/native}/vulkan/DescriptorSetAllocation.h (100%) rename src/{dawn_native => dawn/native}/vulkan/DescriptorSetAllocator.cpp (97%) rename src/{dawn_native => dawn/native}/vulkan/DescriptorSetAllocator.h (93%) rename src/{dawn_native => dawn/native}/vulkan/DeviceVk.cpp (97%) rename src/{dawn_native => dawn/native}/vulkan/DeviceVk.h (95%) rename src/{dawn_native => dawn/native}/vulkan/ExternalHandle.h (100%) rename src/{dawn_native => dawn/native}/vulkan/FencedDeleter.cpp (98%) rename src/{dawn_native => dawn/native}/vulkan/FencedDeleter.h (98%) rename src/{dawn_native => dawn/native}/vulkan/Forward.h (98%) rename src/{dawn_native => dawn/native}/vulkan/NativeSwapChainImplVk.cpp (98%) rename src/{dawn_native => dawn/native}/vulkan/NativeSwapChainImplVk.h (96%) rename src/{dawn_native => dawn/native}/vulkan/PipelineLayoutVk.cpp (91%) rename src/{dawn_native => dawn/native}/vulkan/PipelineLayoutVk.h (95%) rename src/{dawn_native => dawn/native}/vulkan/QuerySetVk.cpp (95%) rename src/{dawn_native => dawn/native}/vulkan/QuerySetVk.h (97%) rename src/{dawn_native => dawn/native}/vulkan/QueueVk.cpp (83%) rename src/{dawn_native => dawn/native}/vulkan/QueueVk.h (97%) rename src/{dawn_native => dawn/native}/vulkan/RenderPassCache.cpp (98%) rename src/{dawn_native => dawn/native}/vulkan/RenderPassCache.h (97%) rename src/{dawn_native => dawn/native}/vulkan/RenderPipelineVk.cpp (98%) rename src/{dawn_native => dawn/native}/vulkan/RenderPipelineVk.h (96%) rename src/{dawn_native => dawn/native}/vulkan/ResourceHeapVk.cpp (95%) rename src/{dawn_native => dawn/native}/vulkan/ResourceHeapVk.h (97%) rename src/{dawn_native => dawn/native}/vulkan/ResourceMemoryAllocatorVk.cpp (97%) rename src/{dawn_native => dawn/native}/vulkan/ResourceMemoryAllocatorVk.h (92%) rename src/{dawn_native => dawn/native}/vulkan/SamplerVk.cpp (95%) rename src/{dawn_native => dawn/native}/vulkan/SamplerVk.h (95%) rename src/{dawn_native => dawn/native}/vulkan/ShaderModuleVk.cpp (95%) rename src/{dawn_native => dawn/native}/vulkan/ShaderModuleVk.h (97%) rename src/{dawn_native => dawn/native}/vulkan/StagingBufferVk.cpp (89%) rename src/{dawn_native => dawn/native}/vulkan/StagingBufferVk.h (93%) rename src/{dawn_native => dawn/native}/vulkan/SwapChainVk.cpp (98%) rename src/{dawn_native => dawn/native}/vulkan/SwapChainVk.h (99%) rename src/{dawn_native => dawn/native}/vulkan/TextureVk.cpp (98%) rename src/{dawn_native => dawn/native}/vulkan/TextureVk.h (97%) rename src/{dawn_native => dawn/native}/vulkan/UtilsVulkan.cpp (97%) rename src/{dawn_native => dawn/native}/vulkan/UtilsVulkan.h (98%) rename src/{dawn_native => dawn/native}/vulkan/VulkanBackend.cpp (96%) rename src/{dawn_native => dawn/native}/vulkan/VulkanError.cpp (98%) rename src/{dawn_native => dawn/native}/vulkan/VulkanError.h (96%) rename src/{dawn_native => dawn/native}/vulkan/VulkanExtensions.cpp (99%) rename src/{dawn_native => dawn/native}/vulkan/VulkanExtensions.h (100%) rename src/{dawn_native => dawn/native}/vulkan/VulkanFunctions.cpp (99%) rename src/{dawn_native => dawn/native}/vulkan/VulkanFunctions.h (99%) rename src/{dawn_native => dawn/native}/vulkan/VulkanInfo.cpp (98%) rename src/{dawn_native => dawn/native}/vulkan/VulkanInfo.h (97%) rename src/{dawn_native => dawn/native}/vulkan/external_memory/MemoryService.h (96%) rename src/{dawn_native => dawn/native}/vulkan/external_memory/MemoryServiceDmaBuf.cpp (98%) rename src/{dawn_native => dawn/native}/vulkan/external_memory/MemoryServiceNull.cpp (96%) rename src/{dawn_native => dawn/native}/vulkan/external_memory/MemoryServiceOpaqueFD.cpp (96%) rename src/{dawn_native => dawn/native}/vulkan/external_memory/MemoryServiceZirconHandle.cpp (96%) rename src/{dawn_native => dawn/native}/vulkan/external_semaphore/SemaphoreService.h (92%) rename src/{dawn_native => dawn/native}/vulkan/external_semaphore/SemaphoreServiceFD.cpp (95%) rename src/{dawn_native => dawn/native}/vulkan/external_semaphore/SemaphoreServiceNull.cpp (94%) rename src/{dawn_native => dawn/native}/vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp (96%) rename src/{dawn_native => dawn/native}/webgpu_absl_format.cpp (71%) rename src/{dawn_native => dawn/native}/webgpu_absl_format.h (58%) create mode 100644 src/include/dawn/native/D3D12Backend.h create mode 100644 src/include/dawn/native/DawnNative.h create mode 100644 src/include/dawn/native/MetalBackend.h create mode 100644 src/include/dawn/native/NullBackend.h create mode 100644 src/include/dawn/native/OpenGLBackend.h create mode 100644 src/include/dawn/native/VulkanBackend.h create mode 100644 src/include/dawn/native/dawn_native_export.h diff --git a/BUILD.gn b/BUILD.gn index fbf92ec19f..2414bcf8e0 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -17,7 +17,7 @@ import("scripts/dawn_overrides_with_defaults.gni") group("all") { testonly = true deps = [ - "src/dawn_native:webgpu_dawn", + "src/dawn/native:webgpu_dawn", "src/fuzzers/dawn:dawn_fuzzers", "src/tests:dawn_tests", ] diff --git a/CMakeLists.txt b/CMakeLists.txt index d3bf20b8c7..adaedc3cba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -215,7 +215,7 @@ add_subdirectory(generator) add_subdirectory(src/dawn) add_subdirectory(src/dawn/common) add_subdirectory(src/dawn/platform) -add_subdirectory(src/dawn_native) +add_subdirectory(src/dawn/native) add_subdirectory(src/dawn/wire) # TODO(dawn:269): Remove once the implementation-based swapchains are removed. add_subdirectory(src/dawn/utils) diff --git a/docs/dawn/codegen.md b/docs/dawn/codegen.md index 7f70e59966..b62c449930 100644 --- a/docs/dawn/codegen.md +++ b/docs/dawn/codegen.md @@ -109,4 +109,4 @@ The schema of `dawn_wire.json` is a dictionary with the following keys: ## OpenGL loader generator -The code to load OpenGL entrypoints from a `GetProcAddress` function is generated from [`gl.xml`](../third_party/khronos/gl.xml) and the [list of extensions](../src/dawn_native/opengl/supported_extensions.json) it supports. +The code to load OpenGL entrypoints from a `GetProcAddress` function is generated from [`gl.xml`](../third_party/khronos/gl.xml) and the [list of extensions](../src/dawn/native/opengl/supported_extensions.json) it supports. diff --git a/docs/dawn/device_facilities.md b/docs/dawn/device_facilities.md index 78b8ed5abd..b625558b0c 100644 --- a/docs/dawn/device_facilities.md +++ b/docs/dawn/device_facilities.md @@ -9,11 +9,11 @@ Example of backend facilities are GPU memory allocators or the backing API funct ### Error Handling -Dawn (dawn_native) uses the [Error.h](../src/dawn_native/Error.h) error handling to robustly handle errors. +Dawn (dawn_native) uses the [Error.h](../src/dawn/native/Error.h) error handling to robustly handle errors. With `DAWN_TRY` errors bubble up all the way to, and are "consumed" by the entry-point that was called by the application. Error consumption uses `Device::ConsumeError` that expose them via the WebGPU "error scopes" and can also influence the device lifecycle by notifying of a device loss, or triggering a device loss.. -See [Error.h](../src/dawn_native/Error.h) for more information about using errors. +See [Error.h](../src/dawn/native/Error.h) for more information about using errors. ### Device Lifecycle @@ -26,7 +26,7 @@ The device lifecycle is a bit more complicated than other objects in Dawn for mu - A device can become "disconnected" when a TDR or hot-unplug happens. In this case, destruction of the device doesn't need to wait on GPU commands to finish because they just disappeared. -There is a state machine `State` defined in [Device.h](../src/dawn_native/Device.h) that controls all of the above. +There is a state machine `State` defined in [Device.h](../src/dawn/native/Device.h) that controls all of the above. The most common state is `Alive` when there are potentially GPU commands executing. Initialization of a device looks like the following: @@ -62,7 +62,7 @@ Toggles can be queried using `DeviceBase::IsToggleEnabled`: bool useRenderPass = device->IsToggleEnabled(Toggle::UseD3D12RenderPass); ``` -Toggles are defined in a table in [Toggles.cpp](../src/dawn_native/Toggles.cpp) that also includes their name and description. +Toggles are defined in a table in [Toggles.cpp](../src/dawn/native/Toggles.cpp) that also includes their name and description. The name can be used to force enabling of a toggle or, at the contrary, force the disabling of a toogle. This is particularly useful in tests so that the two sides of a code path can be tested (for example using D3D12 render passes and not). diff --git a/docs/dawn/overview.md b/docs/dawn/overview.md index abba6d394e..1f934fd6d4 100644 --- a/docs/dawn/overview.md +++ b/docs/dawn/overview.md @@ -15,10 +15,10 @@ This repository contains the implementation of Dawn, which is itself composed of - [`src`](../src): - [`dawn`](../src/dawn): root directory for Dawn code - [`common`](../src/dawn/common): helper code that is allowed to be used by Dawn's core libraries, `dawn_native` and `dawn_wire`. Also allowed for use in all other Dawn targets. + - [`native`](../src/dawn/native): code for the implementation of WebGPU on top of graphics APIs. Files in this folder are the "frontend" while subdirectories are "backends". - [`wire`](../src/dawn/wire): code for an implementation of WebGPU as a client-server architecture. - [`utils`](../src/dawn/utils): helper code to use Dawn used by tests and samples but disallowed for `dawn_native` and `dawn_wire`. - [`platform`](../src/dawn/platform): definition of interfaces for dependency injection in `dawn_native` or `dawn_wire`. - - [`dawn_native`](../src/dawn_native): code for the implementation of WebGPU on top of graphics APIs. Files in this folder are the "frontend" while subdirectories are "backends". - ``: code for the implementation of the backend on a specific graphics API, for example `d3d12`, `metal` or `vulkan`. - [`fuzzers`](../src/dawn/fuzzers): various fuzzers for Dawn that are running in [Clusterfuzz](https://google.github.io/clusterfuzz/). - [`include`](../src/include): public headers with subdirectories for each library. Note that some headers are auto-generated and not present directly in the directory. diff --git a/examples/BUILD.gn b/examples/BUILD.gn index ba78f6d6d2..5c2a95774f 100644 --- a/examples/BUILD.gn +++ b/examples/BUILD.gn @@ -36,12 +36,11 @@ static_library("dawn_sample_utils") { "${dawn_root}/src/dawn:dawn_proc", "${dawn_root}/src/dawn:dawncpp", "${dawn_root}/src/dawn/common", + "${dawn_root}/src/dawn/native", "${dawn_root}/src/dawn/utils", "${dawn_root}/src/dawn/utils:bindings", "${dawn_root}/src/dawn/utils:glfw", "${dawn_root}/src/dawn/wire", - "${dawn_root}/src/dawn_native", - "${dawn_root}/src/dawn_native", ] public_configs = [ "${dawn_root}/src/dawn/common:internal_config" ] } diff --git a/examples/ManualSwapChainTest.cpp b/examples/ManualSwapChainTest.cpp index 0e9239f32a..cdea4ce76d 100644 --- a/examples/ManualSwapChainTest.cpp +++ b/examples/ManualSwapChainTest.cpp @@ -59,8 +59,8 @@ #include "dawn/utils/WGPUHelpers.h" #include +#include #include -#include #include "GLFW/glfw3.h" #include diff --git a/examples/SampleUtils.cpp b/examples/SampleUtils.cpp index e6b442eedd..21421fc9ac 100644 --- a/examples/SampleUtils.cpp +++ b/examples/SampleUtils.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include "GLFW/glfw3.h" #include diff --git a/generator/BUILD.gn b/generator/BUILD.gn index 9d0023b60d..a1d954a460 100644 --- a/generator/BUILD.gn +++ b/generator/BUILD.gn @@ -21,7 +21,7 @@ import("dawn_generator.gni") # autogenerated sources there. _stale_dirs = [ "dawn", - "dawn_native", + "dawn/native", "dawn/wire", "mock", "src", diff --git a/generator/dawn_generator.gni b/generator/dawn_generator.gni index f407735c84..c1eb5b92ed 100644 --- a/generator/dawn_generator.gni +++ b/generator/dawn_generator.gni @@ -26,7 +26,7 @@ import("generator_lib.gni") # 2. src/include and dawn_gen_root/src/include has to match the structure of # the source tree too. # 3. Dawn files must use include relative to src/ or src/include such as -# "dawn/dawn.h" or "dawn_native/backend/BackendStuff.h". +# "dawn/dawn.h" or "dawn/native/backend/BackendStuff.h". # # The allowed list below ensure 1). Include directory rules for Dawn ensure 3) # and 2) is something we need to enforce in code review. @@ -39,8 +39,8 @@ import("generator_lib.gni") dawn_allowed_gen_output_dirs = [ "src/dawn/", - "src/dawn_native/", - "src/dawn_native/opengl/", + "src/dawn/native/", + "src/dawn/native/opengl/", "src/dawn/wire/client/", "src/dawn/wire/server/", "src/dawn/wire/", diff --git a/generator/dawn_json_generator.py b/generator/dawn_json_generator.py index cc181aa565..4151f271ef 100644 --- a/generator/dawn_json_generator.py +++ b/generator/dawn_json_generator.py @@ -764,7 +764,7 @@ class MultiGeneratorFromDawnJSON(Generator): def add_commandline_arguments(self, parser): allowed_targets = [ 'dawn_headers', 'dawncpp_headers', 'dawncpp', 'dawn_proc', - 'mock_api', 'wire', "dawn_native_utils" + 'mock_api', 'wire', "native_utils" ] parser.add_argument('--dawn-json', @@ -832,8 +832,8 @@ class MultiGeneratorFromDawnJSON(Generator): if 'webgpu_dawn_native_proc' in targets: renders.append( - FileRender('dawn_native/api_dawn_native_proc.cpp', - 'src/dawn_native/webgpu_dawn_native_proc.cpp', + FileRender('dawn/native/api_dawn_native_proc.cpp', + 'src/dawn/native/webgpu_dawn_native_proc.cpp', [RENDER_PARAMS_BASE, params_dawn])) if 'dawncpp' in targets: @@ -882,7 +882,7 @@ class MultiGeneratorFromDawnJSON(Generator): FileRender('mock_api.cpp', 'src/dawn/mock_' + api + '.cpp', mock_params)) - if 'dawn_native_utils' in targets: + if 'native_utils' in targets: frontend_params = [ RENDER_PARAMS_BASE, params_dawn, @@ -895,53 +895,53 @@ class MultiGeneratorFromDawnJSON(Generator): ] impl_dir = metadata.impl_dir + '/' if metadata.impl_dir else '' - native_dir = impl_dir + Name(metadata.native_namespace).snake_case() + native_dir = impl_dir + Name(metadata.native_namespace).Dirs() namespace = metadata.namespace renders.append( - FileRender('dawn_native/ValidationUtils.h', + FileRender('dawn/native/ValidationUtils.h', 'src/' + native_dir + '/ValidationUtils_autogen.h', frontend_params)) renders.append( - FileRender('dawn_native/ValidationUtils.cpp', + FileRender('dawn/native/ValidationUtils.cpp', 'src/' + native_dir + '/ValidationUtils_autogen.cpp', frontend_params)) renders.append( - FileRender('dawn_native/dawn_platform.h', + FileRender('dawn/native/dawn_platform.h', 'src/' + native_dir + '/' + prefix + '_platform_autogen.h', frontend_params)) renders.append( - FileRender('dawn_native/api_structs.h', + FileRender('dawn/native/api_structs.h', 'src/' + native_dir + '/' + namespace + '_structs_autogen.h', frontend_params)) renders.append( - FileRender('dawn_native/api_structs.cpp', + FileRender('dawn/native/api_structs.cpp', 'src/' + native_dir + '/' + namespace + '_structs_autogen.cpp', frontend_params)) renders.append( - FileRender('dawn_native/ProcTable.cpp', + FileRender('dawn/native/ProcTable.cpp', 'src/' + native_dir + '/ProcTable.cpp', frontend_params)) renders.append( - FileRender('dawn_native/ChainUtils.h', + FileRender('dawn/native/ChainUtils.h', 'src/' + native_dir + '/ChainUtils_autogen.h', frontend_params)) renders.append( - FileRender('dawn_native/ChainUtils.cpp', + FileRender('dawn/native/ChainUtils.cpp', 'src/' + native_dir + '/ChainUtils_autogen.cpp', frontend_params)) renders.append( - FileRender('dawn_native/api_absl_format.h', + FileRender('dawn/native/api_absl_format.h', 'src/' + native_dir + '/' + api + '_absl_format_autogen.h', frontend_params)) renders.append( - FileRender('dawn_native/api_absl_format.cpp', + FileRender('dawn/native/api_absl_format.cpp', 'src/' + native_dir + '/' + api + '_absl_format_autogen.cpp', frontend_params)) renders.append( - FileRender('dawn_native/ObjectType.h', + FileRender('dawn/native/ObjectType.h', 'src/' + native_dir + '/ObjectType_autogen.h', frontend_params)) renders.append( - FileRender('dawn_native/ObjectType.cpp', + FileRender('dawn/native/ObjectType.cpp', 'src/' + native_dir + '/ObjectType_autogen.cpp', frontend_params)) diff --git a/generator/opengl_loader_generator.py b/generator/opengl_loader_generator.py index 4f4f46f6d9..db253e222d 100644 --- a/generator/opengl_loader_generator.py +++ b/generator/opengl_loader_generator.py @@ -261,13 +261,13 @@ class OpenGLLoaderGenerator(Generator): return [ FileRender( 'opengl/OpenGLFunctionsBase.cpp', - 'src/dawn_native/opengl/OpenGLFunctionsBase_autogen.cpp', + 'src/dawn/native/opengl/OpenGLFunctionsBase_autogen.cpp', [params]), FileRender('opengl/OpenGLFunctionsBase.h', - 'src/dawn_native/opengl/OpenGLFunctionsBase_autogen.h', + 'src/dawn/native/opengl/OpenGLFunctionsBase_autogen.h', [params]), FileRender('opengl/opengl_platform.h', - 'src/dawn_native/opengl/opengl_platform_autogen.h', + 'src/dawn/native/opengl/opengl_platform_autogen.h', [params]), ] diff --git a/generator/templates/dawn_native/ChainUtils.cpp b/generator/templates/dawn/native/ChainUtils.cpp similarity index 97% rename from generator/templates/dawn_native/ChainUtils.cpp rename to generator/templates/dawn/native/ChainUtils.cpp index 759a00463b..297378873a 100644 --- a/generator/templates/dawn_native/ChainUtils.cpp +++ b/generator/templates/dawn/native/ChainUtils.cpp @@ -15,7 +15,7 @@ {% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %} {% set namespace_name = Name(metadata.native_namespace) %} {% set native_namespace = namespace_name.namespace_case() %} -{% set native_dir = impl_dir + namespace_name.snake_case() %} +{% set native_dir = impl_dir + namespace_name.Dirs() %} #include "{{native_dir}}/ChainUtils_autogen.h" #include diff --git a/generator/templates/dawn_native/ChainUtils.h b/generator/templates/dawn/native/ChainUtils.h similarity index 98% rename from generator/templates/dawn_native/ChainUtils.h rename to generator/templates/dawn/native/ChainUtils.h index ce7adbc1a0..3377220d44 100644 --- a/generator/templates/dawn_native/ChainUtils.h +++ b/generator/templates/dawn/native/ChainUtils.h @@ -20,7 +20,7 @@ {% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %} {% set namespace_name = Name(metadata.native_namespace) %} {% set native_namespace = namespace_name.namespace_case() %} -{% set native_dir = impl_dir + namespace_name.snake_case() %} +{% set native_dir = impl_dir + namespace_name.Dirs() %} {% set prefix = metadata.proc_table_prefix.lower() %} #include "{{native_dir}}/{{prefix}}_platform.h" #include "{{native_dir}}/Error.h" diff --git a/generator/templates/dawn_native/ObjectType.cpp b/generator/templates/dawn/native/ObjectType.cpp similarity index 95% rename from generator/templates/dawn_native/ObjectType.cpp rename to generator/templates/dawn/native/ObjectType.cpp index 07f48381bc..8fad3d4fbe 100644 --- a/generator/templates/dawn_native/ObjectType.cpp +++ b/generator/templates/dawn/native/ObjectType.cpp @@ -15,7 +15,7 @@ {% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %} {% set namespace_name = Name(metadata.native_namespace) %} {% set native_namespace = namespace_name.namespace_case() %} -{% set native_dir = impl_dir + namespace_name.snake_case() %} +{% set native_dir = impl_dir + namespace_name.Dirs() %} #include "{{native_dir}}/ObjectType_autogen.h" namespace {{native_namespace}} { diff --git a/generator/templates/dawn_native/ObjectType.h b/generator/templates/dawn/native/ObjectType.h similarity index 100% rename from generator/templates/dawn_native/ObjectType.h rename to generator/templates/dawn/native/ObjectType.h diff --git a/generator/templates/dawn_native/ProcTable.cpp b/generator/templates/dawn/native/ProcTable.cpp similarity index 99% rename from generator/templates/dawn_native/ProcTable.cpp rename to generator/templates/dawn/native/ProcTable.cpp index cfc1e53a6b..47ac2f52e2 100644 --- a/generator/templates/dawn_native/ProcTable.cpp +++ b/generator/templates/dawn/native/ProcTable.cpp @@ -17,7 +17,7 @@ {% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %} {% set namespace_name = Name(metadata.native_namespace) %} {% set native_namespace = namespace_name.namespace_case() %} -{% set native_dir = impl_dir + namespace_name.snake_case() %} +{% set native_dir = impl_dir + namespace_name.Dirs() %} #include "{{native_dir}}/{{prefix}}_platform.h" #include "{{native_dir}}/{{Prefix}}Native.h" diff --git a/generator/templates/dawn_native/ValidationUtils.cpp b/generator/templates/dawn/native/ValidationUtils.cpp similarity index 96% rename from generator/templates/dawn_native/ValidationUtils.cpp rename to generator/templates/dawn/native/ValidationUtils.cpp index 64b991ec0b..1cb78c6794 100644 --- a/generator/templates/dawn_native/ValidationUtils.cpp +++ b/generator/templates/dawn/native/ValidationUtils.cpp @@ -15,7 +15,7 @@ {% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %} {% set namespace_name = Name(metadata.native_namespace) %} {% set native_namespace = namespace_name.namespace_case() %} -{% set native_dir = impl_dir + namespace_name.snake_case() %} +{% set native_dir = impl_dir + namespace_name.Dirs() %} #include "{{native_dir}}/ValidationUtils_autogen.h" namespace {{native_namespace}} { diff --git a/generator/templates/dawn_native/ValidationUtils.h b/generator/templates/dawn/native/ValidationUtils.h similarity index 95% rename from generator/templates/dawn_native/ValidationUtils.h rename to generator/templates/dawn/native/ValidationUtils.h index 9746397d2c..06d3cc7600 100644 --- a/generator/templates/dawn_native/ValidationUtils.h +++ b/generator/templates/dawn/native/ValidationUtils.h @@ -21,7 +21,7 @@ {% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %} {% set namespace_name = Name(metadata.native_namespace) %} {% set native_namespace = namespace_name.namespace_case() %} -{% set native_dir = impl_dir + namespace_name.snake_case() %} +{% set native_dir = impl_dir + namespace_name.Dirs() %} #include "{{native_dir}}/Error.h" namespace {{native_namespace}} { diff --git a/generator/templates/dawn_native/api_absl_format.cpp b/generator/templates/dawn/native/api_absl_format.cpp similarity index 98% rename from generator/templates/dawn_native/api_absl_format.cpp rename to generator/templates/dawn/native/api_absl_format.cpp index 90647b2185..6a9477c774 100644 --- a/generator/templates/dawn_native/api_absl_format.cpp +++ b/generator/templates/dawn/native/api_absl_format.cpp @@ -15,7 +15,7 @@ {% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %} {% set namespace_name = Name(metadata.native_namespace) %} {% set native_namespace = namespace_name.namespace_case() %} -{% set native_dir = impl_dir + namespace_name.snake_case() %} +{% set native_dir = impl_dir + namespace_name.Dirs() %} {% set api = metadata.api.lower() %} #include "{{native_dir}}/{{api}}_absl_format_autogen.h" diff --git a/generator/templates/dawn_native/api_absl_format.h b/generator/templates/dawn/native/api_absl_format.h similarity index 97% rename from generator/templates/dawn_native/api_absl_format.h rename to generator/templates/dawn/native/api_absl_format.h index 64c4153a47..5fa583f236 100644 --- a/generator/templates/dawn_native/api_absl_format.h +++ b/generator/templates/dawn/native/api_absl_format.h @@ -19,7 +19,7 @@ {% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %} {% set namespace_name = Name(metadata.native_namespace) %} {% set native_namespace = namespace_name.namespace_case() %} -{% set native_dir = impl_dir + namespace_name.snake_case() %} +{% set native_dir = impl_dir + namespace_name.Dirs() %} {% set prefix = metadata.proc_table_prefix.lower() %} #include "{{native_dir}}/{{prefix}}_platform.h" diff --git a/generator/templates/dawn_native/api_dawn_native_proc.cpp b/generator/templates/dawn/native/api_dawn_native_proc.cpp similarity index 99% rename from generator/templates/dawn_native/api_dawn_native_proc.cpp rename to generator/templates/dawn/native/api_dawn_native_proc.cpp index f17d2b4d70..f9147c6d40 100644 --- a/generator/templates/dawn_native/api_dawn_native_proc.cpp +++ b/generator/templates/dawn/native/api_dawn_native_proc.cpp @@ -16,7 +16,7 @@ namespace dawn::native { -// This file should be kept in sync with generator/templates/dawn_native/ProcTable.cpp +// This file should be kept in sync with generator/templates/dawn/native/ProcTable.cpp {% for function in by_category["function"] %} extern {{as_cType(function.return_type.name)}} Native{{as_cppType(function.name)}}( diff --git a/generator/templates/dawn_native/api_structs.cpp b/generator/templates/dawn/native/api_structs.cpp similarity index 98% rename from generator/templates/dawn_native/api_structs.cpp rename to generator/templates/dawn/native/api_structs.cpp index aa23425ade..86f54f0c46 100644 --- a/generator/templates/dawn_native/api_structs.cpp +++ b/generator/templates/dawn/native/api_structs.cpp @@ -15,7 +15,7 @@ {% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %} {% set namespace_name = Name(metadata.native_namespace) %} {% set native_namespace = namespace_name.namespace_case() %} -{% set native_dir = impl_dir + namespace_name.snake_case() %} +{% set native_dir = impl_dir + namespace_name.Dirs() %} {% set namespace = metadata.namespace %} #include "{{native_dir}}/{{namespace}}_structs_autogen.h" diff --git a/generator/templates/dawn_native/api_structs.h b/generator/templates/dawn/native/api_structs.h similarity index 98% rename from generator/templates/dawn_native/api_structs.h rename to generator/templates/dawn/native/api_structs.h index 1c1106cfac..193f93708f 100644 --- a/generator/templates/dawn_native/api_structs.h +++ b/generator/templates/dawn/native/api_structs.h @@ -22,7 +22,7 @@ #include "dawn/{{api}}_cpp.h" {% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %} {% set native_namespace = namespace_name.namespace_case() %} -{% set native_dir = impl_dir + namespace_name.snake_case() %} +{% set native_dir = impl_dir + namespace_name.Dirs() %} #include "{{native_dir}}/Forward.h" namespace {{native_namespace}} { diff --git a/generator/templates/dawn_native/dawn_platform.h b/generator/templates/dawn/native/dawn_platform.h similarity index 98% rename from generator/templates/dawn_native/dawn_platform.h rename to generator/templates/dawn/native/dawn_platform.h index 94464ca5fd..e3f1c91a33 100644 --- a/generator/templates/dawn_native/dawn_platform.h +++ b/generator/templates/dawn/native/dawn_platform.h @@ -22,7 +22,7 @@ #include "dawn/{{api}}_cpp.h" {% set impl_dir = metadata.impl_dir + "/" if metadata.impl_dir else "" %} {% set native_namespace = namespace_name.namespace_case() %} -{% set native_dir = impl_dir + namespace_name.snake_case() %} +{% set native_dir = impl_dir + namespace_name.Dirs() %} #include "{{native_dir}}/Forward.h" {% set namespace = metadata.namespace %} diff --git a/generator/templates/opengl/OpenGLFunctionsBase.cpp b/generator/templates/opengl/OpenGLFunctionsBase.cpp index 066b9a739c..acddd4fd2f 100644 --- a/generator/templates/opengl/OpenGLFunctionsBase.cpp +++ b/generator/templates/opengl/OpenGLFunctionsBase.cpp @@ -12,7 +12,7 @@ //* See the License for the specific language governing permissions and //* limitations under the License. -#include "dawn_native/opengl/OpenGLFunctionsBase_autogen.h" +#include "dawn/native/opengl/OpenGLFunctionsBase_autogen.h" namespace dawn::native::opengl { diff --git a/generator/templates/opengl/OpenGLFunctionsBase.h b/generator/templates/opengl/OpenGLFunctionsBase.h index 0d1e2d7a9a..ac313c4f9f 100644 --- a/generator/templates/opengl/OpenGLFunctionsBase.h +++ b/generator/templates/opengl/OpenGLFunctionsBase.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_OPENGL_OPENGLFUNCTIONSBASE_H_ #define DAWNNATIVE_OPENGL_OPENGLFUNCTIONSBASE_H_ -#include "dawn_native/Error.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/Error.h" +#include "dawn/native/opengl/opengl_platform.h" namespace dawn::native::opengl { using GetProcAddress = void* (*) (const char*); diff --git a/src/dawn_native/Adapter.cpp b/src/dawn/native/Adapter.cpp similarity index 98% rename from src/dawn_native/Adapter.cpp rename to src/dawn/native/Adapter.cpp index 7e38b39a93..4c000ac1bf 100644 --- a/src/dawn_native/Adapter.cpp +++ b/src/dawn/native/Adapter.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Adapter.h" +#include "dawn/native/Adapter.h" #include "dawn/common/Constants.h" -#include "dawn_native/Device.h" -#include "dawn_native/Instance.h" -#include "dawn_native/ValidationUtils_autogen.h" +#include "dawn/native/Device.h" +#include "dawn/native/Instance.h" +#include "dawn/native/ValidationUtils_autogen.h" namespace dawn::native { diff --git a/src/dawn_native/Adapter.h b/src/dawn/native/Adapter.h similarity index 95% rename from src/dawn_native/Adapter.h rename to src/dawn/native/Adapter.h index f055fafa76..bd66c8b87e 100644 --- a/src/dawn_native/Adapter.h +++ b/src/dawn/native/Adapter.h @@ -15,14 +15,14 @@ #ifndef DAWNNATIVE_ADAPTER_H_ #define DAWNNATIVE_ADAPTER_H_ -#include "dawn_native/DawnNative.h" +#include "dawn/native/DawnNative.h" #include "dawn/common/RefCounted.h" #include "dawn/common/ityp_span.h" -#include "dawn_native/Error.h" -#include "dawn_native/Features.h" -#include "dawn_native/Limits.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/Error.h" +#include "dawn/native/Features.h" +#include "dawn/native/Limits.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/AsyncTask.cpp b/src/dawn/native/AsyncTask.cpp similarity index 98% rename from src/dawn_native/AsyncTask.cpp rename to src/dawn/native/AsyncTask.cpp index f5d1a66a1b..a1e29486d9 100644 --- a/src/dawn_native/AsyncTask.cpp +++ b/src/dawn/native/AsyncTask.cpp @@ -1,4 +1,4 @@ -#include "dawn_native/AsyncTask.h" +#include "dawn/native/AsyncTask.h" #include "dawn/platform/DawnPlatform.h" diff --git a/src/dawn_native/AsyncTask.h b/src/dawn/native/AsyncTask.h similarity index 100% rename from src/dawn_native/AsyncTask.h rename to src/dawn/native/AsyncTask.h diff --git a/src/dawn_native/AttachmentState.cpp b/src/dawn/native/AttachmentState.cpp similarity index 97% rename from src/dawn_native/AttachmentState.cpp rename to src/dawn/native/AttachmentState.cpp index 6ca9e40179..c5ac739d58 100644 --- a/src/dawn_native/AttachmentState.cpp +++ b/src/dawn/native/AttachmentState.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/AttachmentState.h" +#include "dawn/native/AttachmentState.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/Device.h" -#include "dawn_native/ObjectContentHasher.h" -#include "dawn_native/Texture.h" +#include "dawn/native/Device.h" +#include "dawn/native/ObjectContentHasher.h" +#include "dawn/native/Texture.h" namespace dawn::native { diff --git a/src/dawn_native/AttachmentState.h b/src/dawn/native/AttachmentState.h similarity index 95% rename from src/dawn_native/AttachmentState.h rename to src/dawn/native/AttachmentState.h index 02e47fcc22..21eff85c56 100644 --- a/src/dawn_native/AttachmentState.h +++ b/src/dawn/native/AttachmentState.h @@ -18,11 +18,11 @@ #include "dawn/common/Constants.h" #include "dawn/common/ityp_array.h" #include "dawn/common/ityp_bitset.h" -#include "dawn_native/CachedObject.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/ObjectBase.h" +#include "dawn/native/CachedObject.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/ObjectBase.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include #include diff --git a/src/dawn/native/BUILD.gn b/src/dawn/native/BUILD.gn new file mode 100644 index 0000000000..3ea0e55908 --- /dev/null +++ b/src/dawn/native/BUILD.gn @@ -0,0 +1,776 @@ +# Copyright 2020 The Dawn Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("../../../scripts/dawn_overrides_with_defaults.gni") + +import("//build_overrides/build.gni") +import("${dawn_root}/generator/dawn_generator.gni") +import("${dawn_root}/scripts/dawn_component.gni") +import("${dawn_root}/scripts/dawn_features.gni") + +# Import mac_deployment_target +if (is_mac) { + if (dawn_has_build) { + import("//build/config/mac/mac_sdk.gni") + } else { + mac_deployment_target = "10.11.0" + } +} + +# The VVLs are an optional dependency, only use it if the path has been set. +enable_vulkan_validation_layers = dawn_enable_vulkan_validation_layers && + dawn_vulkan_validation_layers_dir != "" +if (enable_vulkan_validation_layers) { + import("//build_overrides/vulkan_validation_layers.gni") +} + +# ANGLE is an optional dependency; only use it if the path has been set. +use_angle = dawn_use_angle && defined(dawn_angle_dir) + +# Swiftshader is an optional dependency, only use it if the path has been set. +use_swiftshader = dawn_use_swiftshader && dawn_swiftshader_dir != "" +if (use_swiftshader) { + assert(dawn_enable_vulkan, + "dawn_use_swiftshader requires dawn_enable_vulkan=true") + import("${dawn_swiftshader_dir}/src/Vulkan/vulkan.gni") +} + +# The Vulkan loader is an optional dependency, only use it if the path has been +# set. +if (dawn_enable_vulkan) { + enable_vulkan_loader = + dawn_enable_vulkan_loader && dawn_vulkan_loader_dir != "" +} + +group("abseil") { + # When build_with_chromium=true we need to include "//third_party/abseil-cpp:absl" while + # it's beneficial to be more specific with standalone Dawn, especially when it comes to + # including it as a dependency in other projects (such as Skia). + if (build_with_chromium) { + public_deps = [ "$dawn_abseil_dir:absl" ] + } else { + public_deps = [ "${dawn_root}/third_party/gn/abseil-cpp:str_format" ] + } +} + +config("internal") { + configs = [ "${dawn_root}/src/dawn/common:internal_config" ] + + # Suppress warnings that Metal isn't in the deployment target of Chrome: + # initialization of the Metal backend is behind a IsMetalSupported check so + # Dawn won't call Metal functions on macOS 10.10. + # At the time this is written Chromium supports 10.10.0 and above, so if we + # aren't on 10.11 it means we are on 10.11 and above, and Metal is available. + # Skipping this check on 10.11 and above is important as it allows getting + # proper compilation warning when using 10.12 and above feature for example. + # TODO(crbug.com/1004024): Consider using API_AVAILABLE annotations on all + # metal code in dawn once crbug.com/1004024 is sorted out if Chromium still + # supports 10.10 then. + if (is_mac && mac_deployment_target == "10.10.0") { + cflags_objcc = [ "-Wno-unguarded-availability" ] + } +} + +config("weak_framework") { + if (is_mac && dawn_enable_metal) { + weak_frameworks = [ "Metal.framework" ] + } +} + +# Config that adds the @executable_path rpath if needed so that Swiftshader or the Vulkan loader are found. +config("vulkan_rpath") { + if (is_mac && dawn_enable_vulkan && + (use_swiftshader || enable_vulkan_loader)) { + ldflags = [ + "-rpath", + "@executable_path/", + ] + } +} + +dawn_json_generator("utils_gen") { + target = "native_utils" + outputs = [ + "src/dawn/native/ChainUtils_autogen.h", + "src/dawn/native/ChainUtils_autogen.cpp", + "src/dawn/native/ProcTable.cpp", + "src/dawn/native/dawn_platform_autogen.h", + "src/dawn/native/wgpu_structs_autogen.h", + "src/dawn/native/wgpu_structs_autogen.cpp", + "src/dawn/native/ValidationUtils_autogen.h", + "src/dawn/native/ValidationUtils_autogen.cpp", + "src/dawn/native/webgpu_absl_format_autogen.h", + "src/dawn/native/webgpu_absl_format_autogen.cpp", + "src/dawn/native/ObjectType_autogen.h", + "src/dawn/native/ObjectType_autogen.cpp", + ] +} + +if (dawn_enable_opengl) { + dawn_generator("opengl_loader_gen") { + script = "${dawn_root}/generator/opengl_loader_generator.py" + args = [ + "--gl-xml", + rebase_path("${dawn_root}/third_party/khronos/gl.xml", root_build_dir), + "--supported-extensions", + rebase_path("opengl/supported_extensions.json", root_build_dir), + ] + outputs = [ + "src/dawn/native/opengl/OpenGLFunctionsBase_autogen.cpp", + "src/dawn/native/opengl/OpenGLFunctionsBase_autogen.h", + "src/dawn/native/opengl/opengl_platform_autogen.h", + ] + } +} + +# Public dawn native headers so they can be publicly visible for +# dependencies of dawn native +source_set("headers") { + public_deps = [ "${dawn_root}/src/dawn:dawncpp_headers" ] + all_dependent_configs = [ "${dawn_root}/src/dawn/common:public_include_dirs" ] + sources = [ + "${dawn_root}/src/include/dawn/native/DawnNative.h", + "${dawn_root}/src/include/dawn/native/dawn_native_export.h", + + # Include all backend's public headers so that dependencies can include + # them even when the backends are disabled. + "${dawn_root}/src/include/dawn/native/D3D12Backend.h", + "${dawn_root}/src/include/dawn/native/MetalBackend.h", + "${dawn_root}/src/include/dawn/native/NullBackend.h", + "${dawn_root}/src/include/dawn/native/OpenGLBackend.h", + "${dawn_root}/src/include/dawn/native/VulkanBackend.h", + ] +} + +# The meat of the compilation for dawn native so that we can cheaply have +# shared_library / static_library versions of it. It compiles all the files +# except those that define exported symbols. +source_set("sources") { + deps = [ + ":headers", + ":utils_gen", + "${dawn_root}/src/dawn/common", + "${dawn_spirv_tools_dir}:spvtools_opt", + "${dawn_spirv_tools_dir}:spvtools_val", + "${dawn_tint_dir}/src:libtint", + ] + if (dawn_use_spirv_cross) { + deps += [ "${dawn_root}/third_party/gn/spirv_cross:spirv_cross" ] + } + defines = [] + libs = [] + data_deps = [] + + configs += [ ":internal" ] + + # Dependencies that are needed to compile dawn native entry points in + # FooBackend.cpp need to be public deps so they are propagated to the + # dawn native target + public_deps = [ + ":abseil", + "${dawn_root}/src/dawn/platform", + ] + + sources = get_target_outputs(":utils_gen") + sources += [ + "Adapter.cpp", + "Adapter.h", + "AsyncTask.cpp", + "AsyncTask.h", + "AttachmentState.cpp", + "AttachmentState.h", + "BackendConnection.cpp", + "BackendConnection.h", + "BindGroup.cpp", + "BindGroup.h", + "BindGroupLayout.cpp", + "BindGroupLayout.h", + "BindGroupTracker.h", + "BindingInfo.cpp", + "BindingInfo.h", + "BuddyAllocator.cpp", + "BuddyAllocator.h", + "BuddyMemoryAllocator.cpp", + "BuddyMemoryAllocator.h", + "Buffer.cpp", + "Buffer.h", + "CachedObject.cpp", + "CachedObject.h", + "CallbackTaskManager.cpp", + "CallbackTaskManager.h", + "CommandAllocator.cpp", + "CommandAllocator.h", + "CommandBuffer.cpp", + "CommandBuffer.h", + "CommandBufferStateTracker.cpp", + "CommandBufferStateTracker.h", + "CommandEncoder.cpp", + "CommandEncoder.h", + "CommandValidation.cpp", + "CommandValidation.h", + "Commands.cpp", + "Commands.h", + "CompilationMessages.cpp", + "CompilationMessages.h", + "ComputePassEncoder.cpp", + "ComputePassEncoder.h", + "ComputePipeline.cpp", + "ComputePipeline.h", + "CopyTextureForBrowserHelper.cpp", + "CopyTextureForBrowserHelper.h", + "CreatePipelineAsyncTask.cpp", + "CreatePipelineAsyncTask.h", + "Device.cpp", + "Device.h", + "DynamicUploader.cpp", + "DynamicUploader.h", + "EncodingContext.cpp", + "EncodingContext.h", + "EnumClassBitmasks.h", + "EnumMaskIterator.h", + "Error.cpp", + "Error.h", + "ErrorData.cpp", + "ErrorData.h", + "ErrorInjector.cpp", + "ErrorInjector.h", + "ErrorScope.cpp", + "ErrorScope.h", + "ExternalTexture.cpp", + "ExternalTexture.h", + "Features.cpp", + "Features.h", + "Format.cpp", + "Format.h", + "Forward.h", + "IndirectDrawMetadata.cpp", + "IndirectDrawMetadata.h", + "IndirectDrawValidationEncoder.cpp", + "IndirectDrawValidationEncoder.h", + "Instance.cpp", + "Instance.h", + "IntegerTypes.h", + "InternalPipelineStore.cpp", + "InternalPipelineStore.h", + "Limits.cpp", + "Limits.h", + "ObjectBase.cpp", + "ObjectBase.h", + "ObjectContentHasher.cpp", + "ObjectContentHasher.h", + "PassResourceUsage.h", + "PassResourceUsageTracker.cpp", + "PassResourceUsageTracker.h", + "PerStage.cpp", + "PerStage.h", + "PersistentCache.cpp", + "PersistentCache.h", + "Pipeline.cpp", + "Pipeline.h", + "PipelineLayout.cpp", + "PipelineLayout.h", + "PooledResourceMemoryAllocator.cpp", + "PooledResourceMemoryAllocator.h", + "ProgrammableEncoder.cpp", + "ProgrammableEncoder.h", + "QueryHelper.cpp", + "QueryHelper.h", + "QuerySet.cpp", + "QuerySet.h", + "Queue.cpp", + "Queue.h", + "RenderBundle.cpp", + "RenderBundle.h", + "RenderBundleEncoder.cpp", + "RenderBundleEncoder.h", + "RenderEncoderBase.cpp", + "RenderEncoderBase.h", + "RenderPassEncoder.cpp", + "RenderPassEncoder.h", + "RenderPipeline.cpp", + "RenderPipeline.h", + "ResourceHeap.h", + "ResourceHeapAllocator.h", + "ResourceMemoryAllocation.cpp", + "ResourceMemoryAllocation.h", + "RingBufferAllocator.cpp", + "RingBufferAllocator.h", + "Sampler.cpp", + "Sampler.h", + "ScratchBuffer.cpp", + "ScratchBuffer.h", + "ShaderModule.cpp", + "ShaderModule.h", + "StagingBuffer.cpp", + "StagingBuffer.h", + "Subresource.cpp", + "Subresource.h", + "SubresourceStorage.h", + "Surface.cpp", + "Surface.h", + "SwapChain.cpp", + "SwapChain.h", + "Texture.cpp", + "Texture.h", + "TintUtils.cpp", + "TintUtils.h", + "ToBackend.h", + "Toggles.cpp", + "Toggles.h", + "VertexFormat.cpp", + "VertexFormat.h", + "dawn_platform.h", + "utils/WGPUHelpers.cpp", + "utils/WGPUHelpers.h", + "webgpu_absl_format.cpp", + "webgpu_absl_format.h", + ] + + if (dawn_use_x11) { + libs += [ "X11" ] + sources += [ + "XlibXcbFunctions.cpp", + "XlibXcbFunctions.h", + ] + } + + # Only win32 app needs to link with user32.lib + # In UWP, all availiable APIs are defined in WindowsApp.lib + if (is_win && !dawn_is_winuwp) { + libs += [ "user32.lib" ] + } + + if (dawn_is_winuwp && is_debug) { + # DXGIGetDebugInterface1 is defined in dxgi.lib + # But this API is tagged as a development-only capability + # which implies that linking to this function will cause + # the application to fail Windows store certification + # So we only link to it in debug build when compiling for UWP. + # In win32 we load dxgi.dll using LoadLibrary + # so no need for static linking. + libs += [ "dxgi.lib" ] + } + + # TODO(dawn:766): + # Should link dxcompiler.lib and WinPixEventRuntime_UAP.lib in UWP + # Somehow use dxcompiler.lib makes CoreApp unable to activate + # WinPIX should be added as third party tools and linked statically + + if (dawn_enable_d3d12) { + libs += [ "dxguid.lib" ] + sources += [ + "d3d12/AdapterD3D12.cpp", + "d3d12/AdapterD3D12.h", + "d3d12/BackendD3D12.cpp", + "d3d12/BackendD3D12.h", + "d3d12/BindGroupD3D12.cpp", + "d3d12/BindGroupD3D12.h", + "d3d12/BindGroupLayoutD3D12.cpp", + "d3d12/BindGroupLayoutD3D12.h", + "d3d12/BufferD3D12.cpp", + "d3d12/BufferD3D12.h", + "d3d12/CPUDescriptorHeapAllocationD3D12.cpp", + "d3d12/CPUDescriptorHeapAllocationD3D12.h", + "d3d12/CommandAllocatorManager.cpp", + "d3d12/CommandAllocatorManager.h", + "d3d12/CommandBufferD3D12.cpp", + "d3d12/CommandBufferD3D12.h", + "d3d12/CommandRecordingContext.cpp", + "d3d12/CommandRecordingContext.h", + "d3d12/ComputePipelineD3D12.cpp", + "d3d12/ComputePipelineD3D12.h", + "d3d12/D3D11on12Util.cpp", + "d3d12/D3D11on12Util.h", + "d3d12/D3D12Error.cpp", + "d3d12/D3D12Error.h", + "d3d12/D3D12Info.cpp", + "d3d12/D3D12Info.h", + "d3d12/DeviceD3D12.cpp", + "d3d12/DeviceD3D12.h", + "d3d12/Forward.h", + "d3d12/GPUDescriptorHeapAllocationD3D12.cpp", + "d3d12/GPUDescriptorHeapAllocationD3D12.h", + "d3d12/HeapAllocatorD3D12.cpp", + "d3d12/HeapAllocatorD3D12.h", + "d3d12/HeapD3D12.cpp", + "d3d12/HeapD3D12.h", + "d3d12/IntegerTypes.h", + "d3d12/NativeSwapChainImplD3D12.cpp", + "d3d12/NativeSwapChainImplD3D12.h", + "d3d12/PageableD3D12.cpp", + "d3d12/PageableD3D12.h", + "d3d12/PipelineLayoutD3D12.cpp", + "d3d12/PipelineLayoutD3D12.h", + "d3d12/PlatformFunctions.cpp", + "d3d12/PlatformFunctions.h", + "d3d12/QuerySetD3D12.cpp", + "d3d12/QuerySetD3D12.h", + "d3d12/QueueD3D12.cpp", + "d3d12/QueueD3D12.h", + "d3d12/RenderPassBuilderD3D12.cpp", + "d3d12/RenderPassBuilderD3D12.h", + "d3d12/RenderPipelineD3D12.cpp", + "d3d12/RenderPipelineD3D12.h", + "d3d12/ResidencyManagerD3D12.cpp", + "d3d12/ResidencyManagerD3D12.h", + "d3d12/ResourceAllocatorManagerD3D12.cpp", + "d3d12/ResourceAllocatorManagerD3D12.h", + "d3d12/ResourceHeapAllocationD3D12.cpp", + "d3d12/ResourceHeapAllocationD3D12.h", + "d3d12/SamplerD3D12.cpp", + "d3d12/SamplerD3D12.h", + "d3d12/SamplerHeapCacheD3D12.cpp", + "d3d12/SamplerHeapCacheD3D12.h", + "d3d12/ShaderModuleD3D12.cpp", + "d3d12/ShaderModuleD3D12.h", + "d3d12/ShaderVisibleDescriptorAllocatorD3D12.cpp", + "d3d12/ShaderVisibleDescriptorAllocatorD3D12.h", + "d3d12/StagingBufferD3D12.cpp", + "d3d12/StagingBufferD3D12.h", + "d3d12/StagingDescriptorAllocatorD3D12.cpp", + "d3d12/StagingDescriptorAllocatorD3D12.h", + "d3d12/SwapChainD3D12.cpp", + "d3d12/SwapChainD3D12.h", + "d3d12/TextureCopySplitter.cpp", + "d3d12/TextureCopySplitter.h", + "d3d12/TextureD3D12.cpp", + "d3d12/TextureD3D12.h", + "d3d12/UtilsD3D12.cpp", + "d3d12/UtilsD3D12.h", + "d3d12/d3d12_platform.h", + ] + } + + if (dawn_enable_metal) { + frameworks = [ + "Cocoa.framework", + "IOKit.framework", + "IOSurface.framework", + "QuartzCore.framework", + ] + sources += [ + "Surface_metal.mm", + "metal/BackendMTL.h", + "metal/BackendMTL.mm", + "metal/BindGroupLayoutMTL.h", + "metal/BindGroupLayoutMTL.mm", + "metal/BindGroupMTL.h", + "metal/BindGroupMTL.mm", + "metal/BufferMTL.h", + "metal/BufferMTL.mm", + "metal/CommandBufferMTL.h", + "metal/CommandBufferMTL.mm", + "metal/CommandRecordingContext.h", + "metal/CommandRecordingContext.mm", + "metal/ComputePipelineMTL.h", + "metal/ComputePipelineMTL.mm", + "metal/DeviceMTL.h", + "metal/DeviceMTL.mm", + "metal/Forward.h", + "metal/PipelineLayoutMTL.h", + "metal/PipelineLayoutMTL.mm", + "metal/QuerySetMTL.h", + "metal/QuerySetMTL.mm", + "metal/QueueMTL.h", + "metal/QueueMTL.mm", + "metal/RenderPipelineMTL.h", + "metal/RenderPipelineMTL.mm", + "metal/SamplerMTL.h", + "metal/SamplerMTL.mm", + "metal/ShaderModuleMTL.h", + "metal/ShaderModuleMTL.mm", + "metal/StagingBufferMTL.h", + "metal/StagingBufferMTL.mm", + "metal/SwapChainMTL.h", + "metal/SwapChainMTL.mm", + "metal/TextureMTL.h", + "metal/TextureMTL.mm", + "metal/UtilsMetal.h", + "metal/UtilsMetal.mm", + ] + } + + if (dawn_enable_null) { + sources += [ + "null/DeviceNull.cpp", + "null/DeviceNull.h", + ] + } + + if (dawn_enable_opengl || dawn_enable_vulkan) { + sources += [ + "SpirvValidation.cpp", + "SpirvValidation.h", + ] + } + + if (dawn_enable_opengl) { + public_deps += [ + ":opengl_loader_gen", + "${dawn_root}/third_party/khronos:khronos_platform", + ] + sources += get_target_outputs(":opengl_loader_gen") + sources += [ + "opengl/BackendGL.cpp", + "opengl/BackendGL.h", + "opengl/BindGroupGL.cpp", + "opengl/BindGroupGL.h", + "opengl/BindGroupLayoutGL.cpp", + "opengl/BindGroupLayoutGL.h", + "opengl/BufferGL.cpp", + "opengl/BufferGL.h", + "opengl/CommandBufferGL.cpp", + "opengl/CommandBufferGL.h", + "opengl/ComputePipelineGL.cpp", + "opengl/ComputePipelineGL.h", + "opengl/DeviceGL.cpp", + "opengl/DeviceGL.h", + "opengl/Forward.h", + "opengl/GLFormat.cpp", + "opengl/GLFormat.h", + "opengl/NativeSwapChainImplGL.cpp", + "opengl/NativeSwapChainImplGL.h", + "opengl/OpenGLFunctions.cpp", + "opengl/OpenGLFunctions.h", + "opengl/OpenGLVersion.cpp", + "opengl/OpenGLVersion.h", + "opengl/PersistentPipelineStateGL.cpp", + "opengl/PersistentPipelineStateGL.h", + "opengl/PipelineGL.cpp", + "opengl/PipelineGL.h", + "opengl/PipelineLayoutGL.cpp", + "opengl/PipelineLayoutGL.h", + "opengl/QuerySetGL.cpp", + "opengl/QuerySetGL.h", + "opengl/QueueGL.cpp", + "opengl/QueueGL.h", + "opengl/RenderPipelineGL.cpp", + "opengl/RenderPipelineGL.h", + "opengl/SamplerGL.cpp", + "opengl/SamplerGL.h", + "opengl/ShaderModuleGL.cpp", + "opengl/ShaderModuleGL.h", + "opengl/SpirvUtils.cpp", + "opengl/SpirvUtils.h", + "opengl/SwapChainGL.cpp", + "opengl/SwapChainGL.h", + "opengl/TextureGL.cpp", + "opengl/TextureGL.h", + "opengl/UtilsGL.cpp", + "opengl/UtilsGL.h", + "opengl/opengl_platform.h", + ] + } + + if (dawn_enable_vulkan) { + public_deps += [ "${dawn_root}/third_party/khronos:vulkan_headers" ] + sources += [ + "vulkan/AdapterVk.cpp", + "vulkan/AdapterVk.h", + "vulkan/BackendVk.cpp", + "vulkan/BackendVk.h", + "vulkan/BindGroupLayoutVk.cpp", + "vulkan/BindGroupLayoutVk.h", + "vulkan/BindGroupVk.cpp", + "vulkan/BindGroupVk.h", + "vulkan/BufferVk.cpp", + "vulkan/BufferVk.h", + "vulkan/CommandBufferVk.cpp", + "vulkan/CommandBufferVk.h", + "vulkan/CommandRecordingContext.h", + "vulkan/ComputePipelineVk.cpp", + "vulkan/ComputePipelineVk.h", + "vulkan/DescriptorSetAllocation.h", + "vulkan/DescriptorSetAllocator.cpp", + "vulkan/DescriptorSetAllocator.h", + "vulkan/DeviceVk.cpp", + "vulkan/DeviceVk.h", + "vulkan/ExternalHandle.h", + "vulkan/FencedDeleter.cpp", + "vulkan/FencedDeleter.h", + "vulkan/Forward.h", + "vulkan/NativeSwapChainImplVk.cpp", + "vulkan/NativeSwapChainImplVk.h", + "vulkan/PipelineLayoutVk.cpp", + "vulkan/PipelineLayoutVk.h", + "vulkan/QuerySetVk.cpp", + "vulkan/QuerySetVk.h", + "vulkan/QueueVk.cpp", + "vulkan/QueueVk.h", + "vulkan/RenderPassCache.cpp", + "vulkan/RenderPassCache.h", + "vulkan/RenderPipelineVk.cpp", + "vulkan/RenderPipelineVk.h", + "vulkan/ResourceHeapVk.cpp", + "vulkan/ResourceHeapVk.h", + "vulkan/ResourceMemoryAllocatorVk.cpp", + "vulkan/ResourceMemoryAllocatorVk.h", + "vulkan/SamplerVk.cpp", + "vulkan/SamplerVk.h", + "vulkan/ShaderModuleVk.cpp", + "vulkan/ShaderModuleVk.h", + "vulkan/StagingBufferVk.cpp", + "vulkan/StagingBufferVk.h", + "vulkan/SwapChainVk.cpp", + "vulkan/SwapChainVk.h", + "vulkan/TextureVk.cpp", + "vulkan/TextureVk.h", + "vulkan/UtilsVulkan.cpp", + "vulkan/UtilsVulkan.h", + "vulkan/VulkanError.cpp", + "vulkan/VulkanError.h", + "vulkan/VulkanExtensions.cpp", + "vulkan/VulkanExtensions.h", + "vulkan/VulkanFunctions.cpp", + "vulkan/VulkanFunctions.h", + "vulkan/VulkanInfo.cpp", + "vulkan/VulkanInfo.h", + "vulkan/external_memory/MemoryService.h", + "vulkan/external_semaphore/SemaphoreService.h", + ] + + if (is_chromeos) { + sources += [ + "vulkan/external_memory/MemoryServiceDmaBuf.cpp", + "vulkan/external_semaphore/SemaphoreServiceFD.cpp", + ] + defines += [ "DAWN_USE_SYNC_FDS" ] + } else if (is_linux) { + sources += [ + "vulkan/external_memory/MemoryServiceOpaqueFD.cpp", + "vulkan/external_semaphore/SemaphoreServiceFD.cpp", + ] + } else if (is_fuchsia) { + sources += [ + "vulkan/external_memory/MemoryServiceZirconHandle.cpp", + "vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp", + ] + } else { + sources += [ + "vulkan/external_memory/MemoryServiceNull.cpp", + "vulkan/external_semaphore/SemaphoreServiceNull.cpp", + ] + } + if (build_with_chromium && is_fuchsia) { + # Necessary to ensure that the Vulkan libraries will be in the + # final Fuchsia package. + data_deps = [ + "//third_party/fuchsia-sdk:vulkan_base", + "//third_party/fuchsia-sdk:vulkan_validation", + + # NOTE: The line below is a work around for http://crbug.com/1001081 + "//third_party/fuchsia-sdk/sdk:trace_engine", + ] + } + if (dawn_is_winuwp) { + defines += [ "DAWN_IS_WINUWP" ] + } + if (enable_vulkan_validation_layers) { + defines += [ + "DAWN_ENABLE_VULKAN_VALIDATION_LAYERS", + "DAWN_VK_DATA_DIR=\"$vulkan_data_subdir\"", + ] + } + if (enable_vulkan_loader) { + data_deps += [ "${dawn_vulkan_loader_dir}:libvulkan" ] + } + if (use_swiftshader) { + data_deps += + [ "${dawn_swiftshader_dir}/src/Vulkan:swiftshader_libvulkan" ] + defines += [ "DAWN_ENABLE_SWIFTSHADER" ] + } + } + + if (use_angle) { + data_deps += [ + "${dawn_angle_dir}:libEGL", + "${dawn_angle_dir}:libGLESv2", + ] + } +} + +# The static and shared libraries for dawn_native. Most of the files are +# already compiled in dawn_native_sources, but we still need to compile +# files defining exported symbols. +dawn_component("native") { + DEFINE_PREFIX = "DAWN_NATIVE" + + #Make headers publically visible + public_deps = [ ":headers" ] + + deps = [ + ":sources", + "${dawn_root}/src/dawn/common", + ] + sources = [ "DawnNative.cpp" ] + configs = [ ":internal" ] + public_configs = [ + ":weak_framework", + ":vulkan_rpath", + ] + + if (dawn_enable_d3d12) { + sources += [ "d3d12/D3D12Backend.cpp" ] + } + if (dawn_enable_metal) { + sources += [ "metal/MetalBackend.mm" ] + } + if (dawn_enable_null) { + sources += [ "null/NullBackend.cpp" ] + } + if (dawn_enable_opengl) { + sources += [ "opengl/OpenGLBackend.cpp" ] + } + if (dawn_enable_vulkan) { + sources += [ "vulkan/VulkanBackend.cpp" ] + + if (enable_vulkan_validation_layers) { + data_deps = + [ "${dawn_vulkan_validation_layers_dir}:vulkan_validation_layers" ] + if (!is_android) { + data_deps += + [ "${dawn_vulkan_validation_layers_dir}:vulkan_gen_json_files" ] + } + } + } +} + +dawn_json_generator("webgpu_dawn_native_proc_gen") { + target = "webgpu_dawn_native_proc" + outputs = [ "src/dawn/native/webgpu_dawn_native_proc.cpp" ] +} + +dawn_component("webgpu_dawn") { + # For a single library - build `webgpu_dawn_shared` with GN args: + # dawn_complete_static_libs = true - to package a single lib + # + # is_debug = false + # - setting this to true makes library over 50Mb + # + # use_custom_libcxx = false + # - Otherwise, libc++ symbols may conflict if the + # library is used outside of Chromium. + # + # dawn_use_swiftshader = false + # angle_enable_swiftshader = false + # - SwiftShader can't be built without use_custom_libcxx. + # It should be built separately. + DEFINE_PREFIX = "WGPU" + + sources = get_target_outputs(":webgpu_dawn_native_proc_gen") + deps = [ + ":static", + ":webgpu_dawn_native_proc_gen", + ] +} diff --git a/src/dawn_native/BackendConnection.cpp b/src/dawn/native/BackendConnection.cpp similarity index 96% rename from src/dawn_native/BackendConnection.cpp rename to src/dawn/native/BackendConnection.cpp index b0aae671c4..abcc271453 100644 --- a/src/dawn_native/BackendConnection.cpp +++ b/src/dawn/native/BackendConnection.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/BackendConnection.h" +#include "dawn/native/BackendConnection.h" namespace dawn::native { diff --git a/src/dawn_native/BackendConnection.h b/src/dawn/native/BackendConnection.h similarity index 96% rename from src/dawn_native/BackendConnection.h rename to src/dawn/native/BackendConnection.h index 51051428c8..2879fad963 100644 --- a/src/dawn_native/BackendConnection.h +++ b/src/dawn/native/BackendConnection.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_BACKENDCONNECTION_H_ #define DAWNNATIVE_BACKENDCONNECTION_H_ -#include "dawn_native/Adapter.h" -#include "dawn_native/DawnNative.h" +#include "dawn/native/Adapter.h" +#include "dawn/native/DawnNative.h" #include diff --git a/src/dawn_native/BindGroup.cpp b/src/dawn/native/BindGroup.cpp similarity index 98% rename from src/dawn_native/BindGroup.cpp rename to src/dawn/native/BindGroup.cpp index dc5f0b6ef3..0f3fe4b599 100644 --- a/src/dawn_native/BindGroup.cpp +++ b/src/dawn/native/BindGroup.cpp @@ -12,20 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/BindGroup.h" +#include "dawn/native/BindGroup.h" #include "dawn/common/Assert.h" #include "dawn/common/Math.h" #include "dawn/common/ityp_bitset.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/ChainUtils_autogen.h" -#include "dawn_native/Device.h" -#include "dawn_native/ExternalTexture.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/Sampler.h" -#include "dawn_native/Texture.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/ChainUtils_autogen.h" +#include "dawn/native/Device.h" +#include "dawn/native/ExternalTexture.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/Sampler.h" +#include "dawn/native/Texture.h" namespace dawn::native { diff --git a/src/dawn_native/BindGroup.h b/src/dawn/native/BindGroup.h similarity index 94% rename from src/dawn_native/BindGroup.h rename to src/dawn/native/BindGroup.h index 3e6d87d4bd..60bdd67fef 100644 --- a/src/dawn_native/BindGroup.h +++ b/src/dawn/native/BindGroup.h @@ -17,12 +17,12 @@ #include "dawn/common/Constants.h" #include "dawn/common/Math.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/ObjectBase.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/ObjectBase.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/BindGroupLayout.cpp b/src/dawn/native/BindGroupLayout.cpp similarity index 98% rename from src/dawn_native/BindGroupLayout.cpp rename to src/dawn/native/BindGroupLayout.cpp index 78378c4c33..a523239720 100644 --- a/src/dawn_native/BindGroupLayout.cpp +++ b/src/dawn/native/BindGroupLayout.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/BindGroupLayout.h" +#include "dawn/native/BindGroupLayout.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/ChainUtils_autogen.h" -#include "dawn_native/Device.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/ObjectContentHasher.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/PerStage.h" -#include "dawn_native/ValidationUtils_autogen.h" +#include "dawn/native/ChainUtils_autogen.h" +#include "dawn/native/Device.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/ObjectContentHasher.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/PerStage.h" +#include "dawn/native/ValidationUtils_autogen.h" #include #include diff --git a/src/dawn_native/BindGroupLayout.h b/src/dawn/native/BindGroupLayout.h similarity index 96% rename from src/dawn_native/BindGroupLayout.h rename to src/dawn/native/BindGroupLayout.h index a4dbb7757a..94d4e5eb55 100644 --- a/src/dawn_native/BindGroupLayout.h +++ b/src/dawn/native/BindGroupLayout.h @@ -20,13 +20,13 @@ #include "dawn/common/SlabAllocator.h" #include "dawn/common/ityp_span.h" #include "dawn/common/ityp_vector.h" -#include "dawn_native/BindingInfo.h" -#include "dawn_native/CachedObject.h" -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/ObjectBase.h" +#include "dawn/native/BindingInfo.h" +#include "dawn/native/CachedObject.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/ObjectBase.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include #include diff --git a/src/dawn_native/BindGroupTracker.h b/src/dawn/native/BindGroupTracker.h similarity index 98% rename from src/dawn_native/BindGroupTracker.h rename to src/dawn/native/BindGroupTracker.h index f0f61002a3..72d0cf4ce4 100644 --- a/src/dawn_native/BindGroupTracker.h +++ b/src/dawn/native/BindGroupTracker.h @@ -16,9 +16,9 @@ #define DAWNNATIVE_BINDGROUPTRACKER_H_ #include "dawn/common/Constants.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Pipeline.h" -#include "dawn_native/PipelineLayout.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Pipeline.h" +#include "dawn/native/PipelineLayout.h" #include #include diff --git a/src/dawn_native/BindingInfo.cpp b/src/dawn/native/BindingInfo.cpp similarity index 99% rename from src/dawn_native/BindingInfo.cpp rename to src/dawn/native/BindingInfo.cpp index d24c150878..ce4632c903 100644 --- a/src/dawn_native/BindingInfo.cpp +++ b/src/dawn/native/BindingInfo.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/BindingInfo.h" +#include "dawn/native/BindingInfo.h" -#include "dawn_native/ChainUtils_autogen.h" +#include "dawn/native/ChainUtils_autogen.h" namespace dawn::native { diff --git a/src/dawn_native/BindingInfo.h b/src/dawn/native/BindingInfo.h similarity index 95% rename from src/dawn_native/BindingInfo.h rename to src/dawn/native/BindingInfo.h index b9096968ed..24676c840e 100644 --- a/src/dawn_native/BindingInfo.h +++ b/src/dawn/native/BindingInfo.h @@ -17,12 +17,12 @@ #include "dawn/common/Constants.h" #include "dawn/common/ityp_array.h" -#include "dawn_native/Error.h" -#include "dawn_native/Format.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/PerStage.h" +#include "dawn/native/Error.h" +#include "dawn/native/Format.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/PerStage.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/BuddyAllocator.cpp b/src/dawn/native/BuddyAllocator.cpp similarity index 99% rename from src/dawn_native/BuddyAllocator.cpp rename to src/dawn/native/BuddyAllocator.cpp index e3982853fb..76d7a657a2 100644 --- a/src/dawn_native/BuddyAllocator.cpp +++ b/src/dawn/native/BuddyAllocator.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/BuddyAllocator.h" +#include "dawn/native/BuddyAllocator.h" #include "dawn/common/Assert.h" #include "dawn/common/Math.h" diff --git a/src/dawn_native/BuddyAllocator.h b/src/dawn/native/BuddyAllocator.h similarity index 100% rename from src/dawn_native/BuddyAllocator.h rename to src/dawn/native/BuddyAllocator.h diff --git a/src/dawn_native/BuddyMemoryAllocator.cpp b/src/dawn/native/BuddyMemoryAllocator.cpp similarity index 98% rename from src/dawn_native/BuddyMemoryAllocator.cpp rename to src/dawn/native/BuddyMemoryAllocator.cpp index fc6e4820da..faee03e2da 100644 --- a/src/dawn_native/BuddyMemoryAllocator.cpp +++ b/src/dawn/native/BuddyMemoryAllocator.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/BuddyMemoryAllocator.h" +#include "dawn/native/BuddyMemoryAllocator.h" #include "dawn/common/Math.h" -#include "dawn_native/ResourceHeapAllocator.h" +#include "dawn/native/ResourceHeapAllocator.h" namespace dawn::native { diff --git a/src/dawn_native/BuddyMemoryAllocator.h b/src/dawn/native/BuddyMemoryAllocator.h similarity index 95% rename from src/dawn_native/BuddyMemoryAllocator.h rename to src/dawn/native/BuddyMemoryAllocator.h index 18b4635997..7fcfe71cb3 100644 --- a/src/dawn_native/BuddyMemoryAllocator.h +++ b/src/dawn/native/BuddyMemoryAllocator.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_BUDDYMEMORYALLOCATOR_H_ #define DAWNNATIVE_BUDDYMEMORYALLOCATOR_H_ -#include "dawn_native/BuddyAllocator.h" -#include "dawn_native/Error.h" -#include "dawn_native/ResourceMemoryAllocation.h" +#include "dawn/native/BuddyAllocator.h" +#include "dawn/native/Error.h" +#include "dawn/native/ResourceMemoryAllocation.h" #include #include diff --git a/src/dawn_native/Buffer.cpp b/src/dawn/native/Buffer.cpp similarity index 98% rename from src/dawn_native/Buffer.cpp rename to src/dawn/native/Buffer.cpp index 294889eb8a..f324597401 100644 --- a/src/dawn_native/Buffer.cpp +++ b/src/dawn/native/Buffer.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Buffer.h" +#include "dawn/native/Buffer.h" #include "dawn/common/Alloc.h" #include "dawn/common/Assert.h" -#include "dawn_native/Commands.h" -#include "dawn_native/Device.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/ErrorData.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/Queue.h" -#include "dawn_native/ValidationUtils_autogen.h" +#include "dawn/native/Commands.h" +#include "dawn/native/Device.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/ErrorData.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/Queue.h" +#include "dawn/native/ValidationUtils_autogen.h" #include #include diff --git a/src/dawn_native/Buffer.h b/src/dawn/native/Buffer.h similarity index 96% rename from src/dawn_native/Buffer.h rename to src/dawn/native/Buffer.h index 534100ad8e..2a9759ff2d 100644 --- a/src/dawn_native/Buffer.h +++ b/src/dawn/native/Buffer.h @@ -15,12 +15,12 @@ #ifndef DAWNNATIVE_BUFFER_H_ #define DAWNNATIVE_BUFFER_H_ -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/ObjectBase.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/ObjectBase.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/CMakeLists.txt b/src/dawn/native/CMakeLists.txt similarity index 97% rename from src/dawn_native/CMakeLists.txt rename to src/dawn/native/CMakeLists.txt index 4196e1c3d2..be1db1e53a 100644 --- a/src/dawn_native/CMakeLists.txt +++ b/src/dawn/native/CMakeLists.txt @@ -13,7 +13,7 @@ # limitations under the License. DawnJSONGenerator( - TARGET "dawn_native_utils" + TARGET "native_utils" PRINT_NAME "Dawn native utilities" RESULT_VARIABLE "DAWN_NATIVE_UTILS_GEN_SOURCES" ) @@ -26,8 +26,8 @@ if(BUILD_SHARED_LIBS) endif() target_sources(dawn_native PRIVATE - "${DAWN_INCLUDE_DIR}/dawn_native/DawnNative.h" - "${DAWN_INCLUDE_DIR}/dawn_native/dawn_native_export.h" + "${DAWN_INCLUDE_DIR}/dawn/native/DawnNative.h" + "${DAWN_INCLUDE_DIR}/dawn/native/dawn_native_export.h" ${DAWN_NATIVE_UTILS_GEN_SOURCES} "Adapter.cpp" "Adapter.h" @@ -231,7 +231,7 @@ endif() if (DAWN_ENABLE_D3D12) target_sources(dawn_native PRIVATE - "${DAWN_INCLUDE_DIR}/dawn_native/D3D12Backend.h" + "${DAWN_INCLUDE_DIR}/dawn/native/D3D12Backend.h" "d3d12/AdapterD3D12.cpp" "d3d12/AdapterD3D12.h" "d3d12/BackendD3D12.cpp" @@ -317,7 +317,7 @@ endif() if (DAWN_ENABLE_METAL) target_sources(dawn_native PRIVATE - "${DAWN_INCLUDE_DIR}/dawn_native/MetalBackend.h" + "${DAWN_INCLUDE_DIR}/dawn/native/MetalBackend.h" "Surface_metal.mm" "metal/BackendMTL.h" "metal/BackendMTL.mm" @@ -368,7 +368,7 @@ endif() if (DAWN_ENABLE_NULL) target_sources(dawn_native PRIVATE - "${DAWN_INCLUDE_DIR}/dawn_native/NullBackend.h" + "${DAWN_INCLUDE_DIR}/dawn/native/NullBackend.h" "null/DeviceNull.cpp" "null/DeviceNull.h" ) @@ -388,12 +388,12 @@ if (DAWN_ENABLE_OPENGL) ARGS "--gl-xml" "${Dawn_SOURCE_DIR}/third_party/khronos/gl.xml" "--supported-extensions" - "${Dawn_SOURCE_DIR}/src/dawn_native/opengl/supported_extensions.json" + "${Dawn_SOURCE_DIR}/src/dawn/native/opengl/supported_extensions.json" RESULT_VARIABLE "DAWN_NATIVE_OPENGL_AUTOGEN_SOURCES" ) target_sources(dawn_native PRIVATE - "${DAWN_INCLUDE_DIR}/dawn_native/OpenGLBackend.h" + "${DAWN_INCLUDE_DIR}/dawn/native/OpenGLBackend.h" ${DAWN_NATIVE_OPENGL_AUTOGEN_SOURCES} "opengl/BackendGL.cpp" "opengl/BackendGL.h" @@ -450,7 +450,7 @@ endif() if (DAWN_ENABLE_VULKAN) target_sources(dawn_native PRIVATE - "${DAWN_INCLUDE_DIR}/dawn_native/VulkanBackend.h" + "${DAWN_INCLUDE_DIR}/dawn/native/VulkanBackend.h" "vulkan/AdapterVk.cpp" "vulkan/AdapterVk.h" "vulkan/BackendVk.cpp" diff --git a/src/dawn_native/CachedObject.cpp b/src/dawn/native/CachedObject.cpp similarity index 97% rename from src/dawn_native/CachedObject.cpp rename to src/dawn/native/CachedObject.cpp index 5a5c2420fd..9a6d064701 100644 --- a/src/dawn_native/CachedObject.cpp +++ b/src/dawn/native/CachedObject.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/CachedObject.h" +#include "dawn/native/CachedObject.h" #include "dawn/common/Assert.h" diff --git a/src/dawn_native/CachedObject.h b/src/dawn/native/CachedObject.h similarity index 100% rename from src/dawn_native/CachedObject.h rename to src/dawn/native/CachedObject.h diff --git a/src/dawn_native/CallbackTaskManager.cpp b/src/dawn/native/CallbackTaskManager.cpp similarity index 96% rename from src/dawn_native/CallbackTaskManager.cpp rename to src/dawn/native/CallbackTaskManager.cpp index 999438ed35..a8be5cc744 100644 --- a/src/dawn_native/CallbackTaskManager.cpp +++ b/src/dawn/native/CallbackTaskManager.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/CallbackTaskManager.h" +#include "dawn/native/CallbackTaskManager.h" namespace dawn::native { diff --git a/src/dawn_native/CallbackTaskManager.h b/src/dawn/native/CallbackTaskManager.h similarity index 100% rename from src/dawn_native/CallbackTaskManager.h rename to src/dawn/native/CallbackTaskManager.h diff --git a/src/dawn_native/CommandAllocator.cpp b/src/dawn/native/CommandAllocator.cpp similarity index 99% rename from src/dawn_native/CommandAllocator.cpp rename to src/dawn/native/CommandAllocator.cpp index cfc2643d68..5d36aad0b4 100644 --- a/src/dawn_native/CommandAllocator.cpp +++ b/src/dawn/native/CommandAllocator.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/CommandAllocator.h" +#include "dawn/native/CommandAllocator.h" #include "dawn/common/Assert.h" #include "dawn/common/Math.h" diff --git a/src/dawn_native/CommandAllocator.h b/src/dawn/native/CommandAllocator.h similarity index 100% rename from src/dawn_native/CommandAllocator.h rename to src/dawn/native/CommandAllocator.h diff --git a/src/dawn_native/CommandBuffer.cpp b/src/dawn/native/CommandBuffer.cpp similarity index 97% rename from src/dawn_native/CommandBuffer.cpp rename to src/dawn/native/CommandBuffer.cpp index 4b5efcb9a9..f8c7836b40 100644 --- a/src/dawn_native/CommandBuffer.cpp +++ b/src/dawn/native/CommandBuffer.cpp @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/CommandBuffer.h" +#include "dawn/native/CommandBuffer.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/CommandValidation.h" -#include "dawn_native/Commands.h" -#include "dawn_native/Format.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/Texture.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/CommandValidation.h" +#include "dawn/native/Commands.h" +#include "dawn/native/Format.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/Texture.h" namespace dawn::native { diff --git a/src/dawn_native/CommandBuffer.h b/src/dawn/native/CommandBuffer.h similarity index 90% rename from src/dawn_native/CommandBuffer.h rename to src/dawn/native/CommandBuffer.h index e3c9bc6013..3d9d71a0ba 100644 --- a/src/dawn_native/CommandBuffer.h +++ b/src/dawn/native/CommandBuffer.h @@ -15,14 +15,14 @@ #ifndef DAWNNATIVE_COMMANDBUFFER_H_ #define DAWNNATIVE_COMMANDBUFFER_H_ -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" -#include "dawn_native/CommandAllocator.h" -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/PassResourceUsage.h" -#include "dawn_native/Texture.h" +#include "dawn/native/CommandAllocator.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/PassResourceUsage.h" +#include "dawn/native/Texture.h" namespace dawn::native { diff --git a/src/dawn_native/CommandBufferStateTracker.cpp b/src/dawn/native/CommandBufferStateTracker.cpp similarity index 98% rename from src/dawn_native/CommandBufferStateTracker.cpp rename to src/dawn/native/CommandBufferStateTracker.cpp index 5b6618c944..370139ef81 100644 --- a/src/dawn_native/CommandBufferStateTracker.cpp +++ b/src/dawn/native/CommandBufferStateTracker.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/CommandBufferStateTracker.h" +#include "dawn/native/CommandBufferStateTracker.h" #include "dawn/common/Assert.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/ComputePassEncoder.h" -#include "dawn_native/ComputePipeline.h" -#include "dawn_native/Forward.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/PipelineLayout.h" -#include "dawn_native/RenderPipeline.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/ComputePassEncoder.h" +#include "dawn/native/ComputePipeline.h" +#include "dawn/native/Forward.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/PipelineLayout.h" +#include "dawn/native/RenderPipeline.h" // TODO(dawn:563): None of the error messages in this file include the buffer objects they are // validating against. It would be nice to improve that, but difficult to do without incurring diff --git a/src/dawn_native/CommandBufferStateTracker.h b/src/dawn/native/CommandBufferStateTracker.h similarity index 97% rename from src/dawn_native/CommandBufferStateTracker.h rename to src/dawn/native/CommandBufferStateTracker.h index 876d476532..b68e27a068 100644 --- a/src/dawn_native/CommandBufferStateTracker.h +++ b/src/dawn/native/CommandBufferStateTracker.h @@ -18,9 +18,9 @@ #include "dawn/common/Constants.h" #include "dawn/common/ityp_array.h" #include "dawn/common/ityp_bitset.h" -#include "dawn_native/BindingInfo.h" -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" +#include "dawn/native/BindingInfo.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" namespace dawn::native { diff --git a/src/dawn_native/CommandEncoder.cpp b/src/dawn/native/CommandEncoder.cpp similarity index 98% rename from src/dawn_native/CommandEncoder.cpp rename to src/dawn/native/CommandEncoder.cpp index 55625f080e..123f99ef8f 100644 --- a/src/dawn_native/CommandEncoder.cpp +++ b/src/dawn/native/CommandEncoder.cpp @@ -12,29 +12,29 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/CommandEncoder.h" +#include "dawn/native/CommandEncoder.h" #include "dawn/common/BitSetIterator.h" #include "dawn/common/Math.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/ChainUtils_autogen.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/CommandBufferStateTracker.h" +#include "dawn/native/CommandValidation.h" +#include "dawn/native/Commands.h" +#include "dawn/native/ComputePassEncoder.h" +#include "dawn/native/Device.h" +#include "dawn/native/ErrorData.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/QueryHelper.h" +#include "dawn/native/QuerySet.h" +#include "dawn/native/Queue.h" +#include "dawn/native/RenderPassEncoder.h" +#include "dawn/native/RenderPipeline.h" +#include "dawn/native/ValidationUtils_autogen.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/ChainUtils_autogen.h" -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/CommandBufferStateTracker.h" -#include "dawn_native/CommandValidation.h" -#include "dawn_native/Commands.h" -#include "dawn_native/ComputePassEncoder.h" -#include "dawn_native/Device.h" -#include "dawn_native/ErrorData.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/QueryHelper.h" -#include "dawn_native/QuerySet.h" -#include "dawn_native/Queue.h" -#include "dawn_native/RenderPassEncoder.h" -#include "dawn_native/RenderPipeline.h" -#include "dawn_native/ValidationUtils_autogen.h" #include #include diff --git a/src/dawn_native/CommandEncoder.h b/src/dawn/native/CommandEncoder.h similarity index 96% rename from src/dawn_native/CommandEncoder.h rename to src/dawn/native/CommandEncoder.h index 14f81ed9f5..86f7cb107e 100644 --- a/src/dawn_native/CommandEncoder.h +++ b/src/dawn/native/CommandEncoder.h @@ -15,12 +15,12 @@ #ifndef DAWNNATIVE_COMMANDENCODER_H_ #define DAWNNATIVE_COMMANDENCODER_H_ -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" -#include "dawn_native/EncodingContext.h" -#include "dawn_native/Error.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/PassResourceUsage.h" +#include "dawn/native/EncodingContext.h" +#include "dawn/native/Error.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/PassResourceUsage.h" #include diff --git a/src/dawn_native/CommandValidation.cpp b/src/dawn/native/CommandValidation.cpp similarity index 98% rename from src/dawn_native/CommandValidation.cpp rename to src/dawn/native/CommandValidation.cpp index 6d0a870ac7..a9caaace91 100644 --- a/src/dawn_native/CommandValidation.cpp +++ b/src/dawn/native/CommandValidation.cpp @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/CommandValidation.h" +#include "dawn/native/CommandValidation.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandBufferStateTracker.h" -#include "dawn_native/Commands.h" -#include "dawn_native/Device.h" -#include "dawn_native/PassResourceUsage.h" -#include "dawn_native/QuerySet.h" -#include "dawn_native/RenderBundle.h" -#include "dawn_native/RenderPipeline.h" -#include "dawn_native/ValidationUtils_autogen.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandBufferStateTracker.h" +#include "dawn/native/Commands.h" +#include "dawn/native/Device.h" +#include "dawn/native/PassResourceUsage.h" +#include "dawn/native/QuerySet.h" +#include "dawn/native/RenderBundle.h" +#include "dawn/native/RenderPipeline.h" +#include "dawn/native/ValidationUtils_autogen.h" namespace dawn::native { diff --git a/src/dawn_native/CommandValidation.h b/src/dawn/native/CommandValidation.h similarity index 97% rename from src/dawn_native/CommandValidation.h rename to src/dawn/native/CommandValidation.h index b17a0034a0..dbc13ececf 100644 --- a/src/dawn_native/CommandValidation.h +++ b/src/dawn/native/CommandValidation.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_COMMANDVALIDATION_H_ #define DAWNNATIVE_COMMANDVALIDATION_H_ -#include "dawn_native/CommandAllocator.h" -#include "dawn_native/Error.h" -#include "dawn_native/Texture.h" +#include "dawn/native/CommandAllocator.h" +#include "dawn/native/Error.h" +#include "dawn/native/Texture.h" #include diff --git a/src/dawn_native/Commands.cpp b/src/dawn/native/Commands.cpp similarity index 97% rename from src/dawn_native/Commands.cpp rename to src/dawn/native/Commands.cpp index 544ee9e197..3337cbd4cf 100644 --- a/src/dawn_native/Commands.cpp +++ b/src/dawn/native/Commands.cpp @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Commands.h" +#include "dawn/native/Commands.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandAllocator.h" -#include "dawn_native/ComputePipeline.h" -#include "dawn_native/QuerySet.h" -#include "dawn_native/RenderBundle.h" -#include "dawn_native/RenderPipeline.h" -#include "dawn_native/Texture.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandAllocator.h" +#include "dawn/native/ComputePipeline.h" +#include "dawn/native/QuerySet.h" +#include "dawn/native/RenderBundle.h" +#include "dawn/native/RenderPipeline.h" +#include "dawn/native/Texture.h" namespace dawn::native { diff --git a/src/dawn_native/Commands.h b/src/dawn/native/Commands.h similarity index 97% rename from src/dawn_native/Commands.h rename to src/dawn/native/Commands.h index a1f28791a1..be1de068bd 100644 --- a/src/dawn_native/Commands.h +++ b/src/dawn/native/Commands.h @@ -17,11 +17,11 @@ #include "dawn/common/Constants.h" -#include "dawn_native/AttachmentState.h" -#include "dawn_native/BindingInfo.h" -#include "dawn_native/Texture.h" +#include "dawn/native/AttachmentState.h" +#include "dawn/native/BindingInfo.h" +#include "dawn/native/Texture.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include #include diff --git a/src/dawn_native/CompilationMessages.cpp b/src/dawn/native/CompilationMessages.cpp similarity index 98% rename from src/dawn_native/CompilationMessages.cpp rename to src/dawn/native/CompilationMessages.cpp index 7a407cd519..47c3d0be32 100644 --- a/src/dawn_native/CompilationMessages.cpp +++ b/src/dawn/native/CompilationMessages.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/CompilationMessages.h" +#include "dawn/native/CompilationMessages.h" #include "dawn/common/Assert.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/CompilationMessages.h b/src/dawn/native/CompilationMessages.h similarity index 98% rename from src/dawn_native/CompilationMessages.h rename to src/dawn/native/CompilationMessages.h index 41703a1636..92e33465a1 100644 --- a/src/dawn_native/CompilationMessages.h +++ b/src/dawn/native/CompilationMessages.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_COMPILATIONMESSAGES_H_ #define DAWNNATIVE_COMPILATIONMESSAGES_H_ -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include "dawn/common/NonCopyable.h" diff --git a/src/dawn_native/ComputePassEncoder.cpp b/src/dawn/native/ComputePassEncoder.cpp similarity index 97% rename from src/dawn_native/ComputePassEncoder.cpp rename to src/dawn/native/ComputePassEncoder.cpp index 5c9a457814..594fa2dfb0 100644 --- a/src/dawn_native/ComputePassEncoder.cpp +++ b/src/dawn/native/ComputePassEncoder.cpp @@ -12,21 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/ComputePassEncoder.h" +#include "dawn/native/ComputePassEncoder.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/CommandValidation.h" -#include "dawn_native/Commands.h" -#include "dawn_native/ComputePipeline.h" -#include "dawn_native/Device.h" -#include "dawn_native/InternalPipelineStore.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/PassResourceUsageTracker.h" -#include "dawn_native/QuerySet.h" -#include "dawn_native/utils/WGPUHelpers.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/CommandValidation.h" +#include "dawn/native/Commands.h" +#include "dawn/native/ComputePipeline.h" +#include "dawn/native/Device.h" +#include "dawn/native/InternalPipelineStore.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/PassResourceUsageTracker.h" +#include "dawn/native/QuerySet.h" +#include "dawn/native/utils/WGPUHelpers.h" namespace dawn::native { diff --git a/src/dawn_native/ComputePassEncoder.h b/src/dawn/native/ComputePassEncoder.h similarity index 94% rename from src/dawn_native/ComputePassEncoder.h rename to src/dawn/native/ComputePassEncoder.h index 13e7e02fc9..b2fb97d784 100644 --- a/src/dawn_native/ComputePassEncoder.h +++ b/src/dawn/native/ComputePassEncoder.h @@ -15,11 +15,11 @@ #ifndef DAWNNATIVE_COMPUTEPASSENCODER_H_ #define DAWNNATIVE_COMPUTEPASSENCODER_H_ -#include "dawn_native/CommandBufferStateTracker.h" -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/PassResourceUsageTracker.h" -#include "dawn_native/ProgrammableEncoder.h" +#include "dawn/native/CommandBufferStateTracker.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/PassResourceUsageTracker.h" +#include "dawn/native/ProgrammableEncoder.h" namespace dawn::native { diff --git a/src/dawn_native/ComputePipeline.cpp b/src/dawn/native/ComputePipeline.cpp similarity index 95% rename from src/dawn_native/ComputePipeline.cpp rename to src/dawn/native/ComputePipeline.cpp index c67bb40853..2de7f32009 100644 --- a/src/dawn_native/ComputePipeline.cpp +++ b/src/dawn/native/ComputePipeline.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/ComputePipeline.h" +#include "dawn/native/ComputePipeline.h" -#include "dawn_native/Device.h" -#include "dawn_native/ObjectContentHasher.h" -#include "dawn_native/ObjectType_autogen.h" +#include "dawn/native/Device.h" +#include "dawn/native/ObjectContentHasher.h" +#include "dawn/native/ObjectType_autogen.h" namespace dawn::native { diff --git a/src/dawn_native/ComputePipeline.h b/src/dawn/native/ComputePipeline.h similarity index 96% rename from src/dawn_native/ComputePipeline.h rename to src/dawn/native/ComputePipeline.h index a6974a5ef9..1bd97d1dcf 100644 --- a/src/dawn_native/ComputePipeline.h +++ b/src/dawn/native/ComputePipeline.h @@ -16,8 +16,8 @@ #define DAWNNATIVE_COMPUTEPIPELINE_H_ #include "dawn/common/NonCopyable.h" -#include "dawn_native/Forward.h" -#include "dawn_native/Pipeline.h" +#include "dawn/native/Forward.h" +#include "dawn/native/Pipeline.h" namespace dawn::native { diff --git a/src/dawn_native/CopyTextureForBrowserHelper.cpp b/src/dawn/native/CopyTextureForBrowserHelper.cpp similarity index 97% rename from src/dawn_native/CopyTextureForBrowserHelper.cpp rename to src/dawn/native/CopyTextureForBrowserHelper.cpp index ed96735698..aee2244e3b 100644 --- a/src/dawn_native/CopyTextureForBrowserHelper.cpp +++ b/src/dawn/native/CopyTextureForBrowserHelper.cpp @@ -12,24 +12,24 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/CopyTextureForBrowserHelper.h" +#include "dawn/native/CopyTextureForBrowserHelper.h" #include "dawn/common/Log.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/CommandValidation.h" -#include "dawn_native/Device.h" -#include "dawn_native/InternalPipelineStore.h" -#include "dawn_native/Queue.h" -#include "dawn_native/RenderPassEncoder.h" -#include "dawn_native/RenderPipeline.h" -#include "dawn_native/Sampler.h" -#include "dawn_native/Texture.h" -#include "dawn_native/ValidationUtils_autogen.h" -#include "dawn_native/utils/WGPUHelpers.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/CommandValidation.h" +#include "dawn/native/Device.h" +#include "dawn/native/InternalPipelineStore.h" +#include "dawn/native/Queue.h" +#include "dawn/native/RenderPassEncoder.h" +#include "dawn/native/RenderPipeline.h" +#include "dawn/native/Sampler.h" +#include "dawn/native/Texture.h" +#include "dawn/native/ValidationUtils_autogen.h" +#include "dawn/native/utils/WGPUHelpers.h" #include diff --git a/src/dawn_native/CopyTextureForBrowserHelper.h b/src/dawn/native/CopyTextureForBrowserHelper.h similarity index 96% rename from src/dawn_native/CopyTextureForBrowserHelper.h rename to src/dawn/native/CopyTextureForBrowserHelper.h index 209aae26eb..de82f5f979 100644 --- a/src/dawn_native/CopyTextureForBrowserHelper.h +++ b/src/dawn/native/CopyTextureForBrowserHelper.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_COPYTEXTUREFORBROWSERHELPER_H_ #define DAWNNATIVE_COPYTEXTUREFORBROWSERHELPER_H_ -#include "dawn_native/Error.h" -#include "dawn_native/ObjectBase.h" +#include "dawn/native/Error.h" +#include "dawn/native/ObjectBase.h" namespace dawn::native { class DeviceBase; diff --git a/src/dawn_native/CreatePipelineAsyncTask.cpp b/src/dawn/native/CreatePipelineAsyncTask.cpp similarity index 97% rename from src/dawn_native/CreatePipelineAsyncTask.cpp rename to src/dawn/native/CreatePipelineAsyncTask.cpp index 1a3806fcd5..ed7764e9c1 100644 --- a/src/dawn_native/CreatePipelineAsyncTask.cpp +++ b/src/dawn/native/CreatePipelineAsyncTask.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/CreatePipelineAsyncTask.h" +#include "dawn/native/CreatePipelineAsyncTask.h" +#include "dawn/native/AsyncTask.h" +#include "dawn/native/ComputePipeline.h" +#include "dawn/native/Device.h" +#include "dawn/native/RenderPipeline.h" +#include "dawn/native/utils/WGPUHelpers.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/AsyncTask.h" -#include "dawn_native/ComputePipeline.h" -#include "dawn_native/Device.h" -#include "dawn_native/RenderPipeline.h" -#include "dawn_native/utils/WGPUHelpers.h" namespace dawn::native { diff --git a/src/dawn_native/CreatePipelineAsyncTask.h b/src/dawn/native/CreatePipelineAsyncTask.h similarity index 98% rename from src/dawn_native/CreatePipelineAsyncTask.h rename to src/dawn/native/CreatePipelineAsyncTask.h index 75a56ff38c..4b936cf674 100644 --- a/src/dawn_native/CreatePipelineAsyncTask.h +++ b/src/dawn/native/CreatePipelineAsyncTask.h @@ -16,9 +16,9 @@ #define DAWNNATIVE_CREATEPIPELINEASYNCTASK_H_ #include "dawn/common/RefCounted.h" +#include "dawn/native/CallbackTaskManager.h" +#include "dawn/native/Error.h" #include "dawn/webgpu.h" -#include "dawn_native/CallbackTaskManager.h" -#include "dawn_native/Error.h" namespace dawn::native { diff --git a/src/dawn_native/DawnNative.cpp b/src/dawn/native/DawnNative.cpp similarity index 98% rename from src/dawn_native/DawnNative.cpp rename to src/dawn/native/DawnNative.cpp index 931304c125..ca46df8db3 100644 --- a/src/dawn_native/DawnNative.cpp +++ b/src/dawn/native/DawnNative.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/DawnNative.h" +#include "dawn/native/DawnNative.h" #include "dawn/common/Log.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/Device.h" +#include "dawn/native/Instance.h" +#include "dawn/native/Texture.h" #include "dawn/platform/DawnPlatform.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/Device.h" -#include "dawn_native/Instance.h" -#include "dawn_native/Texture.h" // Contains the entry-points into dawn_native diff --git a/src/dawn_native/Device.cpp b/src/dawn/native/Device.cpp similarity index 98% rename from src/dawn_native/Device.cpp rename to src/dawn/native/Device.cpp index 1bb1e9d50d..477decb2d7 100644 --- a/src/dawn_native/Device.cpp +++ b/src/dawn/native/Device.cpp @@ -12,41 +12,41 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Device.h" +#include "dawn/native/Device.h" #include "dawn/common/Log.h" +#include "dawn/native/Adapter.h" +#include "dawn/native/AsyncTask.h" +#include "dawn/native/AttachmentState.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/ChainUtils_autogen.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/CompilationMessages.h" +#include "dawn/native/CreatePipelineAsyncTask.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/ErrorData.h" +#include "dawn/native/ErrorInjector.h" +#include "dawn/native/ErrorScope.h" +#include "dawn/native/ExternalTexture.h" +#include "dawn/native/Instance.h" +#include "dawn/native/InternalPipelineStore.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/PersistentCache.h" +#include "dawn/native/QuerySet.h" +#include "dawn/native/Queue.h" +#include "dawn/native/RenderBundleEncoder.h" +#include "dawn/native/RenderPipeline.h" +#include "dawn/native/Sampler.h" +#include "dawn/native/Surface.h" +#include "dawn/native/SwapChain.h" +#include "dawn/native/Texture.h" +#include "dawn/native/ValidationUtils_autogen.h" +#include "dawn/native/utils/WGPUHelpers.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/Adapter.h" -#include "dawn_native/AsyncTask.h" -#include "dawn_native/AttachmentState.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/ChainUtils_autogen.h" -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/CompilationMessages.h" -#include "dawn_native/CreatePipelineAsyncTask.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/ErrorData.h" -#include "dawn_native/ErrorInjector.h" -#include "dawn_native/ErrorScope.h" -#include "dawn_native/ExternalTexture.h" -#include "dawn_native/Instance.h" -#include "dawn_native/InternalPipelineStore.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/PersistentCache.h" -#include "dawn_native/QuerySet.h" -#include "dawn_native/Queue.h" -#include "dawn_native/RenderBundleEncoder.h" -#include "dawn_native/RenderPipeline.h" -#include "dawn_native/Sampler.h" -#include "dawn_native/Surface.h" -#include "dawn_native/SwapChain.h" -#include "dawn_native/Texture.h" -#include "dawn_native/ValidationUtils_autogen.h" -#include "dawn_native/utils/WGPUHelpers.h" #include #include diff --git a/src/dawn_native/Device.h b/src/dawn/native/Device.h similarity index 97% rename from src/dawn_native/Device.h rename to src/dawn/native/Device.h index 6c6a3657ac..b957dc0b39 100644 --- a/src/dawn_native/Device.h +++ b/src/dawn/native/Device.h @@ -15,20 +15,20 @@ #ifndef DAWNNATIVE_DEVICE_H_ #define DAWNNATIVE_DEVICE_H_ -#include "dawn_native/Commands.h" -#include "dawn_native/ComputePipeline.h" -#include "dawn_native/Error.h" -#include "dawn_native/Features.h" -#include "dawn_native/Format.h" -#include "dawn_native/Forward.h" -#include "dawn_native/Limits.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/StagingBuffer.h" -#include "dawn_native/Toggles.h" +#include "dawn/native/Commands.h" +#include "dawn/native/ComputePipeline.h" +#include "dawn/native/Error.h" +#include "dawn/native/Features.h" +#include "dawn/native/Format.h" +#include "dawn/native/Forward.h" +#include "dawn/native/Limits.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/StagingBuffer.h" +#include "dawn/native/Toggles.h" -#include "dawn_native/DawnNative.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/DawnNative.h" +#include "dawn/native/dawn_platform.h" #include #include @@ -202,10 +202,9 @@ namespace dawn::native { const CommandEncoderDescriptor* descriptor); ResultOrError> CreateComputePipeline( const ComputePipelineDescriptor* descriptor); - MaybeError CreateComputePipelineAsync( - const ComputePipelineDescriptor* descriptor, - WGPUCreateComputePipelineAsyncCallback callback, - void* userdata); + MaybeError CreateComputePipelineAsync(const ComputePipelineDescriptor* descriptor, + WGPUCreateComputePipelineAsyncCallback callback, + void* userdata); ResultOrError> CreatePipelineLayout( const PipelineLayoutDescriptor* descriptor); diff --git a/src/dawn_native/DynamicUploader.cpp b/src/dawn/native/DynamicUploader.cpp similarity index 98% rename from src/dawn_native/DynamicUploader.cpp rename to src/dawn/native/DynamicUploader.cpp index 9cba716ddb..262c07d718 100644 --- a/src/dawn_native/DynamicUploader.cpp +++ b/src/dawn/native/DynamicUploader.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/DynamicUploader.h" +#include "dawn/native/DynamicUploader.h" #include "dawn/common/Math.h" -#include "dawn_native/Device.h" +#include "dawn/native/Device.h" namespace dawn::native { diff --git a/src/dawn_native/DynamicUploader.h b/src/dawn/native/DynamicUploader.h similarity index 93% rename from src/dawn_native/DynamicUploader.h rename to src/dawn/native/DynamicUploader.h index 310e55b966..fa3f80a1cc 100644 --- a/src/dawn_native/DynamicUploader.h +++ b/src/dawn/native/DynamicUploader.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_DYNAMICUPLOADER_H_ #define DAWNNATIVE_DYNAMICUPLOADER_H_ -#include "dawn_native/Forward.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/RingBufferAllocator.h" -#include "dawn_native/StagingBuffer.h" +#include "dawn/native/Forward.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/RingBufferAllocator.h" +#include "dawn/native/StagingBuffer.h" // DynamicUploader is the front-end implementation used to manage multiple ring buffers for upload // usage. diff --git a/src/dawn_native/EncodingContext.cpp b/src/dawn/native/EncodingContext.cpp similarity index 96% rename from src/dawn_native/EncodingContext.cpp rename to src/dawn/native/EncodingContext.cpp index 66e976270a..b9ba529863 100644 --- a/src/dawn_native/EncodingContext.cpp +++ b/src/dawn/native/EncodingContext.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/EncodingContext.h" +#include "dawn/native/EncodingContext.h" #include "dawn/common/Assert.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/Commands.h" -#include "dawn_native/Device.h" -#include "dawn_native/ErrorData.h" -#include "dawn_native/IndirectDrawValidationEncoder.h" -#include "dawn_native/RenderBundleEncoder.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/Commands.h" +#include "dawn/native/Device.h" +#include "dawn/native/ErrorData.h" +#include "dawn/native/IndirectDrawValidationEncoder.h" +#include "dawn/native/RenderBundleEncoder.h" namespace dawn::native { diff --git a/src/dawn_native/EncodingContext.h b/src/dawn/native/EncodingContext.h similarity index 96% rename from src/dawn_native/EncodingContext.h rename to src/dawn/native/EncodingContext.h index d64865dcb6..659a9a72b4 100644 --- a/src/dawn_native/EncodingContext.h +++ b/src/dawn/native/EncodingContext.h @@ -15,12 +15,12 @@ #ifndef DAWNNATIVE_ENCODINGCONTEXT_H_ #define DAWNNATIVE_ENCODINGCONTEXT_H_ -#include "dawn_native/CommandAllocator.h" -#include "dawn_native/Error.h" -#include "dawn_native/ErrorData.h" -#include "dawn_native/IndirectDrawMetadata.h" -#include "dawn_native/PassResourceUsageTracker.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/CommandAllocator.h" +#include "dawn/native/Error.h" +#include "dawn/native/ErrorData.h" +#include "dawn/native/IndirectDrawMetadata.h" +#include "dawn/native/PassResourceUsageTracker.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/EnumClassBitmasks.h b/src/dawn/native/EnumClassBitmasks.h similarity index 100% rename from src/dawn_native/EnumClassBitmasks.h rename to src/dawn/native/EnumClassBitmasks.h diff --git a/src/dawn_native/EnumMaskIterator.h b/src/dawn/native/EnumMaskIterator.h similarity index 98% rename from src/dawn_native/EnumMaskIterator.h rename to src/dawn/native/EnumMaskIterator.h index 1f7f03e967..6653ef4195 100644 --- a/src/dawn_native/EnumMaskIterator.h +++ b/src/dawn/native/EnumMaskIterator.h @@ -16,7 +16,7 @@ #define DAWNNATIVE_ENUMMASKITERATOR_H_ #include "dawn/common/BitSetIterator.h" -#include "dawn_native/EnumClassBitmasks.h" +#include "dawn/native/EnumClassBitmasks.h" namespace dawn::native { diff --git a/src/dawn_native/Error.cpp b/src/dawn/native/Error.cpp similarity index 95% rename from src/dawn_native/Error.cpp rename to src/dawn/native/Error.cpp index c014e7f9b6..d524a32766 100644 --- a/src/dawn_native/Error.cpp +++ b/src/dawn/native/Error.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" -#include "dawn_native/ErrorData.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/ErrorData.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native { diff --git a/src/dawn_native/Error.h b/src/dawn/native/Error.h similarity index 99% rename from src/dawn_native/Error.h rename to src/dawn/native/Error.h index 5f905b5c7c..9e9e591eff 100644 --- a/src/dawn_native/Error.h +++ b/src/dawn/native/Error.h @@ -17,8 +17,8 @@ #include "absl/strings/str_format.h" #include "dawn/common/Result.h" -#include "dawn_native/ErrorData.h" -#include "dawn_native/webgpu_absl_format.h" +#include "dawn/native/ErrorData.h" +#include "dawn/native/webgpu_absl_format.h" #include diff --git a/src/dawn_native/ErrorData.cpp b/src/dawn/native/ErrorData.cpp similarity index 95% rename from src/dawn_native/ErrorData.cpp rename to src/dawn/native/ErrorData.cpp index 5f01530429..863d20ffc4 100644 --- a/src/dawn_native/ErrorData.cpp +++ b/src/dawn/native/ErrorData.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/ErrorData.h" +#include "dawn/native/ErrorData.h" -#include "dawn_native/Error.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/Error.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native { diff --git a/src/dawn_native/ErrorData.h b/src/dawn/native/ErrorData.h similarity index 100% rename from src/dawn_native/ErrorData.h rename to src/dawn/native/ErrorData.h diff --git a/src/dawn_native/ErrorInjector.cpp b/src/dawn/native/ErrorInjector.cpp similarity index 96% rename from src/dawn_native/ErrorInjector.cpp rename to src/dawn/native/ErrorInjector.cpp index 638bf47fa6..af87498e37 100644 --- a/src/dawn_native/ErrorInjector.cpp +++ b/src/dawn/native/ErrorInjector.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/ErrorInjector.h" +#include "dawn/native/ErrorInjector.h" #include "dawn/common/Assert.h" -#include "dawn_native/DawnNative.h" +#include "dawn/native/DawnNative.h" namespace dawn::native { diff --git a/src/dawn_native/ErrorInjector.h b/src/dawn/native/ErrorInjector.h similarity index 100% rename from src/dawn_native/ErrorInjector.h rename to src/dawn/native/ErrorInjector.h diff --git a/src/dawn_native/ErrorScope.cpp b/src/dawn/native/ErrorScope.cpp similarity index 98% rename from src/dawn_native/ErrorScope.cpp rename to src/dawn/native/ErrorScope.cpp index c86f008799..06b7a95472 100644 --- a/src/dawn_native/ErrorScope.cpp +++ b/src/dawn/native/ErrorScope.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/ErrorScope.h" +#include "dawn/native/ErrorScope.h" #include "dawn/common/Assert.h" diff --git a/src/dawn_native/ErrorScope.h b/src/dawn/native/ErrorScope.h similarity index 97% rename from src/dawn_native/ErrorScope.h rename to src/dawn/native/ErrorScope.h index 77c88e3045..766a81eca0 100644 --- a/src/dawn_native/ErrorScope.h +++ b/src/dawn/native/ErrorScope.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_ERRORSCOPE_H_ #define DAWNNATIVE_ERRORSCOPE_H_ -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include #include diff --git a/src/dawn_native/ExternalTexture.cpp b/src/dawn/native/ExternalTexture.cpp similarity index 97% rename from src/dawn_native/ExternalTexture.cpp rename to src/dawn/native/ExternalTexture.cpp index c3126d834f..09ee1a210b 100644 --- a/src/dawn_native/ExternalTexture.cpp +++ b/src/dawn/native/ExternalTexture.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/ExternalTexture.h" +#include "dawn/native/ExternalTexture.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/Device.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/Queue.h" -#include "dawn_native/Texture.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/Device.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/Queue.h" +#include "dawn/native/Texture.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native { diff --git a/src/dawn_native/ExternalTexture.h b/src/dawn/native/ExternalTexture.h similarity index 94% rename from src/dawn_native/ExternalTexture.h rename to src/dawn/native/ExternalTexture.h index 27df552827..10460e756e 100644 --- a/src/dawn_native/ExternalTexture.h +++ b/src/dawn/native/ExternalTexture.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_EXTERNALTEXTURE_H_ #define DAWNNATIVE_EXTERNALTEXTURE_H_ -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/Subresource.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/Subresource.h" #include diff --git a/src/dawn_native/Features.cpp b/src/dawn/native/Features.cpp similarity index 99% rename from src/dawn_native/Features.cpp rename to src/dawn/native/Features.cpp index ac1c0ddb56..56a532c129 100644 --- a/src/dawn_native/Features.cpp +++ b/src/dawn/native/Features.cpp @@ -16,7 +16,7 @@ #include "dawn/common/Assert.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/Features.h" +#include "dawn/native/Features.h" namespace dawn::native { namespace { diff --git a/src/dawn_native/Features.h b/src/dawn/native/Features.h similarity index 98% rename from src/dawn_native/Features.h rename to src/dawn/native/Features.h index d1923c58b9..de75e99ed0 100644 --- a/src/dawn_native/Features.h +++ b/src/dawn/native/Features.h @@ -20,8 +20,8 @@ #include #include "dawn/common/ityp_bitset.h" +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" namespace dawn::native { diff --git a/src/dawn_native/Format.cpp b/src/dawn/native/Format.cpp similarity index 99% rename from src/dawn_native/Format.cpp rename to src/dawn/native/Format.cpp index e409c0e1c1..e4eb963f19 100644 --- a/src/dawn_native/Format.cpp +++ b/src/dawn/native/Format.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Format.h" +#include "dawn/native/Format.h" -#include "dawn_native/Device.h" -#include "dawn_native/EnumMaskIterator.h" -#include "dawn_native/Features.h" -#include "dawn_native/Texture.h" +#include "dawn/native/Device.h" +#include "dawn/native/EnumMaskIterator.h" +#include "dawn/native/Features.h" +#include "dawn/native/Texture.h" #include diff --git a/src/dawn_native/Format.h b/src/dawn/native/Format.h similarity index 97% rename from src/dawn_native/Format.h rename to src/dawn/native/Format.h index 7b77309f5e..5d3afc2fb9 100644 --- a/src/dawn_native/Format.h +++ b/src/dawn/native/Format.h @@ -15,12 +15,12 @@ #ifndef DAWNNATIVE_FORMAT_H_ #define DAWNNATIVE_FORMAT_H_ -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include "dawn/common/ityp_bitset.h" -#include "dawn_native/EnumClassBitmasks.h" -#include "dawn_native/Error.h" -#include "dawn_native/Subresource.h" +#include "dawn/native/EnumClassBitmasks.h" +#include "dawn/native/Error.h" +#include "dawn/native/Subresource.h" #include diff --git a/src/dawn_native/Forward.h b/src/dawn/native/Forward.h similarity index 100% rename from src/dawn_native/Forward.h rename to src/dawn/native/Forward.h diff --git a/src/dawn_native/IndirectDrawMetadata.cpp b/src/dawn/native/IndirectDrawMetadata.cpp similarity index 97% rename from src/dawn_native/IndirectDrawMetadata.cpp rename to src/dawn/native/IndirectDrawMetadata.cpp index f6a0e225f7..ebe0e7fb90 100644 --- a/src/dawn_native/IndirectDrawMetadata.cpp +++ b/src/dawn/native/IndirectDrawMetadata.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/IndirectDrawMetadata.h" +#include "dawn/native/IndirectDrawMetadata.h" #include "dawn/common/Constants.h" #include "dawn/common/RefCounted.h" -#include "dawn_native/IndirectDrawValidationEncoder.h" -#include "dawn_native/Limits.h" -#include "dawn_native/RenderBundle.h" +#include "dawn/native/IndirectDrawValidationEncoder.h" +#include "dawn/native/Limits.h" +#include "dawn/native/RenderBundle.h" #include #include diff --git a/src/dawn_native/IndirectDrawMetadata.h b/src/dawn/native/IndirectDrawMetadata.h similarity index 97% rename from src/dawn_native/IndirectDrawMetadata.h rename to src/dawn/native/IndirectDrawMetadata.h index 57fee03590..602be861f7 100644 --- a/src/dawn_native/IndirectDrawMetadata.h +++ b/src/dawn/native/IndirectDrawMetadata.h @@ -17,9 +17,9 @@ #include "dawn/common/NonCopyable.h" #include "dawn/common/RefCounted.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandBufferStateTracker.h" -#include "dawn_native/Commands.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandBufferStateTracker.h" +#include "dawn/native/Commands.h" #include #include diff --git a/src/dawn_native/IndirectDrawValidationEncoder.cpp b/src/dawn/native/IndirectDrawValidationEncoder.cpp similarity index 97% rename from src/dawn_native/IndirectDrawValidationEncoder.cpp rename to src/dawn/native/IndirectDrawValidationEncoder.cpp index 02c705713a..3e6850e58c 100644 --- a/src/dawn_native/IndirectDrawValidationEncoder.cpp +++ b/src/dawn/native/IndirectDrawValidationEncoder.cpp @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/IndirectDrawValidationEncoder.h" +#include "dawn/native/IndirectDrawValidationEncoder.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/ComputePassEncoder.h" -#include "dawn_native/ComputePipeline.h" -#include "dawn_native/Device.h" -#include "dawn_native/InternalPipelineStore.h" -#include "dawn_native/Queue.h" -#include "dawn_native/utils/WGPUHelpers.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/ComputePassEncoder.h" +#include "dawn/native/ComputePipeline.h" +#include "dawn/native/Device.h" +#include "dawn/native/InternalPipelineStore.h" +#include "dawn/native/Queue.h" +#include "dawn/native/utils/WGPUHelpers.h" #include #include diff --git a/src/dawn_native/IndirectDrawValidationEncoder.h b/src/dawn/native/IndirectDrawValidationEncoder.h similarity index 95% rename from src/dawn_native/IndirectDrawValidationEncoder.h rename to src/dawn/native/IndirectDrawValidationEncoder.h index 84593a98d5..6714137037 100644 --- a/src/dawn_native/IndirectDrawValidationEncoder.h +++ b/src/dawn/native/IndirectDrawValidationEncoder.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_INDIRECTDRAWVALIDATIONENCODER_H_ #define DAWNNATIVE_INDIRECTDRAWVALIDATIONENCODER_H_ -#include "dawn_native/Error.h" -#include "dawn_native/IndirectDrawMetadata.h" +#include "dawn/native/Error.h" +#include "dawn/native/IndirectDrawMetadata.h" namespace dawn::native { diff --git a/src/dawn_native/Instance.cpp b/src/dawn/native/Instance.cpp similarity index 98% rename from src/dawn_native/Instance.cpp rename to src/dawn/native/Instance.cpp index 3f23c73bc8..48bf74064d 100644 --- a/src/dawn_native/Instance.cpp +++ b/src/dawn/native/Instance.cpp @@ -12,25 +12,25 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Instance.h" +#include "dawn/native/Instance.h" #include "dawn/common/Assert.h" #include "dawn/common/GPUInfo.h" #include "dawn/common/Log.h" #include "dawn/common/SystemUtils.h" +#include "dawn/native/ChainUtils_autogen.h" +#include "dawn/native/ErrorData.h" +#include "dawn/native/Surface.h" +#include "dawn/native/ValidationUtils_autogen.h" #include "dawn/platform/DawnPlatform.h" -#include "dawn_native/ChainUtils_autogen.h" -#include "dawn_native/ErrorData.h" -#include "dawn_native/Surface.h" -#include "dawn_native/ValidationUtils_autogen.h" // For SwiftShader fallback #if defined(DAWN_ENABLE_BACKEND_VULKAN) -# include "dawn_native/VulkanBackend.h" +# include "dawn/native/VulkanBackend.h" #endif // defined(DAWN_ENABLE_BACKEND_VULKAN) #if defined(DAWN_USE_X11) -# include "dawn_native/XlibXcbFunctions.h" +# include "dawn/native/XlibXcbFunctions.h" #endif // defined(DAWN_USE_X11) #include diff --git a/src/dawn_native/Instance.h b/src/dawn/native/Instance.h similarity index 96% rename from src/dawn_native/Instance.h rename to src/dawn/native/Instance.h index 47bcd97e7b..58986893a1 100644 --- a/src/dawn_native/Instance.h +++ b/src/dawn/native/Instance.h @@ -17,11 +17,11 @@ #include "dawn/common/RefCounted.h" #include "dawn/common/ityp_bitset.h" -#include "dawn_native/Adapter.h" -#include "dawn_native/BackendConnection.h" -#include "dawn_native/Features.h" -#include "dawn_native/Toggles.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/Adapter.h" +#include "dawn/native/BackendConnection.h" +#include "dawn/native/Features.h" +#include "dawn/native/Toggles.h" +#include "dawn/native/dawn_platform.h" #include #include diff --git a/src/dawn_native/IntegerTypes.h b/src/dawn/native/IntegerTypes.h similarity index 100% rename from src/dawn_native/IntegerTypes.h rename to src/dawn/native/IntegerTypes.h diff --git a/src/dawn_native/InternalPipelineStore.cpp b/src/dawn/native/InternalPipelineStore.cpp similarity index 85% rename from src/dawn_native/InternalPipelineStore.cpp rename to src/dawn/native/InternalPipelineStore.cpp index 285deabef7..a2532aa8a6 100644 --- a/src/dawn_native/InternalPipelineStore.cpp +++ b/src/dawn/native/InternalPipelineStore.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/InternalPipelineStore.h" +#include "dawn/native/InternalPipelineStore.h" -#include "dawn_native/ComputePipeline.h" -#include "dawn_native/Device.h" -#include "dawn_native/RenderPipeline.h" -#include "dawn_native/ShaderModule.h" +#include "dawn/native/ComputePipeline.h" +#include "dawn/native/Device.h" +#include "dawn/native/RenderPipeline.h" +#include "dawn/native/ShaderModule.h" #include diff --git a/src/dawn_native/InternalPipelineStore.h b/src/dawn/native/InternalPipelineStore.h similarity index 94% rename from src/dawn_native/InternalPipelineStore.h rename to src/dawn/native/InternalPipelineStore.h index 38e18934c4..64e7728266 100644 --- a/src/dawn_native/InternalPipelineStore.h +++ b/src/dawn/native/InternalPipelineStore.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_INTERNALPIPELINESTORE_H_ #define DAWNNATIVE_INTERNALPIPELINESTORE_H_ -#include "dawn_native/ObjectBase.h" -#include "dawn_native/ScratchBuffer.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/ScratchBuffer.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/Limits.cpp b/src/dawn/native/Limits.cpp similarity index 99% rename from src/dawn_native/Limits.cpp rename to src/dawn/native/Limits.cpp index 3039d30118..a7b8ec9bcc 100644 --- a/src/dawn_native/Limits.cpp +++ b/src/dawn/native/Limits.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Limits.h" +#include "dawn/native/Limits.h" #include "dawn/common/Assert.h" diff --git a/src/dawn_native/Limits.h b/src/dawn/native/Limits.h similarity index 95% rename from src/dawn_native/Limits.h rename to src/dawn/native/Limits.h index b3e09d00a5..f41eaa8697 100644 --- a/src/dawn_native/Limits.h +++ b/src/dawn/native/Limits.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_LIMITS_H_ #define DAWNNATIVE_LIMITS_H_ -#include "dawn_native/Error.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/Error.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native { diff --git a/src/dawn_native/ObjectBase.cpp b/src/dawn/native/ObjectBase.cpp similarity index 97% rename from src/dawn_native/ObjectBase.cpp rename to src/dawn/native/ObjectBase.cpp index ece3f48a3f..3cafdb79bb 100644 --- a/src/dawn_native/ObjectBase.cpp +++ b/src/dawn/native/ObjectBase.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/ObjectBase.h" -#include "dawn_native/Device.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/Device.h" #include diff --git a/src/dawn_native/ObjectBase.h b/src/dawn/native/ObjectBase.h similarity index 99% rename from src/dawn_native/ObjectBase.h rename to src/dawn/native/ObjectBase.h index 45bc4d0d39..8f110a18c4 100644 --- a/src/dawn_native/ObjectBase.h +++ b/src/dawn/native/ObjectBase.h @@ -17,7 +17,7 @@ #include "dawn/common/LinkedList.h" #include "dawn/common/RefCounted.h" -#include "dawn_native/Forward.h" +#include "dawn/native/Forward.h" #include diff --git a/src/dawn_native/ObjectContentHasher.cpp b/src/dawn/native/ObjectContentHasher.cpp similarity index 94% rename from src/dawn_native/ObjectContentHasher.cpp rename to src/dawn/native/ObjectContentHasher.cpp index 9603fe98ae..58c892e927 100644 --- a/src/dawn_native/ObjectContentHasher.cpp +++ b/src/dawn/native/ObjectContentHasher.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/ObjectContentHasher.h" +#include "dawn/native/ObjectContentHasher.h" namespace dawn::native { diff --git a/src/dawn_native/ObjectContentHasher.h b/src/dawn/native/ObjectContentHasher.h similarity index 100% rename from src/dawn_native/ObjectContentHasher.h rename to src/dawn/native/ObjectContentHasher.h diff --git a/src/dawn_native/PassResourceUsage.h b/src/dawn/native/PassResourceUsage.h similarity index 98% rename from src/dawn_native/PassResourceUsage.h rename to src/dawn/native/PassResourceUsage.h index f757ad5e15..c6fe535009 100644 --- a/src/dawn_native/PassResourceUsage.h +++ b/src/dawn/native/PassResourceUsage.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_PASSRESOURCEUSAGE_H #define DAWNNATIVE_PASSRESOURCEUSAGE_H -#include "dawn_native/SubresourceStorage.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/SubresourceStorage.h" +#include "dawn/native/dawn_platform.h" #include #include diff --git a/src/dawn_native/PassResourceUsageTracker.cpp b/src/dawn/native/PassResourceUsageTracker.cpp similarity index 97% rename from src/dawn_native/PassResourceUsageTracker.cpp rename to src/dawn/native/PassResourceUsageTracker.cpp index 5fa4717587..34b66b67a7 100644 --- a/src/dawn_native/PassResourceUsageTracker.cpp +++ b/src/dawn/native/PassResourceUsageTracker.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/PassResourceUsageTracker.h" +#include "dawn/native/PassResourceUsageTracker.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/EnumMaskIterator.h" -#include "dawn_native/ExternalTexture.h" -#include "dawn_native/Format.h" -#include "dawn_native/QuerySet.h" -#include "dawn_native/Texture.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/EnumMaskIterator.h" +#include "dawn/native/ExternalTexture.h" +#include "dawn/native/Format.h" +#include "dawn/native/QuerySet.h" +#include "dawn/native/Texture.h" #include diff --git a/src/dawn_native/PassResourceUsageTracker.h b/src/dawn/native/PassResourceUsageTracker.h similarity index 97% rename from src/dawn_native/PassResourceUsageTracker.h rename to src/dawn/native/PassResourceUsageTracker.h index c7f989da39..ad0ef92fe1 100644 --- a/src/dawn_native/PassResourceUsageTracker.h +++ b/src/dawn/native/PassResourceUsageTracker.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_PASSRESOURCEUSAGETRACKER_H_ #define DAWNNATIVE_PASSRESOURCEUSAGETRACKER_H_ -#include "dawn_native/PassResourceUsage.h" +#include "dawn/native/PassResourceUsage.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/PerStage.cpp b/src/dawn/native/PerStage.cpp similarity index 98% rename from src/dawn_native/PerStage.cpp rename to src/dawn/native/PerStage.cpp index 47bbcfdc57..365d54480d 100644 --- a/src/dawn_native/PerStage.cpp +++ b/src/dawn/native/PerStage.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/PerStage.h" +#include "dawn/native/PerStage.h" namespace dawn::native { diff --git a/src/dawn_native/PerStage.h b/src/dawn/native/PerStage.h similarity index 97% rename from src/dawn_native/PerStage.h rename to src/dawn/native/PerStage.h index 60e4237074..47e0abc3d2 100644 --- a/src/dawn_native/PerStage.h +++ b/src/dawn/native/PerStage.h @@ -18,9 +18,9 @@ #include "dawn/common/Assert.h" #include "dawn/common/BitSetIterator.h" #include "dawn/common/Constants.h" -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/PersistentCache.cpp b/src/dawn/native/PersistentCache.cpp similarity index 97% rename from src/dawn_native/PersistentCache.cpp rename to src/dawn/native/PersistentCache.cpp index 445a0c6c64..ce3ab49232 100644 --- a/src/dawn_native/PersistentCache.cpp +++ b/src/dawn/native/PersistentCache.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/PersistentCache.h" +#include "dawn/native/PersistentCache.h" #include "dawn/common/Assert.h" +#include "dawn/native/Device.h" #include "dawn/platform/DawnPlatform.h" -#include "dawn_native/Device.h" namespace dawn::native { diff --git a/src/dawn_native/PersistentCache.h b/src/dawn/native/PersistentCache.h similarity index 99% rename from src/dawn_native/PersistentCache.h rename to src/dawn/native/PersistentCache.h index 28de28d2b0..7854d59f4e 100644 --- a/src/dawn_native/PersistentCache.h +++ b/src/dawn/native/PersistentCache.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_PERSISTENTCACHE_H_ #define DAWNNATIVE_PERSISTENTCACHE_H_ -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" #include #include diff --git a/src/dawn_native/Pipeline.cpp b/src/dawn/native/Pipeline.cpp similarity index 97% rename from src/dawn_native/Pipeline.cpp rename to src/dawn/native/Pipeline.cpp index 02a9d8d0d3..73a46bec76 100644 --- a/src/dawn_native/Pipeline.cpp +++ b/src/dawn/native/Pipeline.cpp @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Pipeline.h" +#include "dawn/native/Pipeline.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Device.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/ObjectContentHasher.h" -#include "dawn_native/PipelineLayout.h" -#include "dawn_native/ShaderModule.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Device.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/ObjectContentHasher.h" +#include "dawn/native/PipelineLayout.h" +#include "dawn/native/ShaderModule.h" namespace dawn::native { MaybeError ValidateProgrammableStage(DeviceBase* device, diff --git a/src/dawn_native/Pipeline.h b/src/dawn/native/Pipeline.h similarity index 92% rename from src/dawn_native/Pipeline.h rename to src/dawn/native/Pipeline.h index d640ace68e..ab078c3563 100644 --- a/src/dawn_native/Pipeline.h +++ b/src/dawn/native/Pipeline.h @@ -15,14 +15,14 @@ #ifndef DAWNNATIVE_PIPELINE_H_ #define DAWNNATIVE_PIPELINE_H_ -#include "dawn_native/CachedObject.h" -#include "dawn_native/Forward.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/PerStage.h" -#include "dawn_native/PipelineLayout.h" -#include "dawn_native/ShaderModule.h" +#include "dawn/native/CachedObject.h" +#include "dawn/native/Forward.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/PerStage.h" +#include "dawn/native/PipelineLayout.h" +#include "dawn/native/ShaderModule.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include #include diff --git a/src/dawn_native/PipelineLayout.cpp b/src/dawn/native/PipelineLayout.cpp similarity index 98% rename from src/dawn_native/PipelineLayout.cpp rename to src/dawn/native/PipelineLayout.cpp index 274fdfc28a..56ab100422 100644 --- a/src/dawn_native/PipelineLayout.cpp +++ b/src/dawn/native/PipelineLayout.cpp @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/PipelineLayout.h" +#include "dawn/native/PipelineLayout.h" #include "dawn/common/Assert.h" #include "dawn/common/BitSetIterator.h" #include "dawn/common/ityp_stack_vec.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Device.h" -#include "dawn_native/ObjectContentHasher.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/ShaderModule.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Device.h" +#include "dawn/native/ObjectContentHasher.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/ShaderModule.h" namespace dawn::native { diff --git a/src/dawn_native/PipelineLayout.h b/src/dawn/native/PipelineLayout.h similarity index 94% rename from src/dawn_native/PipelineLayout.h rename to src/dawn/native/PipelineLayout.h index 258fea59db..4850536d42 100644 --- a/src/dawn_native/PipelineLayout.h +++ b/src/dawn/native/PipelineLayout.h @@ -18,13 +18,13 @@ #include "dawn/common/Constants.h" #include "dawn/common/ityp_array.h" #include "dawn/common/ityp_bitset.h" -#include "dawn_native/BindingInfo.h" -#include "dawn_native/CachedObject.h" -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/ObjectBase.h" +#include "dawn/native/BindingInfo.h" +#include "dawn/native/CachedObject.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/ObjectBase.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include #include diff --git a/src/dawn_native/PooledResourceMemoryAllocator.cpp b/src/dawn/native/PooledResourceMemoryAllocator.cpp similarity index 96% rename from src/dawn_native/PooledResourceMemoryAllocator.cpp rename to src/dawn/native/PooledResourceMemoryAllocator.cpp index 161493fb49..0a01a99ab5 100644 --- a/src/dawn_native/PooledResourceMemoryAllocator.cpp +++ b/src/dawn/native/PooledResourceMemoryAllocator.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/PooledResourceMemoryAllocator.h" -#include "dawn_native/Device.h" +#include "dawn/native/PooledResourceMemoryAllocator.h" +#include "dawn/native/Device.h" namespace dawn::native { diff --git a/src/dawn_native/PooledResourceMemoryAllocator.h b/src/dawn/native/PooledResourceMemoryAllocator.h similarity index 97% rename from src/dawn_native/PooledResourceMemoryAllocator.h rename to src/dawn/native/PooledResourceMemoryAllocator.h index 03b15ef5f2..898bafe497 100644 --- a/src/dawn_native/PooledResourceMemoryAllocator.h +++ b/src/dawn/native/PooledResourceMemoryAllocator.h @@ -16,7 +16,7 @@ #define DAWNNATIVE_POOLEDRESOURCEMEMORYALLOCATOR_H_ #include "dawn/common/SerialQueue.h" -#include "dawn_native/ResourceHeapAllocator.h" +#include "dawn/native/ResourceHeapAllocator.h" #include diff --git a/src/dawn_native/ProgrammableEncoder.cpp b/src/dawn/native/ProgrammableEncoder.cpp similarity index 96% rename from src/dawn_native/ProgrammableEncoder.cpp rename to src/dawn/native/ProgrammableEncoder.cpp index 486c34bd56..8bdc08b0c0 100644 --- a/src/dawn_native/ProgrammableEncoder.cpp +++ b/src/dawn/native/ProgrammableEncoder.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/ProgrammableEncoder.h" +#include "dawn/native/ProgrammableEncoder.h" #include "dawn/common/BitSetIterator.h" #include "dawn/common/ityp_array.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/Commands.h" -#include "dawn_native/Device.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/ValidationUtils_autogen.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/Commands.h" +#include "dawn/native/Device.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/ValidationUtils_autogen.h" #include diff --git a/src/dawn_native/ProgrammableEncoder.h b/src/dawn/native/ProgrammableEncoder.h similarity index 91% rename from src/dawn_native/ProgrammableEncoder.h rename to src/dawn/native/ProgrammableEncoder.h index 47f6b80218..6bba7a2752 100644 --- a/src/dawn_native/ProgrammableEncoder.h +++ b/src/dawn/native/ProgrammableEncoder.h @@ -15,13 +15,13 @@ #ifndef DAWNNATIVE_PROGRAMMABLEENCODER_H_ #define DAWNNATIVE_PROGRAMMABLEENCODER_H_ -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/ObjectBase.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/ObjectBase.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native { diff --git a/src/dawn_native/QueryHelper.cpp b/src/dawn/native/QueryHelper.cpp similarity index 95% rename from src/dawn_native/QueryHelper.cpp rename to src/dawn/native/QueryHelper.cpp index 403552c4b3..de9b57d5cb 100644 --- a/src/dawn_native/QueryHelper.cpp +++ b/src/dawn/native/QueryHelper.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/QueryHelper.h" +#include "dawn/native/QueryHelper.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/ComputePassEncoder.h" -#include "dawn_native/ComputePipeline.h" -#include "dawn_native/Device.h" -#include "dawn_native/InternalPipelineStore.h" -#include "dawn_native/utils/WGPUHelpers.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/ComputePassEncoder.h" +#include "dawn/native/ComputePipeline.h" +#include "dawn/native/Device.h" +#include "dawn/native/InternalPipelineStore.h" +#include "dawn/native/utils/WGPUHelpers.h" #include diff --git a/src/dawn_native/QueryHelper.h b/src/dawn/native/QueryHelper.h similarity index 95% rename from src/dawn_native/QueryHelper.h rename to src/dawn/native/QueryHelper.h index 2c64754f2b..111b1952cd 100644 --- a/src/dawn_native/QueryHelper.h +++ b/src/dawn/native/QueryHelper.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_QUERYHELPER_H_ #define DAWNNATIVE_QUERYHELPER_H_ -#include "dawn_native/Error.h" -#include "dawn_native/ObjectBase.h" +#include "dawn/native/Error.h" +#include "dawn/native/ObjectBase.h" namespace dawn::native { diff --git a/src/dawn_native/QuerySet.cpp b/src/dawn/native/QuerySet.cpp similarity index 97% rename from src/dawn_native/QuerySet.cpp rename to src/dawn/native/QuerySet.cpp index 5c02574015..3f20dab9de 100644 --- a/src/dawn_native/QuerySet.cpp +++ b/src/dawn/native/QuerySet.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/QuerySet.h" +#include "dawn/native/QuerySet.h" -#include "dawn_native/Device.h" -#include "dawn_native/Features.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/ValidationUtils_autogen.h" +#include "dawn/native/Device.h" +#include "dawn/native/Features.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/ValidationUtils_autogen.h" #include diff --git a/src/dawn_native/QuerySet.h b/src/dawn/native/QuerySet.h similarity index 94% rename from src/dawn_native/QuerySet.h rename to src/dawn/native/QuerySet.h index 42c2b87ac3..39a69df425 100644 --- a/src/dawn_native/QuerySet.h +++ b/src/dawn/native/QuerySet.h @@ -15,11 +15,11 @@ #ifndef DAWNNATIVE_QUERYSET_H_ #define DAWNNATIVE_QUERYSET_H_ -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/ObjectBase.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/ObjectBase.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native { diff --git a/src/dawn_native/Queue.cpp b/src/dawn/native/Queue.cpp similarity index 97% rename from src/dawn_native/Queue.cpp rename to src/dawn/native/Queue.cpp index 1849e3e4c0..6c061d3233 100644 --- a/src/dawn_native/Queue.cpp +++ b/src/dawn/native/Queue.cpp @@ -12,25 +12,25 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Queue.h" +#include "dawn/native/Queue.h" #include "dawn/common/Constants.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/CommandValidation.h" +#include "dawn/native/Commands.h" +#include "dawn/native/CopyTextureForBrowserHelper.h" +#include "dawn/native/Device.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/ExternalTexture.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/QuerySet.h" +#include "dawn/native/RenderPassEncoder.h" +#include "dawn/native/RenderPipeline.h" +#include "dawn/native/Texture.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/CommandValidation.h" -#include "dawn_native/Commands.h" -#include "dawn_native/CopyTextureForBrowserHelper.h" -#include "dawn_native/Device.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/ExternalTexture.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/QuerySet.h" -#include "dawn_native/RenderPassEncoder.h" -#include "dawn_native/RenderPipeline.h" -#include "dawn_native/Texture.h" #include diff --git a/src/dawn_native/Queue.h b/src/dawn/native/Queue.h similarity index 96% rename from src/dawn_native/Queue.h rename to src/dawn/native/Queue.h index f873884db3..ee1074de87 100644 --- a/src/dawn_native/Queue.h +++ b/src/dawn/native/Queue.h @@ -16,12 +16,12 @@ #define DAWNNATIVE_QUEUE_H_ #include "dawn/common/SerialQueue.h" -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/ObjectBase.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/ObjectBase.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native { diff --git a/src/dawn_native/RenderBundle.cpp b/src/dawn/native/RenderBundle.cpp similarity index 94% rename from src/dawn_native/RenderBundle.cpp rename to src/dawn/native/RenderBundle.cpp index 46d209f30e..da1018823b 100644 --- a/src/dawn_native/RenderBundle.cpp +++ b/src/dawn/native/RenderBundle.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/RenderBundle.h" +#include "dawn/native/RenderBundle.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/Commands.h" -#include "dawn_native/Device.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/RenderBundleEncoder.h" +#include "dawn/native/Commands.h" +#include "dawn/native/Device.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/RenderBundleEncoder.h" namespace dawn::native { diff --git a/src/dawn_native/RenderBundle.h b/src/dawn/native/RenderBundle.h similarity index 87% rename from src/dawn_native/RenderBundle.h rename to src/dawn/native/RenderBundle.h index 7b2484d4e6..9112b77c99 100644 --- a/src/dawn_native/RenderBundle.h +++ b/src/dawn/native/RenderBundle.h @@ -16,15 +16,15 @@ #define DAWNNATIVE_RENDERBUNDLE_H_ #include "dawn/common/Constants.h" -#include "dawn_native/AttachmentState.h" -#include "dawn_native/CommandAllocator.h" -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/IndirectDrawMetadata.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/PassResourceUsage.h" +#include "dawn/native/AttachmentState.h" +#include "dawn/native/CommandAllocator.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/IndirectDrawMetadata.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/PassResourceUsage.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/RenderBundleEncoder.cpp b/src/dawn/native/RenderBundleEncoder.cpp similarity index 95% rename from src/dawn_native/RenderBundleEncoder.cpp rename to src/dawn/native/RenderBundleEncoder.cpp index 2bf8569bd5..421774c18d 100644 --- a/src/dawn_native/RenderBundleEncoder.cpp +++ b/src/dawn/native/RenderBundleEncoder.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/RenderBundleEncoder.h" +#include "dawn/native/RenderBundleEncoder.h" +#include "dawn/native/CommandValidation.h" +#include "dawn/native/Commands.h" +#include "dawn/native/Device.h" +#include "dawn/native/Format.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/RenderPipeline.h" +#include "dawn/native/ValidationUtils_autogen.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/CommandValidation.h" -#include "dawn_native/Commands.h" -#include "dawn_native/Device.h" -#include "dawn_native/Format.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/RenderPipeline.h" -#include "dawn_native/ValidationUtils_autogen.h" namespace dawn::native { diff --git a/src/dawn_native/RenderBundleEncoder.h b/src/dawn/native/RenderBundleEncoder.h similarity index 90% rename from src/dawn_native/RenderBundleEncoder.h rename to src/dawn/native/RenderBundleEncoder.h index ebd2a90b8d..46c147005e 100644 --- a/src/dawn_native/RenderBundleEncoder.h +++ b/src/dawn/native/RenderBundleEncoder.h @@ -15,11 +15,11 @@ #ifndef DAWNNATIVE_RENDERBUNDLEENCODER_H_ #define DAWNNATIVE_RENDERBUNDLEENCODER_H_ -#include "dawn_native/EncodingContext.h" -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/RenderBundle.h" -#include "dawn_native/RenderEncoderBase.h" +#include "dawn/native/EncodingContext.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/RenderBundle.h" +#include "dawn/native/RenderEncoderBase.h" namespace dawn::native { diff --git a/src/dawn_native/RenderEncoderBase.cpp b/src/dawn/native/RenderEncoderBase.cpp similarity index 98% rename from src/dawn_native/RenderEncoderBase.cpp rename to src/dawn/native/RenderEncoderBase.cpp index 18824de33f..eeaf0e81ac 100644 --- a/src/dawn_native/RenderEncoderBase.cpp +++ b/src/dawn/native/RenderEncoderBase.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/RenderEncoderBase.h" +#include "dawn/native/RenderEncoderBase.h" #include "dawn/common/Constants.h" #include "dawn/common/Log.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/CommandValidation.h" -#include "dawn_native/Commands.h" -#include "dawn_native/Device.h" -#include "dawn_native/RenderPipeline.h" -#include "dawn_native/ValidationUtils_autogen.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/CommandValidation.h" +#include "dawn/native/Commands.h" +#include "dawn/native/Device.h" +#include "dawn/native/RenderPipeline.h" +#include "dawn/native/ValidationUtils_autogen.h" #include #include diff --git a/src/dawn_native/RenderEncoderBase.h b/src/dawn/native/RenderEncoderBase.h similarity index 92% rename from src/dawn_native/RenderEncoderBase.h rename to src/dawn/native/RenderEncoderBase.h index 7bd1d5f8c5..80128f3082 100644 --- a/src/dawn_native/RenderEncoderBase.h +++ b/src/dawn/native/RenderEncoderBase.h @@ -15,12 +15,12 @@ #ifndef DAWNNATIVE_RENDERENCODERBASE_H_ #define DAWNNATIVE_RENDERENCODERBASE_H_ -#include "dawn_native/AttachmentState.h" -#include "dawn_native/CommandBufferStateTracker.h" -#include "dawn_native/Error.h" -#include "dawn_native/IndirectDrawMetadata.h" -#include "dawn_native/PassResourceUsageTracker.h" -#include "dawn_native/ProgrammableEncoder.h" +#include "dawn/native/AttachmentState.h" +#include "dawn/native/CommandBufferStateTracker.h" +#include "dawn/native/Error.h" +#include "dawn/native/IndirectDrawMetadata.h" +#include "dawn/native/PassResourceUsageTracker.h" +#include "dawn/native/ProgrammableEncoder.h" namespace dawn::native { diff --git a/src/dawn_native/RenderPassEncoder.cpp b/src/dawn/native/RenderPassEncoder.cpp similarity index 97% rename from src/dawn_native/RenderPassEncoder.cpp rename to src/dawn/native/RenderPassEncoder.cpp index fea50abc90..1f374e1220 100644 --- a/src/dawn_native/RenderPassEncoder.cpp +++ b/src/dawn/native/RenderPassEncoder.cpp @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/RenderPassEncoder.h" +#include "dawn/native/RenderPassEncoder.h" #include "dawn/common/Constants.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/CommandValidation.h" -#include "dawn_native/Commands.h" -#include "dawn_native/Device.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/QuerySet.h" -#include "dawn_native/RenderBundle.h" -#include "dawn_native/RenderPipeline.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/CommandValidation.h" +#include "dawn/native/Commands.h" +#include "dawn/native/Device.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/QuerySet.h" +#include "dawn/native/RenderBundle.h" +#include "dawn/native/RenderPipeline.h" #include #include diff --git a/src/dawn_native/RenderPassEncoder.h b/src/dawn/native/RenderPassEncoder.h similarity index 96% rename from src/dawn_native/RenderPassEncoder.h rename to src/dawn/native/RenderPassEncoder.h index 34adb817a0..da17181473 100644 --- a/src/dawn_native/RenderPassEncoder.h +++ b/src/dawn/native/RenderPassEncoder.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_RENDERPASSENCODER_H_ #define DAWNNATIVE_RENDERPASSENCODER_H_ -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/RenderEncoderBase.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/RenderEncoderBase.h" namespace dawn::native { diff --git a/src/dawn_native/RenderPipeline.cpp b/src/dawn/native/RenderPipeline.cpp similarity index 99% rename from src/dawn_native/RenderPipeline.cpp rename to src/dawn/native/RenderPipeline.cpp index 846989e97c..8cf13b94c1 100644 --- a/src/dawn_native/RenderPipeline.cpp +++ b/src/dawn/native/RenderPipeline.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/RenderPipeline.h" +#include "dawn/native/RenderPipeline.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/ChainUtils_autogen.h" -#include "dawn_native/Commands.h" -#include "dawn_native/Device.h" -#include "dawn_native/InternalPipelineStore.h" -#include "dawn_native/ObjectContentHasher.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/ValidationUtils_autogen.h" -#include "dawn_native/VertexFormat.h" +#include "dawn/native/ChainUtils_autogen.h" +#include "dawn/native/Commands.h" +#include "dawn/native/Device.h" +#include "dawn/native/InternalPipelineStore.h" +#include "dawn/native/ObjectContentHasher.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/ValidationUtils_autogen.h" +#include "dawn/native/VertexFormat.h" #include #include diff --git a/src/dawn_native/RenderPipeline.h b/src/dawn/native/RenderPipeline.h similarity index 96% rename from src/dawn_native/RenderPipeline.h rename to src/dawn/native/RenderPipeline.h index b36dce6931..da6cdd2380 100644 --- a/src/dawn_native/RenderPipeline.h +++ b/src/dawn/native/RenderPipeline.h @@ -16,12 +16,12 @@ #define DAWNNATIVE_RENDERPIPELINE_H_ #include "dawn/common/TypedInteger.h" -#include "dawn_native/AttachmentState.h" -#include "dawn_native/Forward.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/Pipeline.h" +#include "dawn/native/AttachmentState.h" +#include "dawn/native/Forward.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/Pipeline.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include #include diff --git a/src/dawn_native/ResourceHeap.h b/src/dawn/native/ResourceHeap.h similarity index 96% rename from src/dawn_native/ResourceHeap.h rename to src/dawn/native/ResourceHeap.h index 465faaea83..cb45c88280 100644 --- a/src/dawn_native/ResourceHeap.h +++ b/src/dawn/native/ResourceHeap.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_RESOURCEHEAP_H_ #define DAWNNATIVE_RESOURCEHEAP_H_ -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" namespace dawn::native { diff --git a/src/dawn_native/ResourceHeapAllocator.h b/src/dawn/native/ResourceHeapAllocator.h similarity index 94% rename from src/dawn_native/ResourceHeapAllocator.h rename to src/dawn/native/ResourceHeapAllocator.h index 1fcf854346..3c861543b8 100644 --- a/src/dawn_native/ResourceHeapAllocator.h +++ b/src/dawn/native/ResourceHeapAllocator.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_RESOURCEHEAPALLOCATOR_H_ #define DAWNNATIVE_RESOURCEHEAPALLOCATOR_H_ -#include "dawn_native/Error.h" -#include "dawn_native/ResourceHeap.h" +#include "dawn/native/Error.h" +#include "dawn/native/ResourceHeap.h" #include diff --git a/src/dawn_native/ResourceMemoryAllocation.cpp b/src/dawn/native/ResourceMemoryAllocation.cpp similarity index 97% rename from src/dawn_native/ResourceMemoryAllocation.cpp rename to src/dawn/native/ResourceMemoryAllocation.cpp index 6b97b4d158..8848c18a6b 100644 --- a/src/dawn_native/ResourceMemoryAllocation.cpp +++ b/src/dawn/native/ResourceMemoryAllocation.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/ResourceMemoryAllocation.h" +#include "dawn/native/ResourceMemoryAllocation.h" #include "dawn/common/Assert.h" namespace dawn::native { diff --git a/src/dawn_native/ResourceMemoryAllocation.h b/src/dawn/native/ResourceMemoryAllocation.h similarity index 100% rename from src/dawn_native/ResourceMemoryAllocation.h rename to src/dawn/native/ResourceMemoryAllocation.h diff --git a/src/dawn_native/RingBufferAllocator.cpp b/src/dawn/native/RingBufferAllocator.cpp similarity index 99% rename from src/dawn_native/RingBufferAllocator.cpp rename to src/dawn/native/RingBufferAllocator.cpp index 69d6769731..e1dc7aeb67 100644 --- a/src/dawn_native/RingBufferAllocator.cpp +++ b/src/dawn/native/RingBufferAllocator.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/RingBufferAllocator.h" +#include "dawn/native/RingBufferAllocator.h" // Note: Current RingBufferAllocator implementation uses two indices (start and end) to implement a // circular queue. However, this approach defines a full queue when one element is still unused. diff --git a/src/dawn_native/RingBufferAllocator.h b/src/dawn/native/RingBufferAllocator.h similarity index 98% rename from src/dawn_native/RingBufferAllocator.h rename to src/dawn/native/RingBufferAllocator.h index 555fff22ad..8049470f4c 100644 --- a/src/dawn_native/RingBufferAllocator.h +++ b/src/dawn/native/RingBufferAllocator.h @@ -16,7 +16,7 @@ #define DAWNNATIVE_RINGBUFFERALLOCATOR_H_ #include "dawn/common/SerialQueue.h" -#include "dawn_native/IntegerTypes.h" +#include "dawn/native/IntegerTypes.h" #include #include diff --git a/src/dawn_native/Sampler.cpp b/src/dawn/native/Sampler.cpp similarity index 97% rename from src/dawn_native/Sampler.cpp rename to src/dawn/native/Sampler.cpp index 9703e1bcc7..ffd8a724cb 100644 --- a/src/dawn_native/Sampler.cpp +++ b/src/dawn/native/Sampler.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Sampler.h" +#include "dawn/native/Sampler.h" -#include "dawn_native/Device.h" -#include "dawn_native/ObjectContentHasher.h" -#include "dawn_native/ValidationUtils_autogen.h" +#include "dawn/native/Device.h" +#include "dawn/native/ObjectContentHasher.h" +#include "dawn/native/ValidationUtils_autogen.h" #include diff --git a/src/dawn_native/Sampler.h b/src/dawn/native/Sampler.h similarity index 93% rename from src/dawn_native/Sampler.h rename to src/dawn/native/Sampler.h index 7c8e762d71..e21b52ce7a 100644 --- a/src/dawn_native/Sampler.h +++ b/src/dawn/native/Sampler.h @@ -15,12 +15,12 @@ #ifndef DAWNNATIVE_SAMPLER_H_ #define DAWNNATIVE_SAMPLER_H_ -#include "dawn_native/CachedObject.h" -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/ObjectBase.h" +#include "dawn/native/CachedObject.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/ObjectBase.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native { diff --git a/src/dawn_native/ScratchBuffer.cpp b/src/dawn/native/ScratchBuffer.cpp similarity index 95% rename from src/dawn_native/ScratchBuffer.cpp rename to src/dawn/native/ScratchBuffer.cpp index 41f241f8ed..be536836ad 100644 --- a/src/dawn_native/ScratchBuffer.cpp +++ b/src/dawn/native/ScratchBuffer.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/ScratchBuffer.h" +#include "dawn/native/ScratchBuffer.h" -#include "dawn_native/Device.h" +#include "dawn/native/Device.h" namespace dawn::native { diff --git a/src/dawn_native/ScratchBuffer.h b/src/dawn/native/ScratchBuffer.h similarity index 98% rename from src/dawn_native/ScratchBuffer.h rename to src/dawn/native/ScratchBuffer.h index 79353205ff..7845022b1e 100644 --- a/src/dawn_native/ScratchBuffer.h +++ b/src/dawn/native/ScratchBuffer.h @@ -16,7 +16,7 @@ #define DAWNNATIVE_SCRATCHBUFFER_H_ #include "dawn/common/RefCounted.h" -#include "dawn_native/Buffer.h" +#include "dawn/native/Buffer.h" #include diff --git a/src/dawn_native/ShaderModule.cpp b/src/dawn/native/ShaderModule.cpp similarity index 99% rename from src/dawn_native/ShaderModule.cpp rename to src/dawn/native/ShaderModule.cpp index 481ba1922e..f419713cb1 100644 --- a/src/dawn_native/ShaderModule.cpp +++ b/src/dawn/native/ShaderModule.cpp @@ -12,20 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/ShaderModule.h" +#include "dawn/native/ShaderModule.h" #include "absl/strings/str_format.h" #include "dawn/common/Constants.h" #include "dawn/common/HashUtils.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/ChainUtils_autogen.h" -#include "dawn_native/CompilationMessages.h" -#include "dawn_native/Device.h" -#include "dawn_native/ObjectContentHasher.h" -#include "dawn_native/Pipeline.h" -#include "dawn_native/PipelineLayout.h" -#include "dawn_native/RenderPipeline.h" -#include "dawn_native/TintUtils.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/ChainUtils_autogen.h" +#include "dawn/native/CompilationMessages.h" +#include "dawn/native/Device.h" +#include "dawn/native/ObjectContentHasher.h" +#include "dawn/native/Pipeline.h" +#include "dawn/native/PipelineLayout.h" +#include "dawn/native/RenderPipeline.h" +#include "dawn/native/TintUtils.h" #include diff --git a/src/dawn_native/ShaderModule.h b/src/dawn/native/ShaderModule.h similarity index 96% rename from src/dawn_native/ShaderModule.h rename to src/dawn/native/ShaderModule.h index c340363b72..a2a884c700 100644 --- a/src/dawn_native/ShaderModule.h +++ b/src/dawn/native/ShaderModule.h @@ -17,17 +17,17 @@ #include "dawn/common/Constants.h" #include "dawn/common/ityp_array.h" -#include "dawn_native/BindingInfo.h" -#include "dawn_native/CachedObject.h" -#include "dawn_native/CompilationMessages.h" -#include "dawn_native/Error.h" -#include "dawn_native/Format.h" -#include "dawn_native/Forward.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/PerStage.h" -#include "dawn_native/VertexFormat.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/BindingInfo.h" +#include "dawn/native/CachedObject.h" +#include "dawn/native/CompilationMessages.h" +#include "dawn/native/Error.h" +#include "dawn/native/Format.h" +#include "dawn/native/Forward.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/PerStage.h" +#include "dawn/native/VertexFormat.h" +#include "dawn/native/dawn_platform.h" #include #include diff --git a/src/dawn_native/SpirvValidation.cpp b/src/dawn/native/SpirvValidation.cpp similarity index 97% rename from src/dawn_native/SpirvValidation.cpp rename to src/dawn/native/SpirvValidation.cpp index 87d50ca15b..72eb8c15c5 100644 --- a/src/dawn_native/SpirvValidation.cpp +++ b/src/dawn/native/SpirvValidation.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/SpirvValidation.h" +#include "dawn/native/SpirvValidation.h" -#include "dawn_native/Device.h" +#include "dawn/native/Device.h" #include #include diff --git a/src/dawn_native/SpirvValidation.h b/src/dawn/native/SpirvValidation.h similarity index 96% rename from src/dawn_native/SpirvValidation.h rename to src/dawn/native/SpirvValidation.h index 598d0112ab..984ebcdefc 100644 --- a/src/dawn_native/SpirvValidation.h +++ b/src/dawn/native/SpirvValidation.h @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" #include diff --git a/src/dawn_native/StagingBuffer.cpp b/src/dawn/native/StagingBuffer.cpp similarity index 95% rename from src/dawn_native/StagingBuffer.cpp rename to src/dawn/native/StagingBuffer.cpp index 6378e81596..a6c258ca5a 100644 --- a/src/dawn_native/StagingBuffer.cpp +++ b/src/dawn/native/StagingBuffer.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/StagingBuffer.h" +#include "dawn/native/StagingBuffer.h" namespace dawn::native { diff --git a/src/dawn_native/StagingBuffer.h b/src/dawn/native/StagingBuffer.h similarity index 97% rename from src/dawn_native/StagingBuffer.h rename to src/dawn/native/StagingBuffer.h index 3e85765bf9..0ebb1c4a42 100644 --- a/src/dawn_native/StagingBuffer.h +++ b/src/dawn/native/StagingBuffer.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_STAGINGBUFFER_H_ #define DAWNNATIVE_STAGINGBUFFER_H_ -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" namespace dawn::native { diff --git a/src/dawn_native/Subresource.cpp b/src/dawn/native/Subresource.cpp similarity index 98% rename from src/dawn_native/Subresource.cpp rename to src/dawn/native/Subresource.cpp index 82622baee1..a83142bfca 100644 --- a/src/dawn_native/Subresource.cpp +++ b/src/dawn/native/Subresource.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Subresource.h" +#include "dawn/native/Subresource.h" #include "dawn/common/Assert.h" -#include "dawn_native/Format.h" +#include "dawn/native/Format.h" namespace dawn::native { diff --git a/src/dawn_native/Subresource.h b/src/dawn/native/Subresource.h similarity index 98% rename from src/dawn_native/Subresource.h rename to src/dawn/native/Subresource.h index 35da7b5c6e..63795e5f7e 100644 --- a/src/dawn_native/Subresource.h +++ b/src/dawn/native/Subresource.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_SUBRESOURCE_H_ #define DAWNNATIVE_SUBRESOURCE_H_ -#include "dawn_native/EnumClassBitmasks.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/EnumClassBitmasks.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native { diff --git a/src/dawn_native/SubresourceStorage.h b/src/dawn/native/SubresourceStorage.h similarity index 99% rename from src/dawn_native/SubresourceStorage.h rename to src/dawn/native/SubresourceStorage.h index 10c0c3b8c5..345f994cea 100644 --- a/src/dawn_native/SubresourceStorage.h +++ b/src/dawn/native/SubresourceStorage.h @@ -17,8 +17,8 @@ #include "dawn/common/Assert.h" #include "dawn/common/TypeTraits.h" -#include "dawn_native/EnumMaskIterator.h" -#include "dawn_native/Subresource.h" +#include "dawn/native/EnumMaskIterator.h" +#include "dawn/native/Subresource.h" #include #include @@ -98,7 +98,7 @@ namespace dawn::native { /* python tools/code_coverage/coverage.py dawn_unittests -b out/coverage -o out/report -c \ "out/coverage/dawn_unittests --gtest_filter=SubresourceStorage\*" -f \ - third_party/dawn/src/dawn_native + third_party/dawn/src/dawn/native */ // // TODO(crbug.com/dawn/836): Make the recompression optional, the calling code should know diff --git a/src/dawn_native/Surface.cpp b/src/dawn/native/Surface.cpp similarity index 98% rename from src/dawn_native/Surface.cpp rename to src/dawn/native/Surface.cpp index 9e6f481d2f..bede05f09e 100644 --- a/src/dawn_native/Surface.cpp +++ b/src/dawn/native/Surface.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Surface.h" +#include "dawn/native/Surface.h" #include "dawn/common/Platform.h" -#include "dawn_native/ChainUtils_autogen.h" -#include "dawn_native/Instance.h" -#include "dawn_native/SwapChain.h" +#include "dawn/native/ChainUtils_autogen.h" +#include "dawn/native/Instance.h" +#include "dawn/native/SwapChain.h" #if defined(DAWN_PLATFORM_WINDOWS) # include diff --git a/src/dawn_native/Surface.h b/src/dawn/native/Surface.h similarity index 95% rename from src/dawn_native/Surface.h rename to src/dawn/native/Surface.h index d613734e04..c6320af71c 100644 --- a/src/dawn_native/Surface.h +++ b/src/dawn/native/Surface.h @@ -16,15 +16,15 @@ #define DAWNNATIVE_SURFACE_H_ #include "dawn/common/RefCounted.h" -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include "dawn/common/Platform.h" #if defined(DAWN_PLATFORM_WINDOWS) -# include "dawn_native/d3d12/d3d12_platform.h" +# include "dawn/native/d3d12/d3d12_platform.h" #endif // defined(DAWN_PLATFORM_WINDOWS) // Forward declare IUnknown diff --git a/src/dawn_native/Surface_metal.mm b/src/dawn/native/Surface_metal.mm similarity index 100% rename from src/dawn_native/Surface_metal.mm rename to src/dawn/native/Surface_metal.mm diff --git a/src/dawn_native/SwapChain.cpp b/src/dawn/native/SwapChain.cpp similarity index 98% rename from src/dawn_native/SwapChain.cpp rename to src/dawn/native/SwapChain.cpp index 5680599e70..6b4c331a30 100644 --- a/src/dawn_native/SwapChain.cpp +++ b/src/dawn/native/SwapChain.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/SwapChain.h" +#include "dawn/native/SwapChain.h" #include "dawn/common/Constants.h" -#include "dawn_native/Adapter.h" -#include "dawn_native/Device.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/Surface.h" -#include "dawn_native/Texture.h" -#include "dawn_native/ValidationUtils_autogen.h" +#include "dawn/native/Adapter.h" +#include "dawn/native/Device.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/Surface.h" +#include "dawn/native/Texture.h" +#include "dawn/native/ValidationUtils_autogen.h" namespace dawn::native { diff --git a/src/dawn_native/SwapChain.h b/src/dawn/native/SwapChain.h similarity index 97% rename from src/dawn_native/SwapChain.h rename to src/dawn/native/SwapChain.h index 09323d42f5..b19c0b6bcc 100644 --- a/src/dawn_native/SwapChain.h +++ b/src/dawn/native/SwapChain.h @@ -15,12 +15,12 @@ #ifndef DAWNNATIVE_SWAPCHAIN_H_ #define DAWNNATIVE_SWAPCHAIN_H_ -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/ObjectBase.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/ObjectBase.h" #include "dawn/dawn_wsi.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native { diff --git a/src/dawn_native/Texture.cpp b/src/dawn/native/Texture.cpp similarity index 99% rename from src/dawn_native/Texture.cpp rename to src/dawn/native/Texture.cpp index 79d5591cd6..2142501d79 100644 --- a/src/dawn_native/Texture.cpp +++ b/src/dawn/native/Texture.cpp @@ -12,20 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/Texture.h" +#include "dawn/native/Texture.h" #include #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" -#include "dawn_native/Adapter.h" -#include "dawn_native/ChainUtils_autogen.h" -#include "dawn_native/Device.h" -#include "dawn_native/EnumMaskIterator.h" -#include "dawn_native/ObjectType_autogen.h" -#include "dawn_native/PassResourceUsage.h" -#include "dawn_native/ValidationUtils_autogen.h" +#include "dawn/native/Adapter.h" +#include "dawn/native/ChainUtils_autogen.h" +#include "dawn/native/Device.h" +#include "dawn/native/EnumMaskIterator.h" +#include "dawn/native/ObjectType_autogen.h" +#include "dawn/native/PassResourceUsage.h" +#include "dawn/native/ValidationUtils_autogen.h" namespace dawn::native { namespace { diff --git a/src/dawn_native/Texture.h b/src/dawn/native/Texture.h similarity index 97% rename from src/dawn_native/Texture.h rename to src/dawn/native/Texture.h index ef04ffb691..54ed018a58 100644 --- a/src/dawn_native/Texture.h +++ b/src/dawn/native/Texture.h @@ -17,12 +17,12 @@ #include "dawn/common/ityp_array.h" #include "dawn/common/ityp_bitset.h" -#include "dawn_native/Error.h" -#include "dawn_native/Forward.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/Subresource.h" +#include "dawn/native/Error.h" +#include "dawn/native/Forward.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/Subresource.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/TintUtils.cpp b/src/dawn/native/TintUtils.cpp similarity index 94% rename from src/dawn_native/TintUtils.cpp rename to src/dawn/native/TintUtils.cpp index aae7de6276..d84c982af2 100644 --- a/src/dawn_native/TintUtils.cpp +++ b/src/dawn/native/TintUtils.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/TintUtils.h" -#include "dawn_native/Device.h" +#include "dawn/native/TintUtils.h" +#include "dawn/native/Device.h" #include @@ -52,4 +52,4 @@ namespace dawn::native { tlDevice = nullptr; } -} // namespace dawn::native \ No newline at end of file +} // namespace dawn::native diff --git a/src/dawn_native/TintUtils.h b/src/dawn/native/TintUtils.h similarity index 100% rename from src/dawn_native/TintUtils.h rename to src/dawn/native/TintUtils.h diff --git a/src/dawn_native/ToBackend.h b/src/dawn/native/ToBackend.h similarity index 99% rename from src/dawn_native/ToBackend.h rename to src/dawn/native/ToBackend.h index 9e3db19c6d..a2a69cb8cc 100644 --- a/src/dawn_native/ToBackend.h +++ b/src/dawn/native/ToBackend.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_TOBACKEND_H_ #define DAWNNATIVE_TOBACKEND_H_ -#include "dawn_native/Forward.h" +#include "dawn/native/Forward.h" namespace dawn::native { diff --git a/src/dawn_native/Toggles.cpp b/src/dawn/native/Toggles.cpp similarity index 99% rename from src/dawn_native/Toggles.cpp rename to src/dawn/native/Toggles.cpp index fd9782a88f..e65bdf17b0 100644 --- a/src/dawn_native/Toggles.cpp +++ b/src/dawn/native/Toggles.cpp @@ -16,7 +16,7 @@ #include "dawn/common/Assert.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/Toggles.h" +#include "dawn/native/Toggles.h" namespace dawn::native { namespace { diff --git a/src/dawn_native/Toggles.h b/src/dawn/native/Toggles.h similarity index 98% rename from src/dawn_native/Toggles.h rename to src/dawn/native/Toggles.h index 5b7e97c907..4a4574dd43 100644 --- a/src/dawn_native/Toggles.h +++ b/src/dawn/native/Toggles.h @@ -19,7 +19,7 @@ #include #include -#include "dawn_native/DawnNative.h" +#include "dawn/native/DawnNative.h" namespace dawn::native { diff --git a/src/dawn_native/VertexFormat.cpp b/src/dawn/native/VertexFormat.cpp similarity index 98% rename from src/dawn_native/VertexFormat.cpp rename to src/dawn/native/VertexFormat.cpp index a9d552fa41..2f2ae7f23d 100644 --- a/src/dawn_native/VertexFormat.cpp +++ b/src/dawn/native/VertexFormat.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/VertexFormat.h" +#include "dawn/native/VertexFormat.h" #include "dawn/common/Assert.h" diff --git a/src/dawn_native/VertexFormat.h b/src/dawn/native/VertexFormat.h similarity index 96% rename from src/dawn_native/VertexFormat.h rename to src/dawn/native/VertexFormat.h index e5c9c62f9b..f88ae28909 100644 --- a/src/dawn_native/VertexFormat.h +++ b/src/dawn/native/VertexFormat.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_VERTEXFORMAT_H_ #define DAWNNATIVE_VERTEXFORMAT_H_ -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native { diff --git a/src/dawn_native/XlibXcbFunctions.cpp b/src/dawn/native/XlibXcbFunctions.cpp similarity index 95% rename from src/dawn_native/XlibXcbFunctions.cpp rename to src/dawn/native/XlibXcbFunctions.cpp index aa5ccbf583..1b0f6e88cb 100644 --- a/src/dawn_native/XlibXcbFunctions.cpp +++ b/src/dawn/native/XlibXcbFunctions.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/XlibXcbFunctions.h" +#include "dawn/native/XlibXcbFunctions.h" namespace dawn::native { diff --git a/src/dawn_native/XlibXcbFunctions.h b/src/dawn/native/XlibXcbFunctions.h similarity index 97% rename from src/dawn_native/XlibXcbFunctions.h rename to src/dawn/native/XlibXcbFunctions.h index 9bb42a529f..52998a4d9a 100644 --- a/src/dawn_native/XlibXcbFunctions.h +++ b/src/dawn/native/XlibXcbFunctions.h @@ -16,7 +16,7 @@ #define DAWNNATIVE_XLIBXCBFUNCTIONS_H_ #include "dawn/common/DynamicLib.h" -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" #include "dawn/common/xlib_with_undefs.h" diff --git a/src/dawn_native/d3d12/AdapterD3D12.cpp b/src/dawn/native/d3d12/AdapterD3D12.cpp similarity index 98% rename from src/dawn_native/d3d12/AdapterD3D12.cpp rename to src/dawn/native/d3d12/AdapterD3D12.cpp index 1626a9b130..d31b9afef6 100644 --- a/src/dawn_native/d3d12/AdapterD3D12.cpp +++ b/src/dawn/native/d3d12/AdapterD3D12.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/AdapterD3D12.h" +#include "dawn/native/d3d12/AdapterD3D12.h" #include "dawn/common/Constants.h" #include "dawn/common/WindowsUtils.h" -#include "dawn_native/Instance.h" -#include "dawn_native/d3d12/BackendD3D12.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/PlatformFunctions.h" +#include "dawn/native/Instance.h" +#include "dawn/native/d3d12/BackendD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/PlatformFunctions.h" #include diff --git a/src/dawn_native/d3d12/AdapterD3D12.h b/src/dawn/native/d3d12/AdapterD3D12.h similarity index 94% rename from src/dawn_native/d3d12/AdapterD3D12.h rename to src/dawn/native/d3d12/AdapterD3D12.h index 64bf5a38c6..3247a133c9 100644 --- a/src/dawn_native/d3d12/AdapterD3D12.h +++ b/src/dawn/native/d3d12/AdapterD3D12.h @@ -15,11 +15,11 @@ #ifndef DAWNNATIVE_D3D12_ADAPTERD3D12_H_ #define DAWNNATIVE_D3D12_ADAPTERD3D12_H_ -#include "dawn_native/Adapter.h" +#include "dawn/native/Adapter.h" #include "dawn/common/GPUInfo.h" -#include "dawn_native/d3d12/D3D12Info.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/D3D12Info.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/BackendD3D12.cpp b/src/dawn/native/d3d12/BackendD3D12.cpp similarity index 96% rename from src/dawn_native/d3d12/BackendD3D12.cpp rename to src/dawn/native/d3d12/BackendD3D12.cpp index cb29d69b73..27a98823b9 100644 --- a/src/dawn_native/d3d12/BackendD3D12.cpp +++ b/src/dawn/native/d3d12/BackendD3D12.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/BackendD3D12.h" +#include "dawn/native/d3d12/BackendD3D12.h" -#include "dawn_native/D3D12Backend.h" -#include "dawn_native/Instance.h" -#include "dawn_native/d3d12/AdapterD3D12.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/PlatformFunctions.h" +#include "dawn/native/D3D12Backend.h" +#include "dawn/native/Instance.h" +#include "dawn/native/d3d12/AdapterD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/PlatformFunctions.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/BackendD3D12.h b/src/dawn/native/d3d12/BackendD3D12.h similarity index 95% rename from src/dawn_native/d3d12/BackendD3D12.h rename to src/dawn/native/d3d12/BackendD3D12.h index ef339bfb1d..01ae6bca7f 100644 --- a/src/dawn_native/d3d12/BackendD3D12.h +++ b/src/dawn/native/d3d12/BackendD3D12.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_D3D12_BACKENDD3D12_H_ #define DAWNNATIVE_D3D12_BACKENDD3D12_H_ -#include "dawn_native/BackendConnection.h" +#include "dawn/native/BackendConnection.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/BindGroupD3D12.cpp b/src/dawn/native/d3d12/BindGroupD3D12.cpp similarity index 97% rename from src/dawn_native/d3d12/BindGroupD3D12.cpp rename to src/dawn/native/d3d12/BindGroupD3D12.cpp index 2ebbc70bbf..fd604a3fdd 100644 --- a/src/dawn_native/d3d12/BindGroupD3D12.cpp +++ b/src/dawn/native/d3d12/BindGroupD3D12.cpp @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/BindGroupD3D12.h" +#include "dawn/native/d3d12/BindGroupD3D12.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/ExternalTexture.h" -#include "dawn_native/d3d12/BindGroupLayoutD3D12.h" -#include "dawn_native/d3d12/BufferD3D12.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/SamplerHeapCacheD3D12.h" -#include "dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" -#include "dawn_native/d3d12/TextureD3D12.h" +#include "dawn/native/ExternalTexture.h" +#include "dawn/native/d3d12/BindGroupLayoutD3D12.h" +#include "dawn/native/d3d12/BufferD3D12.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/SamplerHeapCacheD3D12.h" +#include "dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" +#include "dawn/native/d3d12/TextureD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/BindGroupD3D12.h b/src/dawn/native/d3d12/BindGroupD3D12.h similarity index 93% rename from src/dawn_native/d3d12/BindGroupD3D12.h rename to src/dawn/native/d3d12/BindGroupD3D12.h index c57cca039a..7fcf782cf6 100644 --- a/src/dawn_native/d3d12/BindGroupD3D12.h +++ b/src/dawn/native/d3d12/BindGroupD3D12.h @@ -18,9 +18,9 @@ #include "dawn/common/PlacementAllocated.h" #include "dawn/common/ityp_span.h" #include "dawn/common/ityp_stack_vec.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.h" -#include "dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/d3d12/CPUDescriptorHeapAllocationD3D12.h" +#include "dawn/native/d3d12/GPUDescriptorHeapAllocationD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/BindGroupLayoutD3D12.cpp b/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp similarity index 96% rename from src/dawn_native/d3d12/BindGroupLayoutD3D12.cpp rename to src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp index f275674328..80d4ea4e71 100644 --- a/src/dawn_native/d3d12/BindGroupLayoutD3D12.cpp +++ b/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/BindGroupLayoutD3D12.h" +#include "dawn/native/d3d12/BindGroupLayoutD3D12.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/d3d12/BindGroupD3D12.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/SamplerHeapCacheD3D12.h" -#include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h" +#include "dawn/native/d3d12/BindGroupD3D12.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/SamplerHeapCacheD3D12.h" +#include "dawn/native/d3d12/StagingDescriptorAllocatorD3D12.h" namespace dawn::native::d3d12 { namespace { diff --git a/src/dawn_native/d3d12/BindGroupLayoutD3D12.h b/src/dawn/native/d3d12/BindGroupLayoutD3D12.h similarity index 97% rename from src/dawn_native/d3d12/BindGroupLayoutD3D12.h rename to src/dawn/native/d3d12/BindGroupLayoutD3D12.h index 5c4d927d4b..f16b16b915 100644 --- a/src/dawn_native/d3d12/BindGroupLayoutD3D12.h +++ b/src/dawn/native/d3d12/BindGroupLayoutD3D12.h @@ -15,11 +15,11 @@ #ifndef DAWNNATIVE_D3D12_BINDGROUPLAYOUTD3D12_H_ #define DAWNNATIVE_D3D12_BINDGROUPLAYOUTD3D12_H_ -#include "dawn_native/BindGroupLayout.h" +#include "dawn/native/BindGroupLayout.h" #include "dawn/common/SlabAllocator.h" #include "dawn/common/ityp_stack_vec.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/BufferD3D12.cpp b/src/dawn/native/d3d12/BufferD3D12.cpp similarity index 98% rename from src/dawn_native/d3d12/BufferD3D12.cpp rename to src/dawn/native/d3d12/BufferD3D12.cpp index 1a9fd02641..27d999170b 100644 --- a/src/dawn_native/d3d12/BufferD3D12.cpp +++ b/src/dawn/native/d3d12/BufferD3D12.cpp @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/BufferD3D12.h" +#include "dawn/native/d3d12/BufferD3D12.h" #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/d3d12/CommandRecordingContext.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/HeapD3D12.h" -#include "dawn_native/d3d12/ResidencyManagerD3D12.h" -#include "dawn_native/d3d12/UtilsD3D12.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/d3d12/CommandRecordingContext.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/HeapD3D12.h" +#include "dawn/native/d3d12/ResidencyManagerD3D12.h" +#include "dawn/native/d3d12/UtilsD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/BufferD3D12.h b/src/dawn/native/d3d12/BufferD3D12.h similarity index 96% rename from src/dawn_native/d3d12/BufferD3D12.h rename to src/dawn/native/d3d12/BufferD3D12.h index be99642fb2..253565a387 100644 --- a/src/dawn_native/d3d12/BufferD3D12.h +++ b/src/dawn/native/d3d12/BufferD3D12.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_D3D12_BUFFERD3D12_H_ #define DAWNNATIVE_D3D12_BUFFERD3D12_H_ -#include "dawn_native/Buffer.h" +#include "dawn/native/Buffer.h" -#include "dawn_native/d3d12/ResourceHeapAllocationD3D12.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/ResourceHeapAllocationD3D12.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.cpp b/src/dawn/native/d3d12/CPUDescriptorHeapAllocationD3D12.cpp similarity index 94% rename from src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.cpp rename to src/dawn/native/d3d12/CPUDescriptorHeapAllocationD3D12.cpp index 5df287ed5f..617c1966d1 100644 --- a/src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.cpp +++ b/src/dawn/native/d3d12/CPUDescriptorHeapAllocationD3D12.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.h" -#include "dawn_native/Error.h" +#include "dawn/native/d3d12/CPUDescriptorHeapAllocationD3D12.h" +#include "dawn/native/Error.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.h b/src/dawn/native/d3d12/CPUDescriptorHeapAllocationD3D12.h similarity index 97% rename from src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.h rename to src/dawn/native/d3d12/CPUDescriptorHeapAllocationD3D12.h index 57be2a1f66..997d056384 100644 --- a/src/dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.h +++ b/src/dawn/native/d3d12/CPUDescriptorHeapAllocationD3D12.h @@ -17,7 +17,7 @@ #include -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/CommandAllocatorManager.cpp b/src/dawn/native/d3d12/CommandAllocatorManager.cpp similarity index 95% rename from src/dawn_native/d3d12/CommandAllocatorManager.cpp rename to src/dawn/native/d3d12/CommandAllocatorManager.cpp index 1b5948a08c..88ac0b8aa5 100644 --- a/src/dawn_native/d3d12/CommandAllocatorManager.cpp +++ b/src/dawn/native/d3d12/CommandAllocatorManager.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/CommandAllocatorManager.h" +#include "dawn/native/d3d12/CommandAllocatorManager.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" #include "dawn/common/Assert.h" #include "dawn/common/BitSetIterator.h" diff --git a/src/dawn_native/d3d12/CommandAllocatorManager.h b/src/dawn/native/d3d12/CommandAllocatorManager.h similarity index 94% rename from src/dawn_native/d3d12/CommandAllocatorManager.h rename to src/dawn/native/d3d12/CommandAllocatorManager.h index 869560cd34..1f8cc1e4f8 100644 --- a/src/dawn_native/d3d12/CommandAllocatorManager.h +++ b/src/dawn/native/d3d12/CommandAllocatorManager.h @@ -15,11 +15,11 @@ #ifndef DAWNNATIVE_D3D12_COMMANDALLOCATORMANAGER_H_ #define DAWNNATIVE_D3D12_COMMANDALLOCATORMANAGER_H_ -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/d3d12_platform.h" #include "dawn/common/SerialQueue.h" -#include "dawn_native/Error.h" -#include "dawn_native/IntegerTypes.h" +#include "dawn/native/Error.h" +#include "dawn/native/IntegerTypes.h" #include diff --git a/src/dawn_native/d3d12/CommandBufferD3D12.cpp b/src/dawn/native/d3d12/CommandBufferD3D12.cpp similarity index 98% rename from src/dawn_native/d3d12/CommandBufferD3D12.cpp rename to src/dawn/native/d3d12/CommandBufferD3D12.cpp index b1fc308346..0c88d0b239 100644 --- a/src/dawn_native/d3d12/CommandBufferD3D12.cpp +++ b/src/dawn/native/d3d12/CommandBufferD3D12.cpp @@ -12,26 +12,26 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/CommandBufferD3D12.h" +#include "dawn/native/d3d12/CommandBufferD3D12.h" -#include "dawn_native/BindGroupTracker.h" -#include "dawn_native/CommandValidation.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/Error.h" -#include "dawn_native/RenderBundle.h" -#include "dawn_native/d3d12/BindGroupD3D12.h" -#include "dawn_native/d3d12/BindGroupLayoutD3D12.h" -#include "dawn_native/d3d12/ComputePipelineD3D12.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/PipelineLayoutD3D12.h" -#include "dawn_native/d3d12/PlatformFunctions.h" -#include "dawn_native/d3d12/QuerySetD3D12.h" -#include "dawn_native/d3d12/RenderPassBuilderD3D12.h" -#include "dawn_native/d3d12/RenderPipelineD3D12.h" -#include "dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" -#include "dawn_native/d3d12/StagingBufferD3D12.h" -#include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h" -#include "dawn_native/d3d12/UtilsD3D12.h" +#include "dawn/native/BindGroupTracker.h" +#include "dawn/native/CommandValidation.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/Error.h" +#include "dawn/native/RenderBundle.h" +#include "dawn/native/d3d12/BindGroupD3D12.h" +#include "dawn/native/d3d12/BindGroupLayoutD3D12.h" +#include "dawn/native/d3d12/ComputePipelineD3D12.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/PipelineLayoutD3D12.h" +#include "dawn/native/d3d12/PlatformFunctions.h" +#include "dawn/native/d3d12/QuerySetD3D12.h" +#include "dawn/native/d3d12/RenderPassBuilderD3D12.h" +#include "dawn/native/d3d12/RenderPipelineD3D12.h" +#include "dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" +#include "dawn/native/d3d12/StagingBufferD3D12.h" +#include "dawn/native/d3d12/StagingDescriptorAllocatorD3D12.h" +#include "dawn/native/d3d12/UtilsD3D12.h" namespace dawn::native::d3d12 { @@ -578,8 +578,7 @@ namespace dawn::native::d3d12 { for (VertexBufferSlot slot : IterateBitSet(renderPipeline->GetVertexBufferSlotsUsed())) { startSlot = std::min(startSlot, slot); - endSlot = - std::max(endSlot, ityp::Add(slot, VertexBufferSlot(uint8_t(1)))); + endSlot = std::max(endSlot, ityp::Add(slot, VertexBufferSlot(uint8_t(1)))); mD3D12BufferViews[slot].StrideInBytes = renderPipeline->GetVertexBuffer(slot).arrayStride; } diff --git a/src/dawn_native/d3d12/CommandBufferD3D12.h b/src/dawn/native/d3d12/CommandBufferD3D12.h similarity index 97% rename from src/dawn_native/d3d12/CommandBufferD3D12.h rename to src/dawn/native/d3d12/CommandBufferD3D12.h index df654335d0..d6d44385b1 100644 --- a/src/dawn_native/d3d12/CommandBufferD3D12.h +++ b/src/dawn/native/d3d12/CommandBufferD3D12.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_D3D12_COMMANDBUFFERD3D12_H_ #define DAWNNATIVE_D3D12_COMMANDBUFFERD3D12_H_ -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/Error.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/Error.h" namespace dawn::native { struct BeginRenderPassCmd; diff --git a/src/dawn_native/d3d12/CommandRecordingContext.cpp b/src/dawn/native/d3d12/CommandRecordingContext.cpp similarity index 96% rename from src/dawn_native/d3d12/CommandRecordingContext.cpp rename to src/dawn/native/d3d12/CommandRecordingContext.cpp index f23e8d7154..bb8ef81300 100644 --- a/src/dawn_native/d3d12/CommandRecordingContext.cpp +++ b/src/dawn/native/d3d12/CommandRecordingContext.cpp @@ -11,15 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/CommandRecordingContext.h" +#include "dawn/native/d3d12/CommandRecordingContext.h" +#include "dawn/native/d3d12/CommandAllocatorManager.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/HeapD3D12.h" +#include "dawn/native/d3d12/ResidencyManagerD3D12.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/d3d12/CommandAllocatorManager.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/HeapD3D12.h" -#include "dawn_native/d3d12/ResidencyManagerD3D12.h" #include #include diff --git a/src/dawn_native/d3d12/CommandRecordingContext.h b/src/dawn/native/d3d12/CommandRecordingContext.h similarity index 92% rename from src/dawn_native/d3d12/CommandRecordingContext.h rename to src/dawn/native/d3d12/CommandRecordingContext.h index db4d6e79c7..21a60f23ed 100644 --- a/src/dawn_native/d3d12/CommandRecordingContext.h +++ b/src/dawn/native/d3d12/CommandRecordingContext.h @@ -14,10 +14,10 @@ #ifndef DAWNNATIVE_D3D12_COMMANDRECORDINGCONTEXT_H_ #define DAWNNATIVE_D3D12_COMMANDRECORDINGCONTEXT_H_ -#include "dawn_native/Error.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/d3d12/BufferD3D12.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/Error.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/d3d12/BufferD3D12.h" +#include "dawn/native/d3d12/d3d12_platform.h" #include diff --git a/src/dawn_native/d3d12/ComputePipelineD3D12.cpp b/src/dawn/native/d3d12/ComputePipelineD3D12.cpp similarity index 91% rename from src/dawn_native/d3d12/ComputePipelineD3D12.cpp rename to src/dawn/native/d3d12/ComputePipelineD3D12.cpp index 933f62da76..6df1049ffb 100644 --- a/src/dawn_native/d3d12/ComputePipelineD3D12.cpp +++ b/src/dawn/native/d3d12/ComputePipelineD3D12.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/ComputePipelineD3D12.h" +#include "dawn/native/d3d12/ComputePipelineD3D12.h" -#include "dawn_native/CreatePipelineAsyncTask.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/PipelineLayoutD3D12.h" -#include "dawn_native/d3d12/PlatformFunctions.h" -#include "dawn_native/d3d12/ShaderModuleD3D12.h" -#include "dawn_native/d3d12/UtilsD3D12.h" +#include "dawn/native/CreatePipelineAsyncTask.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/PipelineLayoutD3D12.h" +#include "dawn/native/d3d12/PlatformFunctions.h" +#include "dawn/native/d3d12/ShaderModuleD3D12.h" +#include "dawn/native/d3d12/UtilsD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/ComputePipelineD3D12.h b/src/dawn/native/d3d12/ComputePipelineD3D12.h similarity index 95% rename from src/dawn_native/d3d12/ComputePipelineD3D12.h rename to src/dawn/native/d3d12/ComputePipelineD3D12.h index 9fb2d606cb..03a0259522 100644 --- a/src/dawn_native/d3d12/ComputePipelineD3D12.h +++ b/src/dawn/native/d3d12/ComputePipelineD3D12.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_D3D12_COMPUTEPIPELINED3D12_H_ #define DAWNNATIVE_D3D12_COMPUTEPIPELINED3D12_H_ -#include "dawn_native/ComputePipeline.h" +#include "dawn/native/ComputePipeline.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/D3D11on12Util.cpp b/src/dawn/native/d3d12/D3D11on12Util.cpp similarity index 97% rename from src/dawn_native/d3d12/D3D11on12Util.cpp rename to src/dawn/native/d3d12/D3D11on12Util.cpp index f91ad849d7..d48d41fe7a 100644 --- a/src/dawn_native/d3d12/D3D11on12Util.cpp +++ b/src/dawn/native/d3d12/D3D11on12Util.cpp @@ -15,14 +15,14 @@ // D3D12Backend.cpp: contains the definition of symbols exported by D3D12Backend.h so that they // can be compiled twice: once export (shared library), once not exported (static library) -#include "dawn_native/d3d12/D3D11on12Util.h" +#include "dawn/native/d3d12/D3D11on12Util.h" #include "dawn/common/HashUtils.h" #include "dawn/common/Log.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" -#include +#include namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/D3D11on12Util.h b/src/dawn/native/d3d12/D3D11on12Util.h similarity index 96% rename from src/dawn_native/d3d12/D3D11on12Util.h rename to src/dawn/native/d3d12/D3D11on12Util.h index 2580949cc5..af7e680be6 100644 --- a/src/dawn_native/d3d12/D3D11on12Util.h +++ b/src/dawn/native/d3d12/D3D11on12Util.h @@ -16,10 +16,10 @@ #define DAWNNATIVE_D3D11ON12UTIL_H_ #include "dawn/common/RefCounted.h" -#include "dawn_native/Error.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/Error.h" +#include "dawn/native/d3d12/d3d12_platform.h" -#include +#include #include #include diff --git a/src/dawn_native/d3d12/D3D12Backend.cpp b/src/dawn/native/d3d12/D3D12Backend.cpp similarity index 96% rename from src/dawn_native/d3d12/D3D12Backend.cpp rename to src/dawn/native/d3d12/D3D12Backend.cpp index ee588b8b29..18d7145c83 100644 --- a/src/dawn_native/d3d12/D3D12Backend.cpp +++ b/src/dawn/native/d3d12/D3D12Backend.cpp @@ -15,16 +15,16 @@ // D3D12Backend.cpp: contains the definition of symbols exported by D3D12Backend.h so that they // can be compiled twice: once export (shared library), once not exported (static library) -#include "dawn_native/D3D12Backend.h" +#include "dawn/native/D3D12Backend.h" #include "dawn/common/Log.h" #include "dawn/common/Math.h" #include "dawn/common/SwapChainUtils.h" -#include "dawn_native/d3d12/D3D11on12Util.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/NativeSwapChainImplD3D12.h" -#include "dawn_native/d3d12/ResidencyManagerD3D12.h" -#include "dawn_native/d3d12/TextureD3D12.h" +#include "dawn/native/d3d12/D3D11on12Util.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/NativeSwapChainImplD3D12.h" +#include "dawn/native/d3d12/ResidencyManagerD3D12.h" +#include "dawn/native/d3d12/TextureD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/D3D12Error.cpp b/src/dawn/native/d3d12/D3D12Error.cpp similarity index 97% rename from src/dawn_native/d3d12/D3D12Error.cpp rename to src/dawn/native/d3d12/D3D12Error.cpp index 9b2522bc27..23a95568d4 100644 --- a/src/dawn_native/d3d12/D3D12Error.cpp +++ b/src/dawn/native/d3d12/D3D12Error.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/D3D12Error.h" #include #include diff --git a/src/dawn_native/d3d12/D3D12Error.h b/src/dawn/native/d3d12/D3D12Error.h similarity index 96% rename from src/dawn_native/d3d12/D3D12Error.h rename to src/dawn/native/d3d12/D3D12Error.h index 931c59b205..f70690ad91 100644 --- a/src/dawn_native/d3d12/D3D12Error.h +++ b/src/dawn/native/d3d12/D3D12Error.h @@ -16,8 +16,8 @@ #define DAWNNATIVE_D3D12_D3D12ERROR_H_ #include -#include "dawn_native/Error.h" -#include "dawn_native/ErrorInjector.h" +#include "dawn/native/Error.h" +#include "dawn/native/ErrorInjector.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/D3D12Info.cpp b/src/dawn/native/d3d12/D3D12Info.cpp similarity index 96% rename from src/dawn_native/d3d12/D3D12Info.cpp rename to src/dawn/native/d3d12/D3D12Info.cpp index e900cc91ce..ebd629b206 100644 --- a/src/dawn_native/d3d12/D3D12Info.cpp +++ b/src/dawn/native/d3d12/D3D12Info.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/D3D12Info.h" +#include "dawn/native/d3d12/D3D12Info.h" #include "dawn/common/GPUInfo.h" -#include "dawn_native/d3d12/AdapterD3D12.h" -#include "dawn_native/d3d12/BackendD3D12.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/PlatformFunctions.h" +#include "dawn/native/d3d12/AdapterD3D12.h" +#include "dawn/native/d3d12/BackendD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/PlatformFunctions.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/D3D12Info.h b/src/dawn/native/d3d12/D3D12Info.h similarity index 92% rename from src/dawn_native/d3d12/D3D12Info.h rename to src/dawn/native/d3d12/D3D12Info.h index b5ef7fc2de..83ee83764b 100644 --- a/src/dawn_native/d3d12/D3D12Info.h +++ b/src/dawn/native/d3d12/D3D12Info.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_D3D12_D3D12INFO_H_ #define DAWNNATIVE_D3D12_D3D12INFO_H_ -#include "dawn_native/Error.h" -#include "dawn_native/PerStage.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/Error.h" +#include "dawn/native/PerStage.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/DeviceD3D12.cpp b/src/dawn/native/d3d12/DeviceD3D12.cpp similarity index 95% rename from src/dawn_native/d3d12/DeviceD3D12.cpp rename to src/dawn/native/d3d12/DeviceD3D12.cpp index 7901d4ec6d..918c7c0845 100644 --- a/src/dawn_native/d3d12/DeviceD3D12.cpp +++ b/src/dawn/native/d3d12/DeviceD3D12.cpp @@ -12,35 +12,35 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/DeviceD3D12.h" #include "dawn/common/GPUInfo.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/Instance.h" -#include "dawn_native/d3d12/AdapterD3D12.h" -#include "dawn_native/d3d12/BackendD3D12.h" -#include "dawn_native/d3d12/BindGroupD3D12.h" -#include "dawn_native/d3d12/BindGroupLayoutD3D12.h" -#include "dawn_native/d3d12/CommandAllocatorManager.h" -#include "dawn_native/d3d12/CommandBufferD3D12.h" -#include "dawn_native/d3d12/ComputePipelineD3D12.h" -#include "dawn_native/d3d12/D3D11on12Util.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/PipelineLayoutD3D12.h" -#include "dawn_native/d3d12/PlatformFunctions.h" -#include "dawn_native/d3d12/QuerySetD3D12.h" -#include "dawn_native/d3d12/QueueD3D12.h" -#include "dawn_native/d3d12/RenderPipelineD3D12.h" -#include "dawn_native/d3d12/ResidencyManagerD3D12.h" -#include "dawn_native/d3d12/ResourceAllocatorManagerD3D12.h" -#include "dawn_native/d3d12/SamplerD3D12.h" -#include "dawn_native/d3d12/SamplerHeapCacheD3D12.h" -#include "dawn_native/d3d12/ShaderModuleD3D12.h" -#include "dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" -#include "dawn_native/d3d12/StagingBufferD3D12.h" -#include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h" -#include "dawn_native/d3d12/SwapChainD3D12.h" -#include "dawn_native/d3d12/UtilsD3D12.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/Instance.h" +#include "dawn/native/d3d12/AdapterD3D12.h" +#include "dawn/native/d3d12/BackendD3D12.h" +#include "dawn/native/d3d12/BindGroupD3D12.h" +#include "dawn/native/d3d12/BindGroupLayoutD3D12.h" +#include "dawn/native/d3d12/CommandAllocatorManager.h" +#include "dawn/native/d3d12/CommandBufferD3D12.h" +#include "dawn/native/d3d12/ComputePipelineD3D12.h" +#include "dawn/native/d3d12/D3D11on12Util.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/PipelineLayoutD3D12.h" +#include "dawn/native/d3d12/PlatformFunctions.h" +#include "dawn/native/d3d12/QuerySetD3D12.h" +#include "dawn/native/d3d12/QueueD3D12.h" +#include "dawn/native/d3d12/RenderPipelineD3D12.h" +#include "dawn/native/d3d12/ResidencyManagerD3D12.h" +#include "dawn/native/d3d12/ResourceAllocatorManagerD3D12.h" +#include "dawn/native/d3d12/SamplerD3D12.h" +#include "dawn/native/d3d12/SamplerHeapCacheD3D12.h" +#include "dawn/native/d3d12/ShaderModuleD3D12.h" +#include "dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" +#include "dawn/native/d3d12/StagingBufferD3D12.h" +#include "dawn/native/d3d12/StagingDescriptorAllocatorD3D12.h" +#include "dawn/native/d3d12/SwapChainD3D12.h" +#include "dawn/native/d3d12/UtilsD3D12.h" #include diff --git a/src/dawn_native/d3d12/DeviceD3D12.h b/src/dawn/native/d3d12/DeviceD3D12.h similarity index 98% rename from src/dawn_native/d3d12/DeviceD3D12.h rename to src/dawn/native/d3d12/DeviceD3D12.h index fd7cbb88e5..1a837929a3 100644 --- a/src/dawn_native/d3d12/DeviceD3D12.h +++ b/src/dawn/native/d3d12/DeviceD3D12.h @@ -16,11 +16,11 @@ #define DAWNNATIVE_D3D12_DEVICED3D12_H_ #include "dawn/common/SerialQueue.h" -#include "dawn_native/Device.h" -#include "dawn_native/d3d12/CommandRecordingContext.h" -#include "dawn_native/d3d12/D3D12Info.h" -#include "dawn_native/d3d12/Forward.h" -#include "dawn_native/d3d12/TextureD3D12.h" +#include "dawn/native/Device.h" +#include "dawn/native/d3d12/CommandRecordingContext.h" +#include "dawn/native/d3d12/D3D12Info.h" +#include "dawn/native/d3d12/Forward.h" +#include "dawn/native/d3d12/TextureD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/Forward.h b/src/dawn/native/d3d12/Forward.h similarity index 98% rename from src/dawn_native/d3d12/Forward.h rename to src/dawn/native/d3d12/Forward.h index 15d1739d2c..a7aedb786e 100644 --- a/src/dawn_native/d3d12/Forward.h +++ b/src/dawn/native/d3d12/Forward.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_D3D12_FORWARD_H_ #define DAWNNATIVE_D3D12_FORWARD_H_ -#include "dawn_native/ToBackend.h" +#include "dawn/native/ToBackend.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.cpp b/src/dawn/native/d3d12/GPUDescriptorHeapAllocationD3D12.cpp similarity index 95% rename from src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.cpp rename to src/dawn/native/d3d12/GPUDescriptorHeapAllocationD3D12.cpp index 3ee011d5fa..e5d4fb931a 100644 --- a/src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.cpp +++ b/src/dawn/native/d3d12/GPUDescriptorHeapAllocationD3D12.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h" +#include "dawn/native/d3d12/GPUDescriptorHeapAllocationD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h b/src/dawn/native/d3d12/GPUDescriptorHeapAllocationD3D12.h similarity index 92% rename from src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h rename to src/dawn/native/d3d12/GPUDescriptorHeapAllocationD3D12.h index 34cc8052e8..7f7ce1ecb6 100644 --- a/src/dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h +++ b/src/dawn/native/d3d12/GPUDescriptorHeapAllocationD3D12.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_D3D12_GPUDESCRIPTORHEAPALLOCATION_H_ #define DAWNNATIVE_D3D12_GPUDESCRIPTORHEAPALLOCATION_H_ -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/d3d12/IntegerTypes.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/d3d12/IntegerTypes.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/HeapAllocatorD3D12.cpp b/src/dawn/native/d3d12/HeapAllocatorD3D12.cpp similarity index 93% rename from src/dawn_native/d3d12/HeapAllocatorD3D12.cpp rename to src/dawn/native/d3d12/HeapAllocatorD3D12.cpp index 27ba04424b..5a26be305d 100644 --- a/src/dawn_native/d3d12/HeapAllocatorD3D12.cpp +++ b/src/dawn/native/d3d12/HeapAllocatorD3D12.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/HeapAllocatorD3D12.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/HeapD3D12.h" -#include "dawn_native/d3d12/ResidencyManagerD3D12.h" +#include "dawn/native/d3d12/HeapAllocatorD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/HeapD3D12.h" +#include "dawn/native/d3d12/ResidencyManagerD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/HeapAllocatorD3D12.h b/src/dawn/native/d3d12/HeapAllocatorD3D12.h similarity index 92% rename from src/dawn_native/d3d12/HeapAllocatorD3D12.h rename to src/dawn/native/d3d12/HeapAllocatorD3D12.h index fbb083ba59..055f739340 100644 --- a/src/dawn_native/d3d12/HeapAllocatorD3D12.h +++ b/src/dawn/native/d3d12/HeapAllocatorD3D12.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_D3D12_HEAPALLOCATORD3D12_H_ #define DAWNNATIVE_D3D12_HEAPALLOCATORD3D12_H_ -#include "dawn_native/D3D12Backend.h" -#include "dawn_native/ResourceHeapAllocator.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/D3D12Backend.h" +#include "dawn/native/ResourceHeapAllocator.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/HeapD3D12.cpp b/src/dawn/native/d3d12/HeapD3D12.cpp similarity index 96% rename from src/dawn_native/d3d12/HeapD3D12.cpp rename to src/dawn/native/d3d12/HeapD3D12.cpp index 6e08cd30d3..7426757dfd 100644 --- a/src/dawn_native/d3d12/HeapD3D12.cpp +++ b/src/dawn/native/d3d12/HeapD3D12.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/HeapD3D12.h" +#include "dawn/native/d3d12/HeapD3D12.h" namespace dawn::native::d3d12 { Heap::Heap(ComPtr d3d12Pageable, MemorySegment memorySegment, uint64_t size) diff --git a/src/dawn_native/d3d12/HeapD3D12.h b/src/dawn/native/d3d12/HeapD3D12.h similarity index 91% rename from src/dawn_native/d3d12/HeapD3D12.h rename to src/dawn/native/d3d12/HeapD3D12.h index 0ff6fd20cd..c16036659a 100644 --- a/src/dawn_native/d3d12/HeapD3D12.h +++ b/src/dawn/native/d3d12/HeapD3D12.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_D3D12_HEAPD3D12_H_ #define DAWNNATIVE_D3D12_HEAPD3D12_H_ -#include "dawn_native/ResourceHeap.h" -#include "dawn_native/d3d12/PageableD3D12.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/ResourceHeap.h" +#include "dawn/native/d3d12/PageableD3D12.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/IntegerTypes.h b/src/dawn/native/d3d12/IntegerTypes.h similarity index 100% rename from src/dawn_native/d3d12/IntegerTypes.h rename to src/dawn/native/d3d12/IntegerTypes.h diff --git a/src/dawn_native/d3d12/NativeSwapChainImplD3D12.cpp b/src/dawn/native/d3d12/NativeSwapChainImplD3D12.cpp similarity index 97% rename from src/dawn_native/d3d12/NativeSwapChainImplD3D12.cpp rename to src/dawn/native/d3d12/NativeSwapChainImplD3D12.cpp index 810e045b4e..5156af5830 100644 --- a/src/dawn_native/d3d12/NativeSwapChainImplD3D12.cpp +++ b/src/dawn/native/d3d12/NativeSwapChainImplD3D12.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/NativeSwapChainImplD3D12.h" +#include "dawn/native/d3d12/NativeSwapChainImplD3D12.h" #include "dawn/common/Assert.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/TextureD3D12.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/TextureD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/NativeSwapChainImplD3D12.h b/src/dawn/native/d3d12/NativeSwapChainImplD3D12.h similarity index 93% rename from src/dawn_native/d3d12/NativeSwapChainImplD3D12.h rename to src/dawn/native/d3d12/NativeSwapChainImplD3D12.h index 35927e5c01..8ed5ee24a5 100644 --- a/src/dawn_native/d3d12/NativeSwapChainImplD3D12.h +++ b/src/dawn/native/d3d12/NativeSwapChainImplD3D12.h @@ -15,11 +15,11 @@ #ifndef DAWNNATIVE_D3D12_NATIVESWAPCHAINIMPLD3D12_H_ #define DAWNNATIVE_D3D12_NATIVESWAPCHAINIMPLD3D12_H_ -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/d3d12_platform.h" #include "dawn/dawn_wsi.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/d3d12/PageableD3D12.cpp b/src/dawn/native/d3d12/PageableD3D12.cpp similarity index 98% rename from src/dawn_native/d3d12/PageableD3D12.cpp rename to src/dawn/native/d3d12/PageableD3D12.cpp index fe84d48798..1394209270 100644 --- a/src/dawn_native/d3d12/PageableD3D12.cpp +++ b/src/dawn/native/d3d12/PageableD3D12.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/PageableD3D12.h" +#include "dawn/native/d3d12/PageableD3D12.h" namespace dawn::native::d3d12 { Pageable::Pageable(ComPtr d3d12Pageable, diff --git a/src/dawn_native/d3d12/PageableD3D12.h b/src/dawn/native/d3d12/PageableD3D12.h similarity index 96% rename from src/dawn_native/d3d12/PageableD3D12.h rename to src/dawn/native/d3d12/PageableD3D12.h index 024bd51953..19355dc296 100644 --- a/src/dawn_native/d3d12/PageableD3D12.h +++ b/src/dawn/native/d3d12/PageableD3D12.h @@ -16,9 +16,9 @@ #define DAWNNATIVE_D3D12_PAGEABLED3D12_H_ #include "dawn/common/LinkedList.h" -#include "dawn_native/D3D12Backend.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/D3D12Backend.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { // This class is used to represent ID3D12Pageable allocations, and also serves as a node within diff --git a/src/dawn_native/d3d12/PipelineLayoutD3D12.cpp b/src/dawn/native/d3d12/PipelineLayoutD3D12.cpp similarity index 98% rename from src/dawn_native/d3d12/PipelineLayoutD3D12.cpp rename to src/dawn/native/d3d12/PipelineLayoutD3D12.cpp index 10d33ee5c5..9dd4f0e018 100644 --- a/src/dawn_native/d3d12/PipelineLayoutD3D12.cpp +++ b/src/dawn/native/d3d12/PipelineLayoutD3D12.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/PipelineLayoutD3D12.h" +#include "dawn/native/d3d12/PipelineLayoutD3D12.h" #include #include "dawn/common/Assert.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/d3d12/BindGroupLayoutD3D12.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/PlatformFunctions.h" +#include "dawn/native/d3d12/BindGroupLayoutD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/PlatformFunctions.h" using Microsoft::WRL::ComPtr; diff --git a/src/dawn_native/d3d12/PipelineLayoutD3D12.h b/src/dawn/native/d3d12/PipelineLayoutD3D12.h similarity index 97% rename from src/dawn_native/d3d12/PipelineLayoutD3D12.h rename to src/dawn/native/d3d12/PipelineLayoutD3D12.h index b357fdcf53..d1e845301a 100644 --- a/src/dawn_native/d3d12/PipelineLayoutD3D12.h +++ b/src/dawn/native/d3d12/PipelineLayoutD3D12.h @@ -17,9 +17,9 @@ #include "dawn/common/Constants.h" #include "dawn/common/ityp_array.h" -#include "dawn_native/BindingInfo.h" -#include "dawn_native/PipelineLayout.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/BindingInfo.h" +#include "dawn/native/PipelineLayout.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/PlatformFunctions.cpp b/src/dawn/native/d3d12/PlatformFunctions.cpp similarity index 99% rename from src/dawn_native/d3d12/PlatformFunctions.cpp rename to src/dawn/native/d3d12/PlatformFunctions.cpp index 614c1c37ec..786ae5a33b 100644 --- a/src/dawn_native/d3d12/PlatformFunctions.cpp +++ b/src/dawn/native/d3d12/PlatformFunctions.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/PlatformFunctions.h" +#include "dawn/native/d3d12/PlatformFunctions.h" #include "dawn/common/DynamicLib.h" diff --git a/src/dawn_native/d3d12/PlatformFunctions.h b/src/dawn/native/d3d12/PlatformFunctions.h similarity index 98% rename from src/dawn_native/d3d12/PlatformFunctions.h rename to src/dawn/native/d3d12/PlatformFunctions.h index 128e1089b9..a236b1a156 100644 --- a/src/dawn_native/d3d12/PlatformFunctions.h +++ b/src/dawn/native/d3d12/PlatformFunctions.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_D3D12_PLATFORMFUNCTIONS_H_ #define DAWNNATIVE_D3D12_PLATFORMFUNCTIONS_H_ -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/d3d12_platform.h" #include "dawn/common/DynamicLib.h" -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" #include diff --git a/src/dawn_native/d3d12/QuerySetD3D12.cpp b/src/dawn/native/d3d12/QuerySetD3D12.cpp similarity index 93% rename from src/dawn_native/d3d12/QuerySetD3D12.cpp rename to src/dawn/native/d3d12/QuerySetD3D12.cpp index 0f8cb3fadc..458c23df18 100644 --- a/src/dawn_native/d3d12/QuerySetD3D12.cpp +++ b/src/dawn/native/d3d12/QuerySetD3D12.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/QuerySetD3D12.h" +#include "dawn/native/d3d12/QuerySetD3D12.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/UtilsD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/UtilsD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/QuerySetD3D12.h b/src/dawn/native/d3d12/QuerySetD3D12.h similarity index 94% rename from src/dawn_native/d3d12/QuerySetD3D12.h rename to src/dawn/native/d3d12/QuerySetD3D12.h index e41f3051ac..5ace792384 100644 --- a/src/dawn_native/d3d12/QuerySetD3D12.h +++ b/src/dawn/native/d3d12/QuerySetD3D12.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_D3D12_QUERYSETD3D12_H_ #define DAWNNATIVE_D3D12_QUERYSETD3D12_H_ -#include "dawn_native/QuerySet.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/QuerySet.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/QueueD3D12.cpp b/src/dawn/native/d3d12/QueueD3D12.cpp similarity index 85% rename from src/dawn_native/d3d12/QueueD3D12.cpp rename to src/dawn/native/d3d12/QueueD3D12.cpp index 6fc8c7a343..cb92f2160b 100644 --- a/src/dawn_native/d3d12/QueueD3D12.cpp +++ b/src/dawn/native/d3d12/QueueD3D12.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/QueueD3D12.h" +#include "dawn/native/d3d12/QueueD3D12.h" #include "dawn/common/Math.h" +#include "dawn/native/CommandValidation.h" +#include "dawn/native/Commands.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/d3d12/CommandBufferD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/CommandValidation.h" -#include "dawn_native/Commands.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/d3d12/CommandBufferD3D12.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/QueueD3D12.h b/src/dawn/native/d3d12/QueueD3D12.h similarity index 88% rename from src/dawn_native/d3d12/QueueD3D12.h rename to src/dawn/native/d3d12/QueueD3D12.h index b085e9bb8d..6f15a7dfbd 100644 --- a/src/dawn_native/d3d12/QueueD3D12.h +++ b/src/dawn/native/d3d12/QueueD3D12.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_D3D12_QUEUED3D12_H_ #define DAWNNATIVE_D3D12_QUEUED3D12_H_ -#include "dawn_native/Queue.h" +#include "dawn/native/Queue.h" -#include "dawn_native/d3d12/CommandRecordingContext.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/CommandRecordingContext.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/RenderPassBuilderD3D12.cpp b/src/dawn/native/d3d12/RenderPassBuilderD3D12.cpp similarity index 97% rename from src/dawn_native/d3d12/RenderPassBuilderD3D12.cpp rename to src/dawn/native/d3d12/RenderPassBuilderD3D12.cpp index 8f04315a54..a1ce85367f 100644 --- a/src/dawn_native/d3d12/RenderPassBuilderD3D12.cpp +++ b/src/dawn/native/d3d12/RenderPassBuilderD3D12.cpp @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/RenderPassBuilderD3D12.h" +#include "dawn/native/d3d12/RenderPassBuilderD3D12.h" -#include "dawn_native/Format.h" -#include "dawn_native/d3d12/CommandBufferD3D12.h" -#include "dawn_native/d3d12/Forward.h" -#include "dawn_native/d3d12/TextureD3D12.h" +#include "dawn/native/Format.h" +#include "dawn/native/d3d12/CommandBufferD3D12.h" +#include "dawn/native/d3d12/Forward.h" +#include "dawn/native/d3d12/TextureD3D12.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/RenderPassBuilderD3D12.h b/src/dawn/native/d3d12/RenderPassBuilderD3D12.h similarity index 97% rename from src/dawn_native/d3d12/RenderPassBuilderD3D12.h rename to src/dawn/native/d3d12/RenderPassBuilderD3D12.h index cf9514f61f..2b926a7c66 100644 --- a/src/dawn_native/d3d12/RenderPassBuilderD3D12.h +++ b/src/dawn/native/d3d12/RenderPassBuilderD3D12.h @@ -18,9 +18,9 @@ #include "dawn/common/Constants.h" #include "dawn/common/ityp_array.h" #include "dawn/common/ityp_span.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/d3d12/d3d12_platform.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/d3d12/d3d12_platform.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/d3d12/RenderPipelineD3D12.cpp b/src/dawn/native/d3d12/RenderPipelineD3D12.cpp similarity index 98% rename from src/dawn_native/d3d12/RenderPipelineD3D12.cpp rename to src/dawn/native/d3d12/RenderPipelineD3D12.cpp index 3203f78726..1e40bd6e80 100644 --- a/src/dawn_native/d3d12/RenderPipelineD3D12.cpp +++ b/src/dawn/native/d3d12/RenderPipelineD3D12.cpp @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/RenderPipelineD3D12.h" +#include "dawn/native/d3d12/RenderPipelineD3D12.h" #include "dawn/common/Assert.h" #include "dawn/common/Log.h" -#include "dawn_native/CreatePipelineAsyncTask.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/PipelineLayoutD3D12.h" -#include "dawn_native/d3d12/PlatformFunctions.h" -#include "dawn_native/d3d12/ShaderModuleD3D12.h" -#include "dawn_native/d3d12/TextureD3D12.h" -#include "dawn_native/d3d12/UtilsD3D12.h" +#include "dawn/native/CreatePipelineAsyncTask.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/PipelineLayoutD3D12.h" +#include "dawn/native/d3d12/PlatformFunctions.h" +#include "dawn/native/d3d12/ShaderModuleD3D12.h" +#include "dawn/native/d3d12/TextureD3D12.h" +#include "dawn/native/d3d12/UtilsD3D12.h" #include diff --git a/src/dawn_native/d3d12/RenderPipelineD3D12.h b/src/dawn/native/d3d12/RenderPipelineD3D12.h similarity index 93% rename from src/dawn_native/d3d12/RenderPipelineD3D12.h rename to src/dawn/native/d3d12/RenderPipelineD3D12.h index 0c0c7e6149..13d4a1af25 100644 --- a/src/dawn_native/d3d12/RenderPipelineD3D12.h +++ b/src/dawn/native/d3d12/RenderPipelineD3D12.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_D3D12_RENDERPIPELINED3D12_H_ #define DAWNNATIVE_D3D12_RENDERPIPELINED3D12_H_ -#include "dawn_native/RenderPipeline.h" +#include "dawn/native/RenderPipeline.h" -#include "dawn_native/d3d12/ShaderModuleD3D12.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/ShaderModuleD3D12.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/ResidencyManagerD3D12.cpp b/src/dawn/native/d3d12/ResidencyManagerD3D12.cpp similarity index 98% rename from src/dawn_native/d3d12/ResidencyManagerD3D12.cpp rename to src/dawn/native/d3d12/ResidencyManagerD3D12.cpp index e35941cca1..b7aab2ccfd 100644 --- a/src/dawn_native/d3d12/ResidencyManagerD3D12.cpp +++ b/src/dawn/native/d3d12/ResidencyManagerD3D12.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/ResidencyManagerD3D12.h" +#include "dawn/native/d3d12/ResidencyManagerD3D12.h" -#include "dawn_native/d3d12/AdapterD3D12.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/Forward.h" -#include "dawn_native/d3d12/HeapD3D12.h" +#include "dawn/native/d3d12/AdapterD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/Forward.h" +#include "dawn/native/d3d12/HeapD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/ResidencyManagerD3D12.h b/src/dawn/native/d3d12/ResidencyManagerD3D12.h similarity index 95% rename from src/dawn_native/d3d12/ResidencyManagerD3D12.h rename to src/dawn/native/d3d12/ResidencyManagerD3D12.h index b281af149d..26d9cf06e2 100644 --- a/src/dawn_native/d3d12/ResidencyManagerD3D12.h +++ b/src/dawn/native/d3d12/ResidencyManagerD3D12.h @@ -16,11 +16,11 @@ #define DAWNNATIVE_D3D12_RESIDENCYMANAGERD3D12_H_ #include "dawn/common/LinkedList.h" -#include "dawn_native/D3D12Backend.h" -#include "dawn_native/Error.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/D3D12Backend.h" +#include "dawn/native/Error.h" +#include "dawn/native/dawn_platform.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.cpp b/src/dawn/native/d3d12/ResourceAllocatorManagerD3D12.cpp similarity index 98% rename from src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.cpp rename to src/dawn/native/d3d12/ResourceAllocatorManagerD3D12.cpp index 6f1b4770e5..8c888f5e68 100644 --- a/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.cpp +++ b/src/dawn/native/d3d12/ResourceAllocatorManagerD3D12.cpp @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/ResourceAllocatorManagerD3D12.h" +#include "dawn/native/d3d12/ResourceAllocatorManagerD3D12.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/HeapAllocatorD3D12.h" -#include "dawn_native/d3d12/HeapD3D12.h" -#include "dawn_native/d3d12/ResidencyManagerD3D12.h" -#include "dawn_native/d3d12/UtilsD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/HeapAllocatorD3D12.h" +#include "dawn/native/d3d12/HeapD3D12.h" +#include "dawn/native/d3d12/ResidencyManagerD3D12.h" +#include "dawn/native/d3d12/UtilsD3D12.h" namespace dawn::native::d3d12 { namespace { diff --git a/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.h b/src/dawn/native/d3d12/ResourceAllocatorManagerD3D12.h similarity index 93% rename from src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.h rename to src/dawn/native/d3d12/ResourceAllocatorManagerD3D12.h index f4b71e808f..703d4018a5 100644 --- a/src/dawn_native/d3d12/ResourceAllocatorManagerD3D12.h +++ b/src/dawn/native/d3d12/ResourceAllocatorManagerD3D12.h @@ -16,11 +16,11 @@ #define DAWNNATIVE_D3D12_RESOURCEALLOCATORMANAGERD3D12_H_ #include "dawn/common/SerialQueue.h" -#include "dawn_native/BuddyMemoryAllocator.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/PooledResourceMemoryAllocator.h" -#include "dawn_native/d3d12/HeapAllocatorD3D12.h" -#include "dawn_native/d3d12/ResourceHeapAllocationD3D12.h" +#include "dawn/native/BuddyMemoryAllocator.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/PooledResourceMemoryAllocator.h" +#include "dawn/native/d3d12/HeapAllocatorD3D12.h" +#include "dawn/native/d3d12/ResourceHeapAllocationD3D12.h" #include diff --git a/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.cpp b/src/dawn/native/d3d12/ResourceHeapAllocationD3D12.cpp similarity index 91% rename from src/dawn_native/d3d12/ResourceHeapAllocationD3D12.cpp rename to src/dawn/native/d3d12/ResourceHeapAllocationD3D12.cpp index 9e4dac40c6..910e4fb124 100644 --- a/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.cpp +++ b/src/dawn/native/d3d12/ResourceHeapAllocationD3D12.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/ResourceHeapAllocationD3D12.h" +#include "dawn/native/d3d12/ResourceHeapAllocationD3D12.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/HeapD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/HeapD3D12.h" #include diff --git a/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.h b/src/dawn/native/d3d12/ResourceHeapAllocationD3D12.h similarity index 92% rename from src/dawn_native/d3d12/ResourceHeapAllocationD3D12.h rename to src/dawn/native/d3d12/ResourceHeapAllocationD3D12.h index 3ca80a2bcd..c9de601e28 100644 --- a/src/dawn_native/d3d12/ResourceHeapAllocationD3D12.h +++ b/src/dawn/native/d3d12/ResourceHeapAllocationD3D12.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_D3D12_RESOURCEHEAPALLOCATIOND3D12_H_ #define DAWNNATIVE_D3D12_RESOURCEHEAPALLOCATIOND3D12_H_ -#include "dawn_native/Error.h" -#include "dawn_native/ResourceMemoryAllocation.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/Error.h" +#include "dawn/native/ResourceMemoryAllocation.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/SamplerD3D12.cpp b/src/dawn/native/d3d12/SamplerD3D12.cpp similarity index 96% rename from src/dawn_native/d3d12/SamplerD3D12.cpp rename to src/dawn/native/d3d12/SamplerD3D12.cpp index 0ece76db8e..c656931947 100644 --- a/src/dawn_native/d3d12/SamplerD3D12.cpp +++ b/src/dawn/native/d3d12/SamplerD3D12.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/SamplerD3D12.h" +#include "dawn/native/d3d12/SamplerD3D12.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/UtilsD3D12.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/UtilsD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/SamplerD3D12.h b/src/dawn/native/d3d12/SamplerD3D12.h similarity index 93% rename from src/dawn_native/d3d12/SamplerD3D12.h rename to src/dawn/native/d3d12/SamplerD3D12.h index b28ab93a2e..e296afbf3e 100644 --- a/src/dawn_native/d3d12/SamplerD3D12.h +++ b/src/dawn/native/d3d12/SamplerD3D12.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_D3D12_SAMPLERD3D12_H_ #define DAWNNATIVE_D3D12_SAMPLERD3D12_H_ -#include "dawn_native/Sampler.h" +#include "dawn/native/Sampler.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/SamplerHeapCacheD3D12.cpp b/src/dawn/native/d3d12/SamplerHeapCacheD3D12.cpp similarity index 94% rename from src/dawn_native/d3d12/SamplerHeapCacheD3D12.cpp rename to src/dawn/native/d3d12/SamplerHeapCacheD3D12.cpp index 763fd0aca9..4659b36e95 100644 --- a/src/dawn_native/d3d12/SamplerHeapCacheD3D12.cpp +++ b/src/dawn/native/d3d12/SamplerHeapCacheD3D12.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/SamplerHeapCacheD3D12.h" +#include "dawn/native/d3d12/SamplerHeapCacheD3D12.h" #include "dawn/common/Assert.h" #include "dawn/common/HashUtils.h" -#include "dawn_native/d3d12/BindGroupD3D12.h" -#include "dawn_native/d3d12/BindGroupLayoutD3D12.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/Forward.h" -#include "dawn_native/d3d12/SamplerD3D12.h" -#include "dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" -#include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h" +#include "dawn/native/d3d12/BindGroupD3D12.h" +#include "dawn/native/d3d12/BindGroupLayoutD3D12.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/Forward.h" +#include "dawn/native/d3d12/SamplerD3D12.h" +#include "dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" +#include "dawn/native/d3d12/StagingDescriptorAllocatorD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/SamplerHeapCacheD3D12.h b/src/dawn/native/d3d12/SamplerHeapCacheD3D12.h similarity index 95% rename from src/dawn_native/d3d12/SamplerHeapCacheD3D12.h rename to src/dawn/native/d3d12/SamplerHeapCacheD3D12.h index 95a1e4c4c1..be38d219cf 100644 --- a/src/dawn_native/d3d12/SamplerHeapCacheD3D12.h +++ b/src/dawn/native/d3d12/SamplerHeapCacheD3D12.h @@ -16,9 +16,9 @@ #define DAWNNATIVE_D3D12_SAMPLERHEAPCACHE_H_ #include "dawn/common/RefCounted.h" -#include "dawn_native/BindingInfo.h" -#include "dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.h" -#include "dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h" +#include "dawn/native/BindingInfo.h" +#include "dawn/native/d3d12/CPUDescriptorHeapAllocationD3D12.h" +#include "dawn/native/d3d12/GPUDescriptorHeapAllocationD3D12.h" #include diff --git a/src/dawn_native/d3d12/ShaderModuleD3D12.cpp b/src/dawn/native/d3d12/ShaderModuleD3D12.cpp similarity index 99% rename from src/dawn_native/d3d12/ShaderModuleD3D12.cpp rename to src/dawn/native/d3d12/ShaderModuleD3D12.cpp index ddefeaa66d..cfa4f54ede 100644 --- a/src/dawn_native/d3d12/ShaderModuleD3D12.cpp +++ b/src/dawn/native/d3d12/ShaderModuleD3D12.cpp @@ -12,22 +12,22 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/ShaderModuleD3D12.h" +#include "dawn/native/d3d12/ShaderModuleD3D12.h" #include "dawn/common/Assert.h" #include "dawn/common/BitSetIterator.h" #include "dawn/common/Log.h" #include "dawn/common/WindowsUtils.h" +#include "dawn/native/Pipeline.h" +#include "dawn/native/TintUtils.h" +#include "dawn/native/d3d12/BindGroupLayoutD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/PipelineLayoutD3D12.h" +#include "dawn/native/d3d12/PlatformFunctions.h" +#include "dawn/native/d3d12/UtilsD3D12.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/Pipeline.h" -#include "dawn_native/TintUtils.h" -#include "dawn_native/d3d12/BindGroupLayoutD3D12.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/PipelineLayoutD3D12.h" -#include "dawn_native/d3d12/PlatformFunctions.h" -#include "dawn_native/d3d12/UtilsD3D12.h" #include diff --git a/src/dawn_native/d3d12/ShaderModuleD3D12.h b/src/dawn/native/d3d12/ShaderModuleD3D12.h similarity index 94% rename from src/dawn_native/d3d12/ShaderModuleD3D12.h rename to src/dawn/native/d3d12/ShaderModuleD3D12.h index 3eb91e1294..13d00e5a45 100644 --- a/src/dawn_native/d3d12/ShaderModuleD3D12.h +++ b/src/dawn/native/d3d12/ShaderModuleD3D12.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_D3D12_SHADERMODULED3D12_H_ #define DAWNNATIVE_D3D12_SHADERMODULED3D12_H_ -#include "dawn_native/PersistentCache.h" -#include "dawn_native/ShaderModule.h" +#include "dawn/native/PersistentCache.h" +#include "dawn/native/ShaderModule.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native { struct ProgrammableStage; diff --git a/src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.cpp b/src/dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.cpp similarity index 97% rename from src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.cpp rename to src/dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.cpp index 9ac146d932..32d6cd6cb9 100644 --- a/src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.cpp +++ b/src/dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h" -#include "dawn_native/d3d12/ResidencyManagerD3D12.h" +#include "dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/GPUDescriptorHeapAllocationD3D12.h" +#include "dawn/native/d3d12/ResidencyManagerD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h b/src/dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h similarity index 95% rename from src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h rename to src/dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h index ee6009c78b..dca8b2995d 100644 --- a/src/dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h +++ b/src/dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h @@ -15,11 +15,11 @@ #ifndef DAWNNATIVE_D3D12_SHADERVISIBLEDESCRIPTORALLOCATOR_H_ #define DAWNNATIVE_D3D12_SHADERVISIBLEDESCRIPTORALLOCATOR_H_ -#include "dawn_native/Error.h" -#include "dawn_native/RingBufferAllocator.h" -#include "dawn_native/d3d12/IntegerTypes.h" -#include "dawn_native/d3d12/PageableD3D12.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/Error.h" +#include "dawn/native/RingBufferAllocator.h" +#include "dawn/native/d3d12/IntegerTypes.h" +#include "dawn/native/d3d12/PageableD3D12.h" +#include "dawn/native/d3d12/d3d12_platform.h" #include diff --git a/src/dawn_native/d3d12/StagingBufferD3D12.cpp b/src/dawn/native/d3d12/StagingBufferD3D12.cpp similarity index 91% rename from src/dawn_native/d3d12/StagingBufferD3D12.cpp rename to src/dawn/native/d3d12/StagingBufferD3D12.cpp index c1a307334e..e608a14e45 100644 --- a/src/dawn_native/d3d12/StagingBufferD3D12.cpp +++ b/src/dawn/native/d3d12/StagingBufferD3D12.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/StagingBufferD3D12.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/HeapD3D12.h" -#include "dawn_native/d3d12/ResidencyManagerD3D12.h" -#include "dawn_native/d3d12/UtilsD3D12.h" +#include "dawn/native/d3d12/StagingBufferD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/HeapD3D12.h" +#include "dawn/native/d3d12/ResidencyManagerD3D12.h" +#include "dawn/native/d3d12/UtilsD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/StagingBufferD3D12.h b/src/dawn/native/d3d12/StagingBufferD3D12.h similarity index 88% rename from src/dawn_native/d3d12/StagingBufferD3D12.h rename to src/dawn/native/d3d12/StagingBufferD3D12.h index 455adda01c..b810541649 100644 --- a/src/dawn_native/d3d12/StagingBufferD3D12.h +++ b/src/dawn/native/d3d12/StagingBufferD3D12.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_STAGINGBUFFERD3D12_H_ #define DAWNNATIVE_STAGINGBUFFERD3D12_H_ -#include "dawn_native/StagingBuffer.h" -#include "dawn_native/d3d12/ResourceHeapAllocationD3D12.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/StagingBuffer.h" +#include "dawn/native/d3d12/ResourceHeapAllocationD3D12.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.cpp b/src/dawn/native/d3d12/StagingDescriptorAllocatorD3D12.cpp similarity index 97% rename from src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.cpp rename to src/dawn/native/d3d12/StagingDescriptorAllocatorD3D12.cpp index 064eb3bdf6..b64da3007a 100644 --- a/src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.cpp +++ b/src/dawn/native/d3d12/StagingDescriptorAllocatorD3D12.cpp @@ -14,9 +14,9 @@ #include "dawn/common/Math.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/StagingDescriptorAllocatorD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h b/src/dawn/native/d3d12/StagingDescriptorAllocatorD3D12.h similarity index 97% rename from src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h rename to src/dawn/native/d3d12/StagingDescriptorAllocatorD3D12.h index 64e9c3f44e..454aa09add 100644 --- a/src/dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h +++ b/src/dawn/native/d3d12/StagingDescriptorAllocatorD3D12.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_D3D12_STAGINGDESCRIPTORALLOCATOR_H_ #define DAWNNATIVE_D3D12_STAGINGDESCRIPTORALLOCATOR_H_ -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" -#include "dawn_native/d3d12/CPUDescriptorHeapAllocationD3D12.h" +#include "dawn/native/d3d12/CPUDescriptorHeapAllocationD3D12.h" #include diff --git a/src/dawn_native/d3d12/SwapChainD3D12.cpp b/src/dawn/native/d3d12/SwapChainD3D12.cpp similarity index 97% rename from src/dawn_native/d3d12/SwapChainD3D12.cpp rename to src/dawn/native/d3d12/SwapChainD3D12.cpp index 1b6175ca86..f37f2f7ed8 100644 --- a/src/dawn_native/d3d12/SwapChainD3D12.cpp +++ b/src/dawn/native/d3d12/SwapChainD3D12.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/SwapChainD3D12.h" +#include "dawn/native/d3d12/SwapChainD3D12.h" -#include "dawn_native/Surface.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/TextureD3D12.h" +#include "dawn/native/Surface.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/TextureD3D12.h" #include @@ -133,9 +133,9 @@ namespace dawn::native::d3d12 { // static ResultOrError> SwapChain::Create(Device* device, - Surface* surface, - NewSwapChainBase* previousSwapChain, - const SwapChainDescriptor* descriptor) { + Surface* surface, + NewSwapChainBase* previousSwapChain, + const SwapChainDescriptor* descriptor) { Ref swapchain = AcquireRef(new SwapChain(device, surface, descriptor)); DAWN_TRY(swapchain->Initialize(previousSwapChain)); return swapchain; diff --git a/src/dawn_native/d3d12/SwapChainD3D12.h b/src/dawn/native/d3d12/SwapChainD3D12.h similarity index 88% rename from src/dawn_native/d3d12/SwapChainD3D12.h rename to src/dawn/native/d3d12/SwapChainD3D12.h index 8a27cef235..eb99f1c88c 100644 --- a/src/dawn_native/d3d12/SwapChainD3D12.h +++ b/src/dawn/native/d3d12/SwapChainD3D12.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_D3D12_SWAPCHAIND3D12_H_ #define DAWNNATIVE_D3D12_SWAPCHAIND3D12_H_ -#include "dawn_native/SwapChain.h" +#include "dawn/native/SwapChain.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { @@ -41,9 +41,9 @@ namespace dawn::native::d3d12 { class SwapChain final : public NewSwapChainBase { public: static ResultOrError> Create(Device* device, - Surface* surface, - NewSwapChainBase* previousSwapChain, - const SwapChainDescriptor* descriptor); + Surface* surface, + NewSwapChainBase* previousSwapChain, + const SwapChainDescriptor* descriptor); private: ~SwapChain() override; diff --git a/src/dawn_native/d3d12/TextureCopySplitter.cpp b/src/dawn/native/d3d12/TextureCopySplitter.cpp similarity index 99% rename from src/dawn_native/d3d12/TextureCopySplitter.cpp rename to src/dawn/native/d3d12/TextureCopySplitter.cpp index b622e52b08..83e55fd18f 100644 --- a/src/dawn_native/d3d12/TextureCopySplitter.cpp +++ b/src/dawn/native/d3d12/TextureCopySplitter.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/TextureCopySplitter.h" +#include "dawn/native/d3d12/TextureCopySplitter.h" #include "dawn/common/Assert.h" -#include "dawn_native/Format.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/Format.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/TextureCopySplitter.h b/src/dawn/native/d3d12/TextureCopySplitter.h similarity index 99% rename from src/dawn_native/d3d12/TextureCopySplitter.h rename to src/dawn/native/d3d12/TextureCopySplitter.h index e75e192ef6..9073df1e47 100644 --- a/src/dawn_native/d3d12/TextureCopySplitter.h +++ b/src/dawn/native/d3d12/TextureCopySplitter.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_D3D12_TEXTURECOPYSPLITTER_H_ #define DAWNNATIVE_D3D12_TEXTURECOPYSPLITTER_H_ -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/d3d12/TextureD3D12.cpp b/src/dawn/native/d3d12/TextureD3D12.cpp similarity index 98% rename from src/dawn_native/d3d12/TextureD3D12.cpp rename to src/dawn/native/d3d12/TextureD3D12.cpp index 4d9a6c593e..95f9cb9b3d 100644 --- a/src/dawn_native/d3d12/TextureD3D12.cpp +++ b/src/dawn/native/d3d12/TextureD3D12.cpp @@ -12,24 +12,24 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/TextureD3D12.h" +#include "dawn/native/d3d12/TextureD3D12.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/EnumMaskIterator.h" -#include "dawn_native/Error.h" -#include "dawn_native/d3d12/BufferD3D12.h" -#include "dawn_native/d3d12/CommandRecordingContext.h" -#include "dawn_native/d3d12/D3D11on12Util.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/HeapD3D12.h" -#include "dawn_native/d3d12/ResourceAllocatorManagerD3D12.h" -#include "dawn_native/d3d12/StagingBufferD3D12.h" -#include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h" -#include "dawn_native/d3d12/TextureCopySplitter.h" -#include "dawn_native/d3d12/UtilsD3D12.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/EnumMaskIterator.h" +#include "dawn/native/Error.h" +#include "dawn/native/d3d12/BufferD3D12.h" +#include "dawn/native/d3d12/CommandRecordingContext.h" +#include "dawn/native/d3d12/D3D11on12Util.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/HeapD3D12.h" +#include "dawn/native/d3d12/ResourceAllocatorManagerD3D12.h" +#include "dawn/native/d3d12/StagingBufferD3D12.h" +#include "dawn/native/d3d12/StagingDescriptorAllocatorD3D12.h" +#include "dawn/native/d3d12/TextureCopySplitter.h" +#include "dawn/native/d3d12/UtilsD3D12.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/TextureD3D12.h b/src/dawn/native/d3d12/TextureD3D12.h similarity index 96% rename from src/dawn_native/d3d12/TextureD3D12.h rename to src/dawn/native/d3d12/TextureD3D12.h index b7371dd303..76572bab59 100644 --- a/src/dawn_native/d3d12/TextureD3D12.h +++ b/src/dawn/native/d3d12/TextureD3D12.h @@ -15,14 +15,14 @@ #ifndef DAWNNATIVE_D3D12_TEXTURED3D12_H_ #define DAWNNATIVE_D3D12_TEXTURED3D12_H_ -#include "dawn_native/Texture.h" +#include "dawn/native/Texture.h" -#include "dawn_native/DawnNative.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/PassResourceUsage.h" -#include "dawn_native/d3d12/IntegerTypes.h" -#include "dawn_native/d3d12/ResourceHeapAllocationD3D12.h" -#include "dawn_native/d3d12/d3d12_platform.h" +#include "dawn/native/DawnNative.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/PassResourceUsage.h" +#include "dawn/native/d3d12/IntegerTypes.h" +#include "dawn/native/d3d12/ResourceHeapAllocationD3D12.h" +#include "dawn/native/d3d12/d3d12_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/UtilsD3D12.cpp b/src/dawn/native/d3d12/UtilsD3D12.cpp similarity index 98% rename from src/dawn_native/d3d12/UtilsD3D12.cpp rename to src/dawn/native/d3d12/UtilsD3D12.cpp index 906c989378..8d4749fd95 100644 --- a/src/dawn_native/d3d12/UtilsD3D12.cpp +++ b/src/dawn/native/d3d12/UtilsD3D12.cpp @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/d3d12/UtilsD3D12.h" +#include "dawn/native/d3d12/UtilsD3D12.h" #include "dawn/common/Assert.h" -#include "dawn_native/Format.h" -#include "dawn_native/d3d12/BufferD3D12.h" -#include "dawn_native/d3d12/CommandRecordingContext.h" -#include "dawn_native/d3d12/D3D12Error.h" -#include "dawn_native/d3d12/DeviceD3D12.h" +#include "dawn/native/Format.h" +#include "dawn/native/d3d12/BufferD3D12.h" +#include "dawn/native/d3d12/CommandRecordingContext.h" +#include "dawn/native/d3d12/D3D12Error.h" +#include "dawn/native/d3d12/DeviceD3D12.h" #include diff --git a/src/dawn_native/d3d12/UtilsD3D12.h b/src/dawn/native/d3d12/UtilsD3D12.h similarity index 91% rename from src/dawn_native/d3d12/UtilsD3D12.h rename to src/dawn/native/d3d12/UtilsD3D12.h index ab724ae94b..00c850f385 100644 --- a/src/dawn_native/d3d12/UtilsD3D12.h +++ b/src/dawn/native/d3d12/UtilsD3D12.h @@ -15,12 +15,12 @@ #ifndef DAWNNATIVE_D3D12_UTILSD3D12_H_ #define DAWNNATIVE_D3D12_UTILSD3D12_H_ -#include "dawn_native/Commands.h" -#include "dawn_native/d3d12/BufferD3D12.h" -#include "dawn_native/d3d12/TextureCopySplitter.h" -#include "dawn_native/d3d12/TextureD3D12.h" -#include "dawn_native/d3d12/d3d12_platform.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/Commands.h" +#include "dawn/native/d3d12/BufferD3D12.h" +#include "dawn/native/d3d12/TextureCopySplitter.h" +#include "dawn/native/d3d12/TextureD3D12.h" +#include "dawn/native/d3d12/d3d12_platform.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native::d3d12 { diff --git a/src/dawn_native/d3d12/d3d12_platform.h b/src/dawn/native/d3d12/d3d12_platform.h similarity index 100% rename from src/dawn_native/d3d12/d3d12_platform.h rename to src/dawn/native/d3d12/d3d12_platform.h diff --git a/src/dawn_native/dawn_platform.h b/src/dawn/native/dawn_platform.h similarity index 98% rename from src/dawn_native/dawn_platform.h rename to src/dawn/native/dawn_platform.h index 90e729ce29..c8863afba0 100644 --- a/src/dawn_native/dawn_platform.h +++ b/src/dawn/native/dawn_platform.h @@ -18,7 +18,7 @@ // Use webgpu_cpp to have the enum and bitfield definitions #include -#include +#include namespace dawn::native { diff --git a/src/dawn_native/metal/BackendMTL.h b/src/dawn/native/metal/BackendMTL.h similarity index 96% rename from src/dawn_native/metal/BackendMTL.h rename to src/dawn/native/metal/BackendMTL.h index 26738f6725..0dd72045fa 100644 --- a/src/dawn_native/metal/BackendMTL.h +++ b/src/dawn/native/metal/BackendMTL.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_METAL_BACKENDMTL_H_ #define DAWNNATIVE_METAL_BACKENDMTL_H_ -#include "dawn_native/BackendConnection.h" +#include "dawn/native/BackendConnection.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/BackendMTL.mm b/src/dawn/native/metal/BackendMTL.mm similarity index 99% rename from src/dawn_native/metal/BackendMTL.mm rename to src/dawn/native/metal/BackendMTL.mm index f658653bb3..8650fe8838 100644 --- a/src/dawn_native/metal/BackendMTL.mm +++ b/src/dawn/native/metal/BackendMTL.mm @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/BackendMTL.h" +#include "dawn/native/metal/BackendMTL.h" #include "dawn/common/CoreFoundationRef.h" #include "dawn/common/GPUInfo.h" #include "dawn/common/NSRef.h" #include "dawn/common/Platform.h" #include "dawn/common/SystemUtils.h" -#include "dawn_native/Instance.h" -#include "dawn_native/MetalBackend.h" -#include "dawn_native/metal/BufferMTL.h" -#include "dawn_native/metal/DeviceMTL.h" +#include "dawn/native/Instance.h" +#include "dawn/native/MetalBackend.h" +#include "dawn/native/metal/BufferMTL.h" +#include "dawn/native/metal/DeviceMTL.h" #if defined(DAWN_PLATFORM_MACOS) # import diff --git a/src/dawn_native/metal/BindGroupLayoutMTL.h b/src/dawn/native/metal/BindGroupLayoutMTL.h similarity index 97% rename from src/dawn_native/metal/BindGroupLayoutMTL.h rename to src/dawn/native/metal/BindGroupLayoutMTL.h index e7f0d62950..bf4c3e92cc 100644 --- a/src/dawn_native/metal/BindGroupLayoutMTL.h +++ b/src/dawn/native/metal/BindGroupLayoutMTL.h @@ -16,7 +16,7 @@ #define DAWNNATIVE_METAL_BINDGROUPLAYOUTMTL_H_ #include "dawn/common/SlabAllocator.h" -#include "dawn_native/BindGroupLayout.h" +#include "dawn/native/BindGroupLayout.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/BindGroupLayoutMTL.mm b/src/dawn/native/metal/BindGroupLayoutMTL.mm similarity index 94% rename from src/dawn_native/metal/BindGroupLayoutMTL.mm rename to src/dawn/native/metal/BindGroupLayoutMTL.mm index bfe6870b27..e413bdd87d 100644 --- a/src/dawn_native/metal/BindGroupLayoutMTL.mm +++ b/src/dawn/native/metal/BindGroupLayoutMTL.mm @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/BindGroupLayoutMTL.h" +#include "dawn/native/metal/BindGroupLayoutMTL.h" -#include "dawn_native/metal/BindGroupMTL.h" +#include "dawn/native/metal/BindGroupMTL.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/BindGroupMTL.h b/src/dawn/native/metal/BindGroupMTL.h similarity index 97% rename from src/dawn_native/metal/BindGroupMTL.h rename to src/dawn/native/metal/BindGroupMTL.h index 55f79a9dea..238635c0e8 100644 --- a/src/dawn_native/metal/BindGroupMTL.h +++ b/src/dawn/native/metal/BindGroupMTL.h @@ -16,7 +16,7 @@ #define DAWNNATIVE_METAL_BINDGROUPMTL_H_ #include "dawn/common/PlacementAllocated.h" -#include "dawn_native/BindGroup.h" +#include "dawn/native/BindGroup.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/BindGroupMTL.mm b/src/dawn/native/metal/BindGroupMTL.mm similarity index 89% rename from src/dawn_native/metal/BindGroupMTL.mm rename to src/dawn/native/metal/BindGroupMTL.mm index 272703e897..a8e02a805f 100644 --- a/src/dawn_native/metal/BindGroupMTL.mm +++ b/src/dawn/native/metal/BindGroupMTL.mm @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/BindGroupMTL.h" +#include "dawn/native/metal/BindGroupMTL.h" -#include "dawn_native/metal/BindGroupLayoutMTL.h" -#include "dawn_native/metal/DeviceMTL.h" +#include "dawn/native/metal/BindGroupLayoutMTL.h" +#include "dawn/native/metal/DeviceMTL.h" namespace dawn::native::metal { BindGroup::BindGroup(Device* device, const BindGroupDescriptor* descriptor) diff --git a/src/dawn_native/metal/BufferMTL.h b/src/dawn/native/metal/BufferMTL.h similarity index 98% rename from src/dawn_native/metal/BufferMTL.h rename to src/dawn/native/metal/BufferMTL.h index 6fe4329cd5..8eb9a36d0f 100644 --- a/src/dawn_native/metal/BufferMTL.h +++ b/src/dawn/native/metal/BufferMTL.h @@ -17,7 +17,7 @@ #include "dawn/common/NSRef.h" #include "dawn/common/SerialQueue.h" -#include "dawn_native/Buffer.h" +#include "dawn/native/Buffer.h" #import diff --git a/src/dawn_native/metal/BufferMTL.mm b/src/dawn/native/metal/BufferMTL.mm similarity index 98% rename from src/dawn_native/metal/BufferMTL.mm rename to src/dawn/native/metal/BufferMTL.mm index b9d415326a..695872a3e8 100644 --- a/src/dawn_native/metal/BufferMTL.mm +++ b/src/dawn/native/metal/BufferMTL.mm @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/BufferMTL.h" +#include "dawn/native/metal/BufferMTL.h" #include "dawn/common/Math.h" -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/metal/CommandRecordingContext.h" -#include "dawn_native/metal/DeviceMTL.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/metal/CommandRecordingContext.h" +#include "dawn/native/metal/DeviceMTL.h" #include diff --git a/src/dawn_native/metal/CommandBufferMTL.h b/src/dawn/native/metal/CommandBufferMTL.h similarity index 97% rename from src/dawn_native/metal/CommandBufferMTL.h rename to src/dawn/native/metal/CommandBufferMTL.h index 69427f4845..29db87057f 100644 --- a/src/dawn_native/metal/CommandBufferMTL.h +++ b/src/dawn/native/metal/CommandBufferMTL.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_METAL_COMMANDBUFFERMTL_H_ #define DAWNNATIVE_METAL_COMMANDBUFFERMTL_H_ -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/Error.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/Error.h" #import diff --git a/src/dawn_native/metal/CommandBufferMTL.mm b/src/dawn/native/metal/CommandBufferMTL.mm similarity index 98% rename from src/dawn_native/metal/CommandBufferMTL.mm rename to src/dawn/native/metal/CommandBufferMTL.mm index feef33aad1..5ad9e03a5c 100644 --- a/src/dawn_native/metal/CommandBufferMTL.mm +++ b/src/dawn/native/metal/CommandBufferMTL.mm @@ -12,25 +12,25 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/CommandBufferMTL.h" +#include "dawn/native/metal/CommandBufferMTL.h" -#include "dawn_native/BindGroupTracker.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/Commands.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/ExternalTexture.h" -#include "dawn_native/RenderBundle.h" -#include "dawn_native/metal/BindGroupMTL.h" -#include "dawn_native/metal/BufferMTL.h" -#include "dawn_native/metal/ComputePipelineMTL.h" -#include "dawn_native/metal/DeviceMTL.h" -#include "dawn_native/metal/PipelineLayoutMTL.h" -#include "dawn_native/metal/QuerySetMTL.h" -#include "dawn_native/metal/RenderPipelineMTL.h" -#include "dawn_native/metal/SamplerMTL.h" -#include "dawn_native/metal/StagingBufferMTL.h" -#include "dawn_native/metal/TextureMTL.h" -#include "dawn_native/metal/UtilsMetal.h" +#include "dawn/native/BindGroupTracker.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/Commands.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/ExternalTexture.h" +#include "dawn/native/RenderBundle.h" +#include "dawn/native/metal/BindGroupMTL.h" +#include "dawn/native/metal/BufferMTL.h" +#include "dawn/native/metal/ComputePipelineMTL.h" +#include "dawn/native/metal/DeviceMTL.h" +#include "dawn/native/metal/PipelineLayoutMTL.h" +#include "dawn/native/metal/QuerySetMTL.h" +#include "dawn/native/metal/RenderPipelineMTL.h" +#include "dawn/native/metal/SamplerMTL.h" +#include "dawn/native/metal/StagingBufferMTL.h" +#include "dawn/native/metal/TextureMTL.h" +#include "dawn/native/metal/UtilsMetal.h" #include @@ -1459,8 +1459,9 @@ namespace dawn::native::metal { slopeScale:newPipeline->GetDepthBiasSlopeScale() clamp:newPipeline->GetDepthBiasClamp()]; if (@available(macOS 10.11, iOS 11.0, *)) { - MTLDepthClipMode clipMode = newPipeline->ShouldClampDepth() ? - MTLDepthClipModeClamp : MTLDepthClipModeClip; + MTLDepthClipMode clipMode = newPipeline->ShouldClampDepth() + ? MTLDepthClipModeClamp + : MTLDepthClipModeClip; [encoder setDepthClipMode:clipMode]; } newPipeline->Encode(encoder); diff --git a/src/dawn_native/metal/CommandRecordingContext.h b/src/dawn/native/metal/CommandRecordingContext.h similarity index 98% rename from src/dawn_native/metal/CommandRecordingContext.h rename to src/dawn/native/metal/CommandRecordingContext.h index 0987da37cc..fb06aa873a 100644 --- a/src/dawn_native/metal/CommandRecordingContext.h +++ b/src/dawn/native/metal/CommandRecordingContext.h @@ -16,7 +16,7 @@ #include "dawn/common/NSRef.h" #include "dawn/common/NonCopyable.h" -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" #import diff --git a/src/dawn_native/metal/CommandRecordingContext.mm b/src/dawn/native/metal/CommandRecordingContext.mm similarity index 98% rename from src/dawn_native/metal/CommandRecordingContext.mm rename to src/dawn/native/metal/CommandRecordingContext.mm index 4a37a14e01..cced9a76de 100644 --- a/src/dawn_native/metal/CommandRecordingContext.mm +++ b/src/dawn/native/metal/CommandRecordingContext.mm @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/CommandRecordingContext.h" +#include "dawn/native/metal/CommandRecordingContext.h" #include "dawn/common/Assert.h" diff --git a/src/dawn_native/metal/ComputePipelineMTL.h b/src/dawn/native/metal/ComputePipelineMTL.h similarity index 97% rename from src/dawn_native/metal/ComputePipelineMTL.h rename to src/dawn/native/metal/ComputePipelineMTL.h index c1facd7e63..d61db22056 100644 --- a/src/dawn_native/metal/ComputePipelineMTL.h +++ b/src/dawn/native/metal/ComputePipelineMTL.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_METAL_COMPUTEPIPELINEMTL_H_ #define DAWNNATIVE_METAL_COMPUTEPIPELINEMTL_H_ -#include "dawn_native/ComputePipeline.h" +#include "dawn/native/ComputePipeline.h" #include "dawn/common/NSRef.h" diff --git a/src/dawn_native/metal/ComputePipelineMTL.mm b/src/dawn/native/metal/ComputePipelineMTL.mm similarity index 93% rename from src/dawn_native/metal/ComputePipelineMTL.mm rename to src/dawn/native/metal/ComputePipelineMTL.mm index 9edbedf10b..a7663b6eb2 100644 --- a/src/dawn_native/metal/ComputePipelineMTL.mm +++ b/src/dawn/native/metal/ComputePipelineMTL.mm @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/ComputePipelineMTL.h" +#include "dawn/native/metal/ComputePipelineMTL.h" #include "dawn/common/Math.h" -#include "dawn_native/CreatePipelineAsyncTask.h" -#include "dawn_native/metal/DeviceMTL.h" -#include "dawn_native/metal/ShaderModuleMTL.h" -#include "dawn_native/metal/UtilsMetal.h" +#include "dawn/native/CreatePipelineAsyncTask.h" +#include "dawn/native/metal/DeviceMTL.h" +#include "dawn/native/metal/ShaderModuleMTL.h" +#include "dawn/native/metal/UtilsMetal.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/DeviceMTL.h b/src/dawn/native/metal/DeviceMTL.h similarity index 97% rename from src/dawn_native/metal/DeviceMTL.h rename to src/dawn/native/metal/DeviceMTL.h index f7817c4a76..d72cc3f3d0 100644 --- a/src/dawn_native/metal/DeviceMTL.h +++ b/src/dawn/native/metal/DeviceMTL.h @@ -15,12 +15,12 @@ #ifndef DAWNNATIVE_METAL_DEVICEMTL_H_ #define DAWNNATIVE_METAL_DEVICEMTL_H_ -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" -#include "dawn_native/Commands.h" -#include "dawn_native/Device.h" -#include "dawn_native/metal/CommandRecordingContext.h" -#include "dawn_native/metal/Forward.h" +#include "dawn/native/Commands.h" +#include "dawn/native/Device.h" +#include "dawn/native/metal/CommandRecordingContext.h" +#include "dawn/native/metal/Forward.h" #import #import diff --git a/src/dawn_native/metal/DeviceMTL.mm b/src/dawn/native/metal/DeviceMTL.mm similarity index 96% rename from src/dawn_native/metal/DeviceMTL.mm rename to src/dawn/native/metal/DeviceMTL.mm index 9898dd8f33..55158ea4e7 100644 --- a/src/dawn_native/metal/DeviceMTL.mm +++ b/src/dawn/native/metal/DeviceMTL.mm @@ -12,31 +12,31 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/DeviceMTL.h" +#include "dawn/native/metal/DeviceMTL.h" #include "dawn/common/GPUInfo.h" #include "dawn/common/Platform.h" +#include "dawn/native/BackendConnection.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Commands.h" +#include "dawn/native/ErrorData.h" +#include "dawn/native/metal/BindGroupLayoutMTL.h" +#include "dawn/native/metal/BindGroupMTL.h" +#include "dawn/native/metal/BufferMTL.h" +#include "dawn/native/metal/CommandBufferMTL.h" +#include "dawn/native/metal/ComputePipelineMTL.h" +#include "dawn/native/metal/PipelineLayoutMTL.h" +#include "dawn/native/metal/QuerySetMTL.h" +#include "dawn/native/metal/QueueMTL.h" +#include "dawn/native/metal/RenderPipelineMTL.h" +#include "dawn/native/metal/SamplerMTL.h" +#include "dawn/native/metal/ShaderModuleMTL.h" +#include "dawn/native/metal/StagingBufferMTL.h" +#include "dawn/native/metal/SwapChainMTL.h" +#include "dawn/native/metal/TextureMTL.h" +#include "dawn/native/metal/UtilsMetal.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/BackendConnection.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Commands.h" -#include "dawn_native/ErrorData.h" -#include "dawn_native/metal/BindGroupLayoutMTL.h" -#include "dawn_native/metal/BindGroupMTL.h" -#include "dawn_native/metal/BufferMTL.h" -#include "dawn_native/metal/CommandBufferMTL.h" -#include "dawn_native/metal/ComputePipelineMTL.h" -#include "dawn_native/metal/PipelineLayoutMTL.h" -#include "dawn_native/metal/QuerySetMTL.h" -#include "dawn_native/metal/QueueMTL.h" -#include "dawn_native/metal/RenderPipelineMTL.h" -#include "dawn_native/metal/SamplerMTL.h" -#include "dawn_native/metal/ShaderModuleMTL.h" -#include "dawn_native/metal/StagingBufferMTL.h" -#include "dawn_native/metal/SwapChainMTL.h" -#include "dawn_native/metal/TextureMTL.h" -#include "dawn_native/metal/UtilsMetal.h" #include diff --git a/src/dawn_native/metal/Forward.h b/src/dawn/native/metal/Forward.h similarity index 98% rename from src/dawn_native/metal/Forward.h rename to src/dawn/native/metal/Forward.h index cfa2cac08a..bdfc31d98f 100644 --- a/src/dawn_native/metal/Forward.h +++ b/src/dawn/native/metal/Forward.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_METAL_FORWARD_H_ #define DAWNNATIVE_METAL_FORWARD_H_ -#include "dawn_native/ToBackend.h" +#include "dawn/native/ToBackend.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/MetalBackend.mm b/src/dawn/native/metal/MetalBackend.mm similarity index 93% rename from src/dawn_native/metal/MetalBackend.mm rename to src/dawn/native/metal/MetalBackend.mm index 95174ebfb1..c01cd40108 100644 --- a/src/dawn_native/metal/MetalBackend.mm +++ b/src/dawn/native/metal/MetalBackend.mm @@ -15,10 +15,10 @@ // MetalBackend.cpp: contains the definition of symbols exported by MetalBackend.h so that they // can be compiled twice: once export (shared library), once not exported (static library) -#include "dawn_native/MetalBackend.h" +#include "dawn/native/MetalBackend.h" -#include "dawn_native/metal/DeviceMTL.h" -#include "dawn_native/metal/TextureMTL.h" +#include "dawn/native/metal/DeviceMTL.h" +#include "dawn/native/metal/TextureMTL.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/PipelineLayoutMTL.h b/src/dawn/native/metal/PipelineLayoutMTL.h similarity index 95% rename from src/dawn_native/metal/PipelineLayoutMTL.h rename to src/dawn/native/metal/PipelineLayoutMTL.h index 71a394d6a8..efd3f51279 100644 --- a/src/dawn_native/metal/PipelineLayoutMTL.h +++ b/src/dawn/native/metal/PipelineLayoutMTL.h @@ -16,10 +16,10 @@ #define DAWNNATIVE_METAL_PIPELINELAYOUTMTL_H_ #include "dawn/common/ityp_stack_vec.h" -#include "dawn_native/BindingInfo.h" -#include "dawn_native/PipelineLayout.h" +#include "dawn/native/BindingInfo.h" +#include "dawn/native/PipelineLayout.h" -#include "dawn_native/PerStage.h" +#include "dawn/native/PerStage.h" #import diff --git a/src/dawn_native/metal/PipelineLayoutMTL.mm b/src/dawn/native/metal/PipelineLayoutMTL.mm similarity index 96% rename from src/dawn_native/metal/PipelineLayoutMTL.mm rename to src/dawn/native/metal/PipelineLayoutMTL.mm index 99a842707f..5f789eae0e 100644 --- a/src/dawn_native/metal/PipelineLayoutMTL.mm +++ b/src/dawn/native/metal/PipelineLayoutMTL.mm @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/PipelineLayoutMTL.h" +#include "dawn/native/metal/PipelineLayoutMTL.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/metal/DeviceMTL.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/metal/DeviceMTL.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/QuerySetMTL.h b/src/dawn/native/metal/QuerySetMTL.h similarity index 98% rename from src/dawn_native/metal/QuerySetMTL.h rename to src/dawn/native/metal/QuerySetMTL.h index b2d9fefea1..23d6c44594 100644 --- a/src/dawn_native/metal/QuerySetMTL.h +++ b/src/dawn/native/metal/QuerySetMTL.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_METAL_QUERYSETMTL_H_ #define DAWNNATIVE_METAL_QUERYSETMTL_H_ -#include "dawn_native/QuerySet.h" +#include "dawn/native/QuerySet.h" #include "dawn/common/NSRef.h" diff --git a/src/dawn_native/metal/QuerySetMTL.mm b/src/dawn/native/metal/QuerySetMTL.mm similarity index 98% rename from src/dawn_native/metal/QuerySetMTL.mm rename to src/dawn/native/metal/QuerySetMTL.mm index 018f4e600d..4882fee86c 100644 --- a/src/dawn_native/metal/QuerySetMTL.mm +++ b/src/dawn/native/metal/QuerySetMTL.mm @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/QuerySetMTL.h" +#include "dawn/native/metal/QuerySetMTL.h" #include "dawn/common/Math.h" #include "dawn/common/Platform.h" -#include "dawn_native/metal/DeviceMTL.h" +#include "dawn/native/metal/DeviceMTL.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/QueueMTL.h b/src/dawn/native/metal/QueueMTL.h similarity index 97% rename from src/dawn_native/metal/QueueMTL.h rename to src/dawn/native/metal/QueueMTL.h index 6df9801ded..fd94e0796a 100644 --- a/src/dawn_native/metal/QueueMTL.h +++ b/src/dawn/native/metal/QueueMTL.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_METAL_QUEUEMTL_H_ #define DAWNNATIVE_METAL_QUEUEMTL_H_ -#include "dawn_native/Queue.h" +#include "dawn/native/Queue.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/QueueMTL.mm b/src/dawn/native/metal/QueueMTL.mm similarity index 84% rename from src/dawn_native/metal/QueueMTL.mm rename to src/dawn/native/metal/QueueMTL.mm index 4cf74b6ed1..d489295a86 100644 --- a/src/dawn_native/metal/QueueMTL.mm +++ b/src/dawn/native/metal/QueueMTL.mm @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/QueueMTL.h" +#include "dawn/native/metal/QueueMTL.h" #include "dawn/common/Math.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandValidation.h" +#include "dawn/native/Commands.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/metal/CommandBufferMTL.h" +#include "dawn/native/metal/DeviceMTL.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandValidation.h" -#include "dawn_native/Commands.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/metal/CommandBufferMTL.h" -#include "dawn_native/metal/DeviceMTL.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/RenderPipelineMTL.h b/src/dawn/native/metal/RenderPipelineMTL.h similarity index 98% rename from src/dawn_native/metal/RenderPipelineMTL.h rename to src/dawn/native/metal/RenderPipelineMTL.h index 3c771ecdcb..05c70aa0b7 100644 --- a/src/dawn_native/metal/RenderPipelineMTL.h +++ b/src/dawn/native/metal/RenderPipelineMTL.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_METAL_RENDERPIPELINEMTL_H_ #define DAWNNATIVE_METAL_RENDERPIPELINEMTL_H_ -#include "dawn_native/RenderPipeline.h" +#include "dawn/native/RenderPipeline.h" #include "dawn/common/NSRef.h" diff --git a/src/dawn_native/metal/RenderPipelineMTL.mm b/src/dawn/native/metal/RenderPipelineMTL.mm similarity index 98% rename from src/dawn_native/metal/RenderPipelineMTL.mm rename to src/dawn/native/metal/RenderPipelineMTL.mm index 695684c5e0..ac200028e5 100644 --- a/src/dawn_native/metal/RenderPipelineMTL.mm +++ b/src/dawn/native/metal/RenderPipelineMTL.mm @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/RenderPipelineMTL.h" +#include "dawn/native/metal/RenderPipelineMTL.h" -#include "dawn_native/CreatePipelineAsyncTask.h" -#include "dawn_native/VertexFormat.h" -#include "dawn_native/metal/DeviceMTL.h" -#include "dawn_native/metal/PipelineLayoutMTL.h" -#include "dawn_native/metal/ShaderModuleMTL.h" -#include "dawn_native/metal/TextureMTL.h" -#include "dawn_native/metal/UtilsMetal.h" +#include "dawn/native/CreatePipelineAsyncTask.h" +#include "dawn/native/VertexFormat.h" +#include "dawn/native/metal/DeviceMTL.h" +#include "dawn/native/metal/PipelineLayoutMTL.h" +#include "dawn/native/metal/ShaderModuleMTL.h" +#include "dawn/native/metal/TextureMTL.h" +#include "dawn/native/metal/UtilsMetal.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/SamplerMTL.h b/src/dawn/native/metal/SamplerMTL.h similarity index 97% rename from src/dawn_native/metal/SamplerMTL.h rename to src/dawn/native/metal/SamplerMTL.h index 159d04acca..166fbe4117 100644 --- a/src/dawn_native/metal/SamplerMTL.h +++ b/src/dawn/native/metal/SamplerMTL.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_METAL_SAMPLERMTL_H_ #define DAWNNATIVE_METAL_SAMPLERMTL_H_ -#include "dawn_native/Sampler.h" +#include "dawn/native/Sampler.h" #include "dawn/common/NSRef.h" diff --git a/src/dawn_native/metal/SamplerMTL.mm b/src/dawn/native/metal/SamplerMTL.mm similarity index 97% rename from src/dawn_native/metal/SamplerMTL.mm rename to src/dawn/native/metal/SamplerMTL.mm index ef9960c9bb..235b2f8204 100644 --- a/src/dawn_native/metal/SamplerMTL.mm +++ b/src/dawn/native/metal/SamplerMTL.mm @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/SamplerMTL.h" +#include "dawn/native/metal/SamplerMTL.h" -#include "dawn_native/metal/DeviceMTL.h" -#include "dawn_native/metal/UtilsMetal.h" +#include "dawn/native/metal/DeviceMTL.h" +#include "dawn/native/metal/UtilsMetal.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/ShaderModuleMTL.h b/src/dawn/native/metal/ShaderModuleMTL.h similarity index 97% rename from src/dawn_native/metal/ShaderModuleMTL.h rename to src/dawn/native/metal/ShaderModuleMTL.h index 00003be1ef..0188bb17f1 100644 --- a/src/dawn_native/metal/ShaderModuleMTL.h +++ b/src/dawn/native/metal/ShaderModuleMTL.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_METAL_SHADERMODULEMTL_H_ #define DAWNNATIVE_METAL_SHADERMODULEMTL_H_ -#include "dawn_native/ShaderModule.h" +#include "dawn/native/ShaderModule.h" #include "dawn/common/NSRef.h" -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" #import diff --git a/src/dawn_native/metal/ShaderModuleMTL.mm b/src/dawn/native/metal/ShaderModuleMTL.mm similarity index 97% rename from src/dawn_native/metal/ShaderModuleMTL.mm rename to src/dawn/native/metal/ShaderModuleMTL.mm index 1d9e6822c3..79a705dbc9 100644 --- a/src/dawn_native/metal/ShaderModuleMTL.mm +++ b/src/dawn/native/metal/ShaderModuleMTL.mm @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/ShaderModuleMTL.h" +#include "dawn/native/metal/ShaderModuleMTL.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/TintUtils.h" +#include "dawn/native/metal/DeviceMTL.h" +#include "dawn/native/metal/PipelineLayoutMTL.h" +#include "dawn/native/metal/RenderPipelineMTL.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/TintUtils.h" -#include "dawn_native/metal/DeviceMTL.h" -#include "dawn_native/metal/PipelineLayoutMTL.h" -#include "dawn_native/metal/RenderPipelineMTL.h" #include diff --git a/src/dawn_native/metal/StagingBufferMTL.h b/src/dawn/native/metal/StagingBufferMTL.h similarity index 96% rename from src/dawn_native/metal/StagingBufferMTL.h rename to src/dawn/native/metal/StagingBufferMTL.h index 03a9492c8c..4400598db1 100644 --- a/src/dawn_native/metal/StagingBufferMTL.h +++ b/src/dawn/native/metal/StagingBufferMTL.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_STAGINGBUFFERMETAL_H_ #define DAWNNATIVE_STAGINGBUFFERMETAL_H_ -#include "dawn_native/StagingBuffer.h" +#include "dawn/native/StagingBuffer.h" #include "dawn/common/NSRef.h" diff --git a/src/dawn_native/metal/StagingBufferMTL.mm b/src/dawn/native/metal/StagingBufferMTL.mm similarity index 94% rename from src/dawn_native/metal/StagingBufferMTL.mm rename to src/dawn/native/metal/StagingBufferMTL.mm index 6820e58571..a3fd91ff3a 100644 --- a/src/dawn_native/metal/StagingBufferMTL.mm +++ b/src/dawn/native/metal/StagingBufferMTL.mm @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/StagingBufferMTL.h" -#include "dawn_native/metal/DeviceMTL.h" +#include "dawn/native/metal/StagingBufferMTL.h" +#include "dawn/native/metal/DeviceMTL.h" namespace dawn::native::metal { diff --git a/src/dawn_native/metal/SwapChainMTL.h b/src/dawn/native/metal/SwapChainMTL.h similarity index 98% rename from src/dawn_native/metal/SwapChainMTL.h rename to src/dawn/native/metal/SwapChainMTL.h index 7a1f233a3d..a0f1ccc1a2 100644 --- a/src/dawn_native/metal/SwapChainMTL.h +++ b/src/dawn/native/metal/SwapChainMTL.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_METAL_SWAPCHAINMTL_H_ #define DAWNNATIVE_METAL_SWAPCHAINMTL_H_ -#include "dawn_native/SwapChain.h" +#include "dawn/native/SwapChain.h" #include "dawn/common/NSRef.h" diff --git a/src/dawn_native/metal/SwapChainMTL.mm b/src/dawn/native/metal/SwapChainMTL.mm similarity index 97% rename from src/dawn_native/metal/SwapChainMTL.mm rename to src/dawn/native/metal/SwapChainMTL.mm index cc978d77d2..0291a41aee 100644 --- a/src/dawn_native/metal/SwapChainMTL.mm +++ b/src/dawn/native/metal/SwapChainMTL.mm @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/SwapChainMTL.h" +#include "dawn/native/metal/SwapChainMTL.h" -#include "dawn_native/Surface.h" -#include "dawn_native/metal/DeviceMTL.h" -#include "dawn_native/metal/TextureMTL.h" +#include "dawn/native/Surface.h" +#include "dawn/native/metal/DeviceMTL.h" +#include "dawn/native/metal/TextureMTL.h" #include diff --git a/src/dawn_native/metal/TextureMTL.h b/src/dawn/native/metal/TextureMTL.h similarity index 98% rename from src/dawn_native/metal/TextureMTL.h rename to src/dawn/native/metal/TextureMTL.h index bb8ef8b153..0ac8103c35 100644 --- a/src/dawn_native/metal/TextureMTL.h +++ b/src/dawn/native/metal/TextureMTL.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_METAL_TEXTUREMTL_H_ #define DAWNNATIVE_METAL_TEXTUREMTL_H_ -#include "dawn_native/Texture.h" +#include "dawn/native/Texture.h" #include "dawn/common/NSRef.h" -#include "dawn_native/DawnNative.h" +#include "dawn/native/DawnNative.h" #include #import diff --git a/src/dawn_native/metal/TextureMTL.mm b/src/dawn/native/metal/TextureMTL.mm similarity index 99% rename from src/dawn_native/metal/TextureMTL.mm rename to src/dawn/native/metal/TextureMTL.mm index be4fbab2ad..4ce83d7c58 100644 --- a/src/dawn_native/metal/TextureMTL.mm +++ b/src/dawn/native/metal/TextureMTL.mm @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/TextureMTL.h" +#include "dawn/native/metal/TextureMTL.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" #include "dawn/common/Platform.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/EnumMaskIterator.h" -#include "dawn_native/metal/DeviceMTL.h" -#include "dawn_native/metal/StagingBufferMTL.h" -#include "dawn_native/metal/UtilsMetal.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/EnumMaskIterator.h" +#include "dawn/native/metal/DeviceMTL.h" +#include "dawn/native/metal/StagingBufferMTL.h" +#include "dawn/native/metal/UtilsMetal.h" #include diff --git a/src/dawn_native/metal/UtilsMetal.h b/src/dawn/native/metal/UtilsMetal.h similarity index 95% rename from src/dawn_native/metal/UtilsMetal.h rename to src/dawn/native/metal/UtilsMetal.h index ef993a44b0..5c4ae9c31c 100644 --- a/src/dawn_native/metal/UtilsMetal.h +++ b/src/dawn/native/metal/UtilsMetal.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_METAL_UTILSMETAL_H_ #define DAWNNATIVE_METAL_UTILSMETAL_H_ -#include "dawn_native/dawn_platform.h" -#include "dawn_native/metal/DeviceMTL.h" -#include "dawn_native/metal/ShaderModuleMTL.h" -#include "dawn_native/metal/TextureMTL.h" +#include "dawn/native/dawn_platform.h" +#include "dawn/native/metal/DeviceMTL.h" +#include "dawn/native/metal/ShaderModuleMTL.h" +#include "dawn/native/metal/TextureMTL.h" #import diff --git a/src/dawn_native/metal/UtilsMetal.mm b/src/dawn/native/metal/UtilsMetal.mm similarity index 98% rename from src/dawn_native/metal/UtilsMetal.mm rename to src/dawn/native/metal/UtilsMetal.mm index 82286ddb23..e2e0ba3357 100644 --- a/src/dawn_native/metal/UtilsMetal.mm +++ b/src/dawn/native/metal/UtilsMetal.mm @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/metal/UtilsMetal.h" -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/Pipeline.h" -#include "dawn_native/ShaderModule.h" +#include "dawn/native/metal/UtilsMetal.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/Pipeline.h" +#include "dawn/native/ShaderModule.h" #include "dawn/common/Assert.h" diff --git a/src/dawn_native/null/DeviceNull.cpp b/src/dawn/native/null/DeviceNull.cpp similarity index 98% rename from src/dawn_native/null/DeviceNull.cpp rename to src/dawn/native/null/DeviceNull.cpp index 1141be3eba..17942933b5 100644 --- a/src/dawn_native/null/DeviceNull.cpp +++ b/src/dawn/native/null/DeviceNull.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/null/DeviceNull.h" +#include "dawn/native/null/DeviceNull.h" -#include "dawn_native/BackendConnection.h" -#include "dawn_native/Commands.h" -#include "dawn_native/ErrorData.h" -#include "dawn_native/Instance.h" -#include "dawn_native/Surface.h" +#include "dawn/native/BackendConnection.h" +#include "dawn/native/Commands.h" +#include "dawn/native/ErrorData.h" +#include "dawn/native/Instance.h" +#include "dawn/native/Surface.h" namespace dawn::native::null { diff --git a/src/dawn_native/null/DeviceNull.h b/src/dawn/native/null/DeviceNull.h similarity index 94% rename from src/dawn_native/null/DeviceNull.h rename to src/dawn/native/null/DeviceNull.h index 9052cfd456..102d55c4d0 100644 --- a/src/dawn_native/null/DeviceNull.h +++ b/src/dawn/native/null/DeviceNull.h @@ -15,26 +15,26 @@ #ifndef DAWNNATIVE_NULL_DEVICENULL_H_ #define DAWNNATIVE_NULL_DEVICENULL_H_ -#include "dawn_native/Adapter.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/ComputePipeline.h" -#include "dawn_native/Device.h" -#include "dawn_native/PipelineLayout.h" -#include "dawn_native/QuerySet.h" -#include "dawn_native/Queue.h" -#include "dawn_native/RenderPipeline.h" -#include "dawn_native/RingBufferAllocator.h" -#include "dawn_native/Sampler.h" -#include "dawn_native/ShaderModule.h" -#include "dawn_native/StagingBuffer.h" -#include "dawn_native/SwapChain.h" -#include "dawn_native/Texture.h" -#include "dawn_native/ToBackend.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/Adapter.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/ComputePipeline.h" +#include "dawn/native/Device.h" +#include "dawn/native/PipelineLayout.h" +#include "dawn/native/QuerySet.h" +#include "dawn/native/Queue.h" +#include "dawn/native/RenderPipeline.h" +#include "dawn/native/RingBufferAllocator.h" +#include "dawn/native/Sampler.h" +#include "dawn/native/ShaderModule.h" +#include "dawn/native/StagingBuffer.h" +#include "dawn/native/SwapChain.h" +#include "dawn/native/Texture.h" +#include "dawn/native/ToBackend.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native::null { diff --git a/src/dawn_native/null/NullBackend.cpp b/src/dawn/native/null/NullBackend.cpp similarity index 93% rename from src/dawn_native/null/NullBackend.cpp rename to src/dawn/native/null/NullBackend.cpp index b881602d68..43637cd788 100644 --- a/src/dawn_native/null/NullBackend.cpp +++ b/src/dawn/native/null/NullBackend.cpp @@ -15,10 +15,10 @@ // NullBackend.cpp: contains the definition of symbols exported by NullBackend.h so that they // can be compiled twice: once export (shared library), once not exported (static library) -#include "dawn_native/NullBackend.h" +#include "dawn/native/NullBackend.h" #include "dawn/common/SwapChainUtils.h" -#include "dawn_native/null/DeviceNull.h" +#include "dawn/native/null/DeviceNull.h" namespace dawn::native::null { diff --git a/src/dawn_native/opengl/BackendGL.cpp b/src/dawn/native/opengl/BackendGL.cpp similarity index 98% rename from src/dawn_native/opengl/BackendGL.cpp rename to src/dawn/native/opengl/BackendGL.cpp index 8caec6a93e..ed8f15b675 100644 --- a/src/dawn_native/opengl/BackendGL.cpp +++ b/src/dawn/native/opengl/BackendGL.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/BackendGL.h" +#include "dawn/native/opengl/BackendGL.h" #include "dawn/common/GPUInfo.h" #include "dawn/common/Log.h" -#include "dawn_native/Instance.h" -#include "dawn_native/OpenGLBackend.h" -#include "dawn_native/opengl/DeviceGL.h" +#include "dawn/native/Instance.h" +#include "dawn/native/OpenGLBackend.h" +#include "dawn/native/opengl/DeviceGL.h" #include diff --git a/src/dawn_native/opengl/BackendGL.h b/src/dawn/native/opengl/BackendGL.h similarity index 96% rename from src/dawn_native/opengl/BackendGL.h rename to src/dawn/native/opengl/BackendGL.h index 2e381735c7..12e7b47fa8 100644 --- a/src/dawn_native/opengl/BackendGL.h +++ b/src/dawn/native/opengl/BackendGL.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_OPENGL_BACKENDGL_H_ #define DAWNNATIVE_OPENGL_BACKENDGL_H_ -#include "dawn_native/BackendConnection.h" +#include "dawn/native/BackendConnection.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/BindGroupGL.cpp b/src/dawn/native/opengl/BindGroupGL.cpp similarity index 93% rename from src/dawn_native/opengl/BindGroupGL.cpp rename to src/dawn/native/opengl/BindGroupGL.cpp index f4e4d1aece..6573a9274e 100644 --- a/src/dawn_native/opengl/BindGroupGL.cpp +++ b/src/dawn/native/opengl/BindGroupGL.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/BindGroupGL.h" +#include "dawn/native/opengl/BindGroupGL.h" -#include "dawn_native/Texture.h" -#include "dawn_native/opengl/BindGroupLayoutGL.h" -#include "dawn_native/opengl/DeviceGL.h" +#include "dawn/native/Texture.h" +#include "dawn/native/opengl/BindGroupLayoutGL.h" +#include "dawn/native/opengl/DeviceGL.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/BindGroupGL.h b/src/dawn/native/opengl/BindGroupGL.h similarity index 97% rename from src/dawn_native/opengl/BindGroupGL.h rename to src/dawn/native/opengl/BindGroupGL.h index 56b3e0e71f..9d6ccec10e 100644 --- a/src/dawn_native/opengl/BindGroupGL.h +++ b/src/dawn/native/opengl/BindGroupGL.h @@ -16,7 +16,7 @@ #define DAWNNATIVE_OPENGL_BINDGROUPGL_H_ #include "dawn/common/PlacementAllocated.h" -#include "dawn_native/BindGroup.h" +#include "dawn/native/BindGroup.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/BindGroupLayoutGL.cpp b/src/dawn/native/opengl/BindGroupLayoutGL.cpp similarity index 93% rename from src/dawn_native/opengl/BindGroupLayoutGL.cpp rename to src/dawn/native/opengl/BindGroupLayoutGL.cpp index bb14bec931..1cc1474989 100644 --- a/src/dawn_native/opengl/BindGroupLayoutGL.cpp +++ b/src/dawn/native/opengl/BindGroupLayoutGL.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/BindGroupLayoutGL.h" +#include "dawn/native/opengl/BindGroupLayoutGL.h" -#include "dawn_native/opengl/BindGroupGL.h" +#include "dawn/native/opengl/BindGroupGL.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/BindGroupLayoutGL.h b/src/dawn/native/opengl/BindGroupLayoutGL.h similarity index 97% rename from src/dawn_native/opengl/BindGroupLayoutGL.h rename to src/dawn/native/opengl/BindGroupLayoutGL.h index e247fb3958..1cb3cc267c 100644 --- a/src/dawn_native/opengl/BindGroupLayoutGL.h +++ b/src/dawn/native/opengl/BindGroupLayoutGL.h @@ -16,7 +16,7 @@ #define DAWNNATIVE_OPENGL_BINDGROUPLAYOUTGL_H_ #include "dawn/common/SlabAllocator.h" -#include "dawn_native/BindGroupLayout.h" +#include "dawn/native/BindGroupLayout.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/BufferGL.cpp b/src/dawn/native/opengl/BufferGL.cpp similarity index 98% rename from src/dawn_native/opengl/BufferGL.cpp rename to src/dawn/native/opengl/BufferGL.cpp index 294ea5ec7a..fde83bc0e4 100644 --- a/src/dawn_native/opengl/BufferGL.cpp +++ b/src/dawn/native/opengl/BufferGL.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/BufferGL.h" +#include "dawn/native/opengl/BufferGL.h" -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/opengl/DeviceGL.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/opengl/DeviceGL.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/BufferGL.h b/src/dawn/native/opengl/BufferGL.h similarity index 96% rename from src/dawn_native/opengl/BufferGL.h rename to src/dawn/native/opengl/BufferGL.h index ef81ba789d..2cd1ae6eae 100644 --- a/src/dawn_native/opengl/BufferGL.h +++ b/src/dawn/native/opengl/BufferGL.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_OPENGL_BUFFERGL_H_ #define DAWNNATIVE_OPENGL_BUFFERGL_H_ -#include "dawn_native/Buffer.h" +#include "dawn/native/Buffer.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/opengl/opengl_platform.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/CommandBufferGL.cpp b/src/dawn/native/opengl/CommandBufferGL.cpp similarity index 98% rename from src/dawn_native/opengl/CommandBufferGL.cpp rename to src/dawn/native/opengl/CommandBufferGL.cpp index 12f31c958d..4efc8839f2 100644 --- a/src/dawn_native/opengl/CommandBufferGL.cpp +++ b/src/dawn/native/opengl/CommandBufferGL.cpp @@ -12,25 +12,25 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/CommandBufferGL.h" +#include "dawn/native/opengl/CommandBufferGL.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/BindGroupTracker.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/Commands.h" -#include "dawn_native/ExternalTexture.h" -#include "dawn_native/RenderBundle.h" -#include "dawn_native/VertexFormat.h" -#include "dawn_native/opengl/BufferGL.h" -#include "dawn_native/opengl/ComputePipelineGL.h" -#include "dawn_native/opengl/DeviceGL.h" -#include "dawn_native/opengl/Forward.h" -#include "dawn_native/opengl/PersistentPipelineStateGL.h" -#include "dawn_native/opengl/PipelineLayoutGL.h" -#include "dawn_native/opengl/RenderPipelineGL.h" -#include "dawn_native/opengl/SamplerGL.h" -#include "dawn_native/opengl/TextureGL.h" -#include "dawn_native/opengl/UtilsGL.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/BindGroupTracker.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/Commands.h" +#include "dawn/native/ExternalTexture.h" +#include "dawn/native/RenderBundle.h" +#include "dawn/native/VertexFormat.h" +#include "dawn/native/opengl/BufferGL.h" +#include "dawn/native/opengl/ComputePipelineGL.h" +#include "dawn/native/opengl/DeviceGL.h" +#include "dawn/native/opengl/Forward.h" +#include "dawn/native/opengl/PersistentPipelineStateGL.h" +#include "dawn/native/opengl/PipelineLayoutGL.h" +#include "dawn/native/opengl/RenderPipelineGL.h" +#include "dawn/native/opengl/SamplerGL.h" +#include "dawn/native/opengl/TextureGL.h" +#include "dawn/native/opengl/UtilsGL.h" #include diff --git a/src/dawn_native/opengl/CommandBufferGL.h b/src/dawn/native/opengl/CommandBufferGL.h similarity index 97% rename from src/dawn_native/opengl/CommandBufferGL.h rename to src/dawn/native/opengl/CommandBufferGL.h index 2caf707da1..e0f3193c53 100644 --- a/src/dawn_native/opengl/CommandBufferGL.h +++ b/src/dawn/native/opengl/CommandBufferGL.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_OPENGL_COMMANDBUFFERGL_H_ #define DAWNNATIVE_OPENGL_COMMANDBUFFERGL_H_ -#include "dawn_native/CommandBuffer.h" +#include "dawn/native/CommandBuffer.h" namespace dawn::native { struct BeginRenderPassCmd; diff --git a/src/dawn_native/opengl/ComputePipelineGL.cpp b/src/dawn/native/opengl/ComputePipelineGL.cpp similarity index 93% rename from src/dawn_native/opengl/ComputePipelineGL.cpp rename to src/dawn/native/opengl/ComputePipelineGL.cpp index 513972efbc..b53541156c 100644 --- a/src/dawn_native/opengl/ComputePipelineGL.cpp +++ b/src/dawn/native/opengl/ComputePipelineGL.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/ComputePipelineGL.h" +#include "dawn/native/opengl/ComputePipelineGL.h" -#include "dawn_native/opengl/DeviceGL.h" +#include "dawn/native/opengl/DeviceGL.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/ComputePipelineGL.h b/src/dawn/native/opengl/ComputePipelineGL.h similarity index 90% rename from src/dawn_native/opengl/ComputePipelineGL.h rename to src/dawn/native/opengl/ComputePipelineGL.h index 61b9ac3253..23be225d07 100644 --- a/src/dawn_native/opengl/ComputePipelineGL.h +++ b/src/dawn/native/opengl/ComputePipelineGL.h @@ -15,11 +15,11 @@ #ifndef DAWNNATIVE_OPENGL_COMPUTEPIPELINEGL_H_ #define DAWNNATIVE_OPENGL_COMPUTEPIPELINEGL_H_ -#include "dawn_native/ComputePipeline.h" +#include "dawn/native/ComputePipeline.h" -#include "dawn_native/opengl/PipelineGL.h" +#include "dawn/native/opengl/PipelineGL.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/opengl/opengl_platform.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/DeviceGL.cpp b/src/dawn/native/opengl/DeviceGL.cpp similarity index 94% rename from src/dawn_native/opengl/DeviceGL.cpp rename to src/dawn/native/opengl/DeviceGL.cpp index 438cb45bc5..00222d1a3c 100644 --- a/src/dawn_native/opengl/DeviceGL.cpp +++ b/src/dawn/native/opengl/DeviceGL.cpp @@ -12,25 +12,25 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/DeviceGL.h" +#include "dawn/native/opengl/DeviceGL.h" -#include "dawn_native/BackendConnection.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/ErrorData.h" -#include "dawn_native/StagingBuffer.h" -#include "dawn_native/opengl/BindGroupGL.h" -#include "dawn_native/opengl/BindGroupLayoutGL.h" -#include "dawn_native/opengl/BufferGL.h" -#include "dawn_native/opengl/CommandBufferGL.h" -#include "dawn_native/opengl/ComputePipelineGL.h" -#include "dawn_native/opengl/PipelineLayoutGL.h" -#include "dawn_native/opengl/QuerySetGL.h" -#include "dawn_native/opengl/QueueGL.h" -#include "dawn_native/opengl/RenderPipelineGL.h" -#include "dawn_native/opengl/SamplerGL.h" -#include "dawn_native/opengl/ShaderModuleGL.h" -#include "dawn_native/opengl/SwapChainGL.h" -#include "dawn_native/opengl/TextureGL.h" +#include "dawn/native/BackendConnection.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/ErrorData.h" +#include "dawn/native/StagingBuffer.h" +#include "dawn/native/opengl/BindGroupGL.h" +#include "dawn/native/opengl/BindGroupLayoutGL.h" +#include "dawn/native/opengl/BufferGL.h" +#include "dawn/native/opengl/CommandBufferGL.h" +#include "dawn/native/opengl/ComputePipelineGL.h" +#include "dawn/native/opengl/PipelineLayoutGL.h" +#include "dawn/native/opengl/QuerySetGL.h" +#include "dawn/native/opengl/QueueGL.h" +#include "dawn/native/opengl/RenderPipelineGL.h" +#include "dawn/native/opengl/SamplerGL.h" +#include "dawn/native/opengl/ShaderModuleGL.h" +#include "dawn/native/opengl/SwapChainGL.h" +#include "dawn/native/opengl/TextureGL.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/DeviceGL.h b/src/dawn/native/opengl/DeviceGL.h similarity index 95% rename from src/dawn_native/opengl/DeviceGL.h rename to src/dawn/native/opengl/DeviceGL.h index 6f6a542a08..f6c673c0cb 100644 --- a/src/dawn_native/opengl/DeviceGL.h +++ b/src/dawn/native/opengl/DeviceGL.h @@ -15,14 +15,14 @@ #ifndef DAWNNATIVE_OPENGL_DEVICEGL_H_ #define DAWNNATIVE_OPENGL_DEVICEGL_H_ -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include "dawn/common/Platform.h" -#include "dawn_native/Device.h" -#include "dawn_native/QuerySet.h" -#include "dawn_native/opengl/Forward.h" -#include "dawn_native/opengl/GLFormat.h" -#include "dawn_native/opengl/OpenGLFunctions.h" +#include "dawn/native/Device.h" +#include "dawn/native/QuerySet.h" +#include "dawn/native/opengl/Forward.h" +#include "dawn/native/opengl/GLFormat.h" +#include "dawn/native/opengl/OpenGLFunctions.h" #include diff --git a/src/dawn_native/opengl/Forward.h b/src/dawn/native/opengl/Forward.h similarity index 98% rename from src/dawn_native/opengl/Forward.h rename to src/dawn/native/opengl/Forward.h index 066bd2e429..daf2dc32e1 100644 --- a/src/dawn_native/opengl/Forward.h +++ b/src/dawn/native/opengl/Forward.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_OPENGL_FORWARD_H_ #define DAWNNATIVE_OPENGL_FORWARD_H_ -#include "dawn_native/ToBackend.h" +#include "dawn/native/ToBackend.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/GLFormat.cpp b/src/dawn/native/opengl/GLFormat.cpp similarity index 99% rename from src/dawn_native/opengl/GLFormat.cpp rename to src/dawn/native/opengl/GLFormat.cpp index cc2cf49e40..6f7e1dee19 100644 --- a/src/dawn_native/opengl/GLFormat.cpp +++ b/src/dawn/native/opengl/GLFormat.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/GLFormat.h" +#include "dawn/native/opengl/GLFormat.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/GLFormat.h b/src/dawn/native/opengl/GLFormat.h similarity index 94% rename from src/dawn_native/opengl/GLFormat.h rename to src/dawn/native/opengl/GLFormat.h index a6c33328b0..d58f697378 100644 --- a/src/dawn_native/opengl/GLFormat.h +++ b/src/dawn/native/opengl/GLFormat.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_OPENGL_GLFORMAT_H_ #define DAWNNATIVE_OPENGL_GLFORMAT_H_ -#include "dawn_native/Format.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/Format.h" +#include "dawn/native/opengl/opengl_platform.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/NativeSwapChainImplGL.cpp b/src/dawn/native/opengl/NativeSwapChainImplGL.cpp similarity index 97% rename from src/dawn_native/opengl/NativeSwapChainImplGL.cpp rename to src/dawn/native/opengl/NativeSwapChainImplGL.cpp index 178e5d6dd5..b01e7e3b4f 100644 --- a/src/dawn_native/opengl/NativeSwapChainImplGL.cpp +++ b/src/dawn/native/opengl/NativeSwapChainImplGL.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/NativeSwapChainImplGL.h" +#include "dawn/native/opengl/NativeSwapChainImplGL.h" -#include "dawn_native/opengl/DeviceGL.h" +#include "dawn/native/opengl/DeviceGL.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/NativeSwapChainImplGL.h b/src/dawn/native/opengl/NativeSwapChainImplGL.h similarity index 93% rename from src/dawn_native/opengl/NativeSwapChainImplGL.h rename to src/dawn/native/opengl/NativeSwapChainImplGL.h index 56a25ecdbe..bd7bc9de7e 100644 --- a/src/dawn_native/opengl/NativeSwapChainImplGL.h +++ b/src/dawn/native/opengl/NativeSwapChainImplGL.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_OPENGL_NATIVESWAPCHAINIMPLGL_H_ #define DAWNNATIVE_OPENGL_NATIVESWAPCHAINIMPLGL_H_ -#include "dawn_native/OpenGLBackend.h" +#include "dawn/native/OpenGLBackend.h" -#include "dawn_native/dawn_platform.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/dawn_platform.h" +#include "dawn/native/opengl/opengl_platform.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/OWNERS b/src/dawn/native/opengl/OWNERS similarity index 100% rename from src/dawn_native/opengl/OWNERS rename to src/dawn/native/opengl/OWNERS diff --git a/src/dawn_native/opengl/OpenGLBackend.cpp b/src/dawn/native/opengl/OpenGLBackend.cpp similarity index 94% rename from src/dawn_native/opengl/OpenGLBackend.cpp rename to src/dawn/native/opengl/OpenGLBackend.cpp index b62ed63bf8..739de6258d 100644 --- a/src/dawn_native/opengl/OpenGLBackend.cpp +++ b/src/dawn/native/opengl/OpenGLBackend.cpp @@ -15,11 +15,11 @@ // OpenGLBackend.cpp: contains the definition of symbols exported by OpenGLBackend.h so that they // can be compiled twice: once export (shared library), once not exported (static library) -#include "dawn_native/OpenGLBackend.h" +#include "dawn/native/OpenGLBackend.h" #include "dawn/common/SwapChainUtils.h" -#include "dawn_native/opengl/DeviceGL.h" -#include "dawn_native/opengl/NativeSwapChainImplGL.h" +#include "dawn/native/opengl/DeviceGL.h" +#include "dawn/native/opengl/NativeSwapChainImplGL.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/OpenGLFunctions.cpp b/src/dawn/native/opengl/OpenGLFunctions.cpp similarity index 97% rename from src/dawn_native/opengl/OpenGLFunctions.cpp rename to src/dawn/native/opengl/OpenGLFunctions.cpp index d0d2e50cff..45f8354a2f 100644 --- a/src/dawn_native/opengl/OpenGLFunctions.cpp +++ b/src/dawn/native/opengl/OpenGLFunctions.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/OpenGLFunctions.h" +#include "dawn/native/opengl/OpenGLFunctions.h" #include diff --git a/src/dawn_native/opengl/OpenGLFunctions.h b/src/dawn/native/opengl/OpenGLFunctions.h similarity index 92% rename from src/dawn_native/opengl/OpenGLFunctions.h rename to src/dawn/native/opengl/OpenGLFunctions.h index 6b867357d9..3da6c860b6 100644 --- a/src/dawn_native/opengl/OpenGLFunctions.h +++ b/src/dawn/native/opengl/OpenGLFunctions.h @@ -17,8 +17,8 @@ #include -#include "dawn_native/opengl/OpenGLFunctionsBase_autogen.h" -#include "dawn_native/opengl/OpenGLVersion.h" +#include "dawn/native/opengl/OpenGLFunctionsBase_autogen.h" +#include "dawn/native/opengl/OpenGLVersion.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/OpenGLVersion.cpp b/src/dawn/native/opengl/OpenGLVersion.cpp similarity index 98% rename from src/dawn_native/opengl/OpenGLVersion.cpp rename to src/dawn/native/opengl/OpenGLVersion.cpp index 2c3eb8c989..60fffff2a6 100644 --- a/src/dawn_native/opengl/OpenGLVersion.cpp +++ b/src/dawn/native/opengl/OpenGLVersion.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/OpenGLVersion.h" +#include "dawn/native/opengl/OpenGLVersion.h" #include #include diff --git a/src/dawn_native/opengl/OpenGLVersion.h b/src/dawn/native/opengl/OpenGLVersion.h similarity index 95% rename from src/dawn_native/opengl/OpenGLVersion.h rename to src/dawn/native/opengl/OpenGLVersion.h index d489daed0c..6b1e91bba4 100644 --- a/src/dawn_native/opengl/OpenGLVersion.h +++ b/src/dawn/native/opengl/OpenGLVersion.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_OPENGL_OPENGLVERSION_H_ #define DAWNNATIVE_OPENGL_OPENGLVERSION_H_ -#include "dawn_native/opengl/OpenGLFunctionsBase_autogen.h" +#include "dawn/native/opengl/OpenGLFunctionsBase_autogen.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/PersistentPipelineStateGL.cpp b/src/dawn/native/opengl/PersistentPipelineStateGL.cpp similarity index 95% rename from src/dawn_native/opengl/PersistentPipelineStateGL.cpp rename to src/dawn/native/opengl/PersistentPipelineStateGL.cpp index 41daac55cb..446ab1adf4 100644 --- a/src/dawn_native/opengl/PersistentPipelineStateGL.cpp +++ b/src/dawn/native/opengl/PersistentPipelineStateGL.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/PersistentPipelineStateGL.h" +#include "dawn/native/opengl/PersistentPipelineStateGL.h" -#include "dawn_native/opengl/OpenGLFunctions.h" +#include "dawn/native/opengl/OpenGLFunctions.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/PersistentPipelineStateGL.h b/src/dawn/native/opengl/PersistentPipelineStateGL.h similarity index 94% rename from src/dawn_native/opengl/PersistentPipelineStateGL.h rename to src/dawn/native/opengl/PersistentPipelineStateGL.h index e17e060ddc..959e7f9ac6 100644 --- a/src/dawn_native/opengl/PersistentPipelineStateGL.h +++ b/src/dawn/native/opengl/PersistentPipelineStateGL.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_OPENGL_PERSISTENTPIPELINESTATEGL_H_ #define DAWNNATIVE_OPENGL_PERSISTENTPIPELINESTATEGL_H_ -#include "dawn_native/dawn_platform.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/dawn_platform.h" +#include "dawn/native/opengl/opengl_platform.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/PipelineGL.cpp b/src/dawn/native/opengl/PipelineGL.cpp similarity index 95% rename from src/dawn_native/opengl/PipelineGL.cpp rename to src/dawn/native/opengl/PipelineGL.cpp index ec2610a099..8890e6826c 100644 --- a/src/dawn_native/opengl/PipelineGL.cpp +++ b/src/dawn/native/opengl/PipelineGL.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/PipelineGL.h" +#include "dawn/native/opengl/PipelineGL.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Device.h" -#include "dawn_native/Pipeline.h" -#include "dawn_native/opengl/Forward.h" -#include "dawn_native/opengl/OpenGLFunctions.h" -#include "dawn_native/opengl/PipelineLayoutGL.h" -#include "dawn_native/opengl/SamplerGL.h" -#include "dawn_native/opengl/ShaderModuleGL.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Device.h" +#include "dawn/native/Pipeline.h" +#include "dawn/native/opengl/Forward.h" +#include "dawn/native/opengl/OpenGLFunctions.h" +#include "dawn/native/opengl/PipelineLayoutGL.h" +#include "dawn/native/opengl/SamplerGL.h" +#include "dawn/native/opengl/ShaderModuleGL.h" #include #include diff --git a/src/dawn_native/opengl/PipelineGL.h b/src/dawn/native/opengl/PipelineGL.h similarity index 95% rename from src/dawn_native/opengl/PipelineGL.h rename to src/dawn/native/opengl/PipelineGL.h index 7aef649cb8..9bbfffa8b0 100644 --- a/src/dawn_native/opengl/PipelineGL.h +++ b/src/dawn/native/opengl/PipelineGL.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_OPENGL_PIPELINEGL_H_ #define DAWNNATIVE_OPENGL_PIPELINEGL_H_ -#include "dawn_native/Pipeline.h" +#include "dawn/native/Pipeline.h" -#include "dawn_native/PerStage.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/PerStage.h" +#include "dawn/native/opengl/opengl_platform.h" #include diff --git a/src/dawn_native/opengl/PipelineLayoutGL.cpp b/src/dawn/native/opengl/PipelineLayoutGL.cpp similarity index 96% rename from src/dawn_native/opengl/PipelineLayoutGL.cpp rename to src/dawn/native/opengl/PipelineLayoutGL.cpp index f5f632d9e3..7dd54ab473 100644 --- a/src/dawn_native/opengl/PipelineLayoutGL.cpp +++ b/src/dawn/native/opengl/PipelineLayoutGL.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/PipelineLayoutGL.h" +#include "dawn/native/opengl/PipelineLayoutGL.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/opengl/DeviceGL.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/opengl/DeviceGL.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/PipelineLayoutGL.h b/src/dawn/native/opengl/PipelineLayoutGL.h similarity index 92% rename from src/dawn_native/opengl/PipelineLayoutGL.h rename to src/dawn/native/opengl/PipelineLayoutGL.h index dd193d8d14..f743d6a20a 100644 --- a/src/dawn_native/opengl/PipelineLayoutGL.h +++ b/src/dawn/native/opengl/PipelineLayoutGL.h @@ -15,12 +15,12 @@ #ifndef DAWNNATIVE_OPENGL_PIPELINELAYOUTGL_H_ #define DAWNNATIVE_OPENGL_PIPELINELAYOUTGL_H_ -#include "dawn_native/PipelineLayout.h" +#include "dawn/native/PipelineLayout.h" #include "dawn/common/ityp_array.h" #include "dawn/common/ityp_vector.h" -#include "dawn_native/BindingInfo.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/BindingInfo.h" +#include "dawn/native/opengl/opengl_platform.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/QuerySetGL.cpp b/src/dawn/native/opengl/QuerySetGL.cpp similarity index 90% rename from src/dawn_native/opengl/QuerySetGL.cpp rename to src/dawn/native/opengl/QuerySetGL.cpp index 8b41cc8b33..cdf98580cd 100644 --- a/src/dawn_native/opengl/QuerySetGL.cpp +++ b/src/dawn/native/opengl/QuerySetGL.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/QuerySetGL.h" +#include "dawn/native/opengl/QuerySetGL.h" -#include "dawn_native/opengl/DeviceGL.h" +#include "dawn/native/opengl/DeviceGL.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/QuerySetGL.h b/src/dawn/native/opengl/QuerySetGL.h similarity index 96% rename from src/dawn_native/opengl/QuerySetGL.h rename to src/dawn/native/opengl/QuerySetGL.h index adfa039979..1bef7c50a1 100644 --- a/src/dawn_native/opengl/QuerySetGL.h +++ b/src/dawn/native/opengl/QuerySetGL.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_OPENGL_QUERYSETGL_H_ #define DAWNNATIVE_OPENGL_QUERYSETGL_H_ -#include "dawn_native/QuerySet.h" +#include "dawn/native/QuerySet.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/QueueGL.cpp b/src/dawn/native/opengl/QueueGL.cpp similarity index 93% rename from src/dawn_native/opengl/QueueGL.cpp rename to src/dawn/native/opengl/QueueGL.cpp index 0e68558daa..541d93be48 100644 --- a/src/dawn_native/opengl/QueueGL.cpp +++ b/src/dawn/native/opengl/QueueGL.cpp @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/QueueGL.h" +#include "dawn/native/opengl/QueueGL.h" +#include "dawn/native/opengl/BufferGL.h" +#include "dawn/native/opengl/CommandBufferGL.h" +#include "dawn/native/opengl/DeviceGL.h" +#include "dawn/native/opengl/TextureGL.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/opengl/BufferGL.h" -#include "dawn_native/opengl/CommandBufferGL.h" -#include "dawn_native/opengl/DeviceGL.h" -#include "dawn_native/opengl/TextureGL.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/QueueGL.h b/src/dawn/native/opengl/QueueGL.h similarity index 97% rename from src/dawn_native/opengl/QueueGL.h rename to src/dawn/native/opengl/QueueGL.h index f0d997da46..f83278df1b 100644 --- a/src/dawn_native/opengl/QueueGL.h +++ b/src/dawn/native/opengl/QueueGL.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_OPENGL_QUEUEGL_H_ #define DAWNNATIVE_OPENGL_QUEUEGL_H_ -#include "dawn_native/Queue.h" +#include "dawn/native/Queue.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/RenderPipelineGL.cpp b/src/dawn/native/opengl/RenderPipelineGL.cpp similarity index 98% rename from src/dawn_native/opengl/RenderPipelineGL.cpp rename to src/dawn/native/opengl/RenderPipelineGL.cpp index 26b8521389..5e4ddce6e7 100644 --- a/src/dawn_native/opengl/RenderPipelineGL.cpp +++ b/src/dawn/native/opengl/RenderPipelineGL.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/RenderPipelineGL.h" +#include "dawn/native/opengl/RenderPipelineGL.h" -#include "dawn_native/opengl/DeviceGL.h" -#include "dawn_native/opengl/Forward.h" -#include "dawn_native/opengl/PersistentPipelineStateGL.h" -#include "dawn_native/opengl/UtilsGL.h" +#include "dawn/native/opengl/DeviceGL.h" +#include "dawn/native/opengl/Forward.h" +#include "dawn/native/opengl/PersistentPipelineStateGL.h" +#include "dawn/native/opengl/UtilsGL.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/RenderPipelineGL.h b/src/dawn/native/opengl/RenderPipelineGL.h similarity index 93% rename from src/dawn_native/opengl/RenderPipelineGL.h rename to src/dawn/native/opengl/RenderPipelineGL.h index 6c49143bea..1ee3f81661 100644 --- a/src/dawn_native/opengl/RenderPipelineGL.h +++ b/src/dawn/native/opengl/RenderPipelineGL.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_OPENGL_RENDERPIPELINEGL_H_ #define DAWNNATIVE_OPENGL_RENDERPIPELINEGL_H_ -#include "dawn_native/RenderPipeline.h" +#include "dawn/native/RenderPipeline.h" -#include "dawn_native/opengl/PipelineGL.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/opengl/PipelineGL.h" +#include "dawn/native/opengl/opengl_platform.h" #include diff --git a/src/dawn_native/opengl/SamplerGL.cpp b/src/dawn/native/opengl/SamplerGL.cpp similarity index 97% rename from src/dawn_native/opengl/SamplerGL.cpp rename to src/dawn/native/opengl/SamplerGL.cpp index 52bb5a1bea..7790530570 100644 --- a/src/dawn_native/opengl/SamplerGL.cpp +++ b/src/dawn/native/opengl/SamplerGL.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/SamplerGL.h" +#include "dawn/native/opengl/SamplerGL.h" #include "dawn/common/Assert.h" -#include "dawn_native/opengl/DeviceGL.h" -#include "dawn_native/opengl/UtilsGL.h" +#include "dawn/native/opengl/DeviceGL.h" +#include "dawn/native/opengl/UtilsGL.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/SamplerGL.h b/src/dawn/native/opengl/SamplerGL.h similarity index 94% rename from src/dawn_native/opengl/SamplerGL.h rename to src/dawn/native/opengl/SamplerGL.h index 1e5c597351..5d07ecb750 100644 --- a/src/dawn_native/opengl/SamplerGL.h +++ b/src/dawn/native/opengl/SamplerGL.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_OPENGL_SAMPLERGL_H_ #define DAWNNATIVE_OPENGL_SAMPLERGL_H_ -#include "dawn_native/Sampler.h" +#include "dawn/native/Sampler.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/opengl/opengl_platform.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/ShaderModuleGL.cpp b/src/dawn/native/opengl/ShaderModuleGL.cpp similarity index 98% rename from src/dawn_native/opengl/ShaderModuleGL.cpp rename to src/dawn/native/opengl/ShaderModuleGL.cpp index f9e18cd1cb..bdafcc6e7f 100644 --- a/src/dawn_native/opengl/ShaderModuleGL.cpp +++ b/src/dawn/native/opengl/ShaderModuleGL.cpp @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/ShaderModuleGL.h" +#include "dawn/native/opengl/ShaderModuleGL.h" #include "dawn/common/Assert.h" #include "dawn/common/Platform.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/SpirvValidation.h" +#include "dawn/native/TintUtils.h" +#include "dawn/native/opengl/DeviceGL.h" +#include "dawn/native/opengl/PipelineLayoutGL.h" +#include "dawn/native/opengl/SpirvUtils.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/SpirvValidation.h" -#include "dawn_native/TintUtils.h" -#include "dawn_native/opengl/DeviceGL.h" -#include "dawn_native/opengl/PipelineLayoutGL.h" -#include "dawn_native/opengl/SpirvUtils.h" #include diff --git a/src/dawn_native/opengl/ShaderModuleGL.h b/src/dawn/native/opengl/ShaderModuleGL.h similarity index 97% rename from src/dawn_native/opengl/ShaderModuleGL.h rename to src/dawn/native/opengl/ShaderModuleGL.h index 6cadf82e6e..4fd178bfee 100644 --- a/src/dawn_native/opengl/ShaderModuleGL.h +++ b/src/dawn/native/opengl/ShaderModuleGL.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_OPENGL_SHADERMODULEGL_H_ #define DAWNNATIVE_OPENGL_SHADERMODULEGL_H_ -#include "dawn_native/ShaderModule.h" +#include "dawn/native/ShaderModule.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/opengl/opengl_platform.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/SpirvUtils.cpp b/src/dawn/native/opengl/SpirvUtils.cpp similarity index 99% rename from src/dawn_native/opengl/SpirvUtils.cpp rename to src/dawn/native/opengl/SpirvUtils.cpp index 2864791f3d..e1861bb99d 100644 --- a/src/dawn_native/opengl/SpirvUtils.cpp +++ b/src/dawn/native/opengl/SpirvUtils.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/SpirvUtils.h" +#include "dawn/native/opengl/SpirvUtils.h" namespace dawn::native { diff --git a/src/dawn_native/opengl/SpirvUtils.h b/src/dawn/native/opengl/SpirvUtils.h similarity index 93% rename from src/dawn_native/opengl/SpirvUtils.h rename to src/dawn/native/opengl/SpirvUtils.h index 15ea9c5255..2bdaff5b4c 100644 --- a/src/dawn_native/opengl/SpirvUtils.h +++ b/src/dawn/native/opengl/SpirvUtils.h @@ -18,10 +18,10 @@ #ifndef DAWNNATIVE_OPENGL_SPIRV_UTILS_H_ #define DAWNNATIVE_OPENGL_SPIRV_UTILS_H_ -#include "dawn_native/Format.h" -#include "dawn_native/PerStage.h" -#include "dawn_native/VertexFormat.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/Format.h" +#include "dawn/native/PerStage.h" +#include "dawn/native/VertexFormat.h" +#include "dawn/native/dawn_platform.h" #include diff --git a/src/dawn_native/opengl/SwapChainGL.cpp b/src/dawn/native/opengl/SwapChainGL.cpp similarity index 90% rename from src/dawn_native/opengl/SwapChainGL.cpp rename to src/dawn/native/opengl/SwapChainGL.cpp index 551569cad9..e59bb9ff8d 100644 --- a/src/dawn_native/opengl/SwapChainGL.cpp +++ b/src/dawn/native/opengl/SwapChainGL.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/SwapChainGL.h" +#include "dawn/native/opengl/SwapChainGL.h" -#include "dawn_native/opengl/DeviceGL.h" -#include "dawn_native/opengl/Forward.h" -#include "dawn_native/opengl/TextureGL.h" +#include "dawn/native/opengl/DeviceGL.h" +#include "dawn/native/opengl/Forward.h" +#include "dawn/native/opengl/TextureGL.h" #include diff --git a/src/dawn_native/opengl/SwapChainGL.h b/src/dawn/native/opengl/SwapChainGL.h similarity index 93% rename from src/dawn_native/opengl/SwapChainGL.h rename to src/dawn/native/opengl/SwapChainGL.h index d0dda2d65c..2c6c91a842 100644 --- a/src/dawn_native/opengl/SwapChainGL.h +++ b/src/dawn/native/opengl/SwapChainGL.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_OPENGL_SWAPCHAINGL_H_ #define DAWNNATIVE_OPENGL_SWAPCHAINGL_H_ -#include "dawn_native/SwapChain.h" +#include "dawn/native/SwapChain.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/opengl/opengl_platform.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/TextureGL.cpp b/src/dawn/native/opengl/TextureGL.cpp similarity index 99% rename from src/dawn_native/opengl/TextureGL.cpp rename to src/dawn/native/opengl/TextureGL.cpp index ccddd7c974..6f65f9e7e2 100644 --- a/src/dawn_native/opengl/TextureGL.cpp +++ b/src/dawn/native/opengl/TextureGL.cpp @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/TextureGL.h" +#include "dawn/native/opengl/TextureGL.h" #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" -#include "dawn_native/EnumMaskIterator.h" -#include "dawn_native/opengl/BufferGL.h" -#include "dawn_native/opengl/CommandBufferGL.h" -#include "dawn_native/opengl/DeviceGL.h" -#include "dawn_native/opengl/UtilsGL.h" +#include "dawn/native/EnumMaskIterator.h" +#include "dawn/native/opengl/BufferGL.h" +#include "dawn/native/opengl/CommandBufferGL.h" +#include "dawn/native/opengl/DeviceGL.h" +#include "dawn/native/opengl/UtilsGL.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/TextureGL.h b/src/dawn/native/opengl/TextureGL.h similarity index 96% rename from src/dawn_native/opengl/TextureGL.h rename to src/dawn/native/opengl/TextureGL.h index 729df6023b..74b34b9b3b 100644 --- a/src/dawn_native/opengl/TextureGL.h +++ b/src/dawn/native/opengl/TextureGL.h @@ -15,9 +15,9 @@ #ifndef DAWNNATIVE_OPENGL_TEXTUREGL_H_ #define DAWNNATIVE_OPENGL_TEXTUREGL_H_ -#include "dawn_native/Texture.h" +#include "dawn/native/Texture.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/opengl/opengl_platform.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/UtilsGL.cpp b/src/dawn/native/opengl/UtilsGL.cpp similarity index 97% rename from src/dawn_native/opengl/UtilsGL.cpp rename to src/dawn/native/opengl/UtilsGL.cpp index 8a6b13b921..ec94704398 100644 --- a/src/dawn_native/opengl/UtilsGL.cpp +++ b/src/dawn/native/opengl/UtilsGL.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/UtilsGL.h" +#include "dawn/native/opengl/UtilsGL.h" #include "dawn/common/Assert.h" diff --git a/src/dawn_native/opengl/UtilsGL.h b/src/dawn/native/opengl/UtilsGL.h similarity index 91% rename from src/dawn_native/opengl/UtilsGL.h rename to src/dawn/native/opengl/UtilsGL.h index cd57a9e60a..90869800ef 100644 --- a/src/dawn_native/opengl/UtilsGL.h +++ b/src/dawn/native/opengl/UtilsGL.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_OPENGL_UTILSGL_H_ #define DAWNNATIVE_OPENGL_UTILSGL_H_ -#include "dawn_native/dawn_platform.h" -#include "dawn_native/opengl/opengl_platform.h" +#include "dawn/native/dawn_platform.h" +#include "dawn/native/opengl/opengl_platform.h" namespace dawn::native::opengl { diff --git a/src/dawn_native/opengl/opengl_platform.h b/src/dawn/native/opengl/opengl_platform.h similarity index 91% rename from src/dawn_native/opengl/opengl_platform.h rename to src/dawn/native/opengl/opengl_platform.h index 783f6e48ca..04d91261f0 100644 --- a/src/dawn_native/opengl/opengl_platform.h +++ b/src/dawn/native/opengl/opengl_platform.h @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/opengl/opengl_platform_autogen.h" +#include "dawn/native/opengl/opengl_platform_autogen.h" diff --git a/src/dawn_native/opengl/supported_extensions.json b/src/dawn/native/opengl/supported_extensions.json similarity index 100% rename from src/dawn_native/opengl/supported_extensions.json rename to src/dawn/native/opengl/supported_extensions.json diff --git a/src/dawn_native/utils/WGPUHelpers.cpp b/src/dawn/native/utils/WGPUHelpers.cpp similarity index 95% rename from src/dawn_native/utils/WGPUHelpers.cpp rename to src/dawn/native/utils/WGPUHelpers.cpp index 10933f6f67..a7ab910e51 100644 --- a/src/dawn_native/utils/WGPUHelpers.cpp +++ b/src/dawn/native/utils/WGPUHelpers.cpp @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/utils/WGPUHelpers.h" +#include "dawn/native/utils/WGPUHelpers.h" #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" -#include "dawn_native/BindGroup.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/Device.h" -#include "dawn_native/PipelineLayout.h" -#include "dawn_native/Queue.h" -#include "dawn_native/Sampler.h" -#include "dawn_native/ShaderModule.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/Device.h" +#include "dawn/native/PipelineLayout.h" +#include "dawn/native/Queue.h" +#include "dawn/native/Sampler.h" +#include "dawn/native/ShaderModule.h" #include #include diff --git a/src/dawn_native/utils/WGPUHelpers.h b/src/dawn/native/utils/WGPUHelpers.h similarity index 98% rename from src/dawn_native/utils/WGPUHelpers.h rename to src/dawn/native/utils/WGPUHelpers.h index f58128f030..6e1fad2eba 100644 --- a/src/dawn_native/utils/WGPUHelpers.h +++ b/src/dawn/native/utils/WGPUHelpers.h @@ -15,14 +15,14 @@ #ifndef DAWNNATIVE_UTILS_WGPUHELPERS_H_ #define DAWNNATIVE_UTILS_WGPUHELPERS_H_ -#include +#include #include #include #include #include "dawn/common/RefCounted.h" -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" namespace dawn::native::utils { diff --git a/src/dawn_native/vulkan/AdapterVk.cpp b/src/dawn/native/vulkan/AdapterVk.cpp similarity index 99% rename from src/dawn_native/vulkan/AdapterVk.cpp rename to src/dawn/native/vulkan/AdapterVk.cpp index bf9cb8ef50..6957a39406 100644 --- a/src/dawn_native/vulkan/AdapterVk.cpp +++ b/src/dawn/native/vulkan/AdapterVk.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/AdapterVk.h" +#include "dawn/native/vulkan/AdapterVk.h" -#include "dawn_native/Limits.h" -#include "dawn_native/vulkan/BackendVk.h" -#include "dawn_native/vulkan/DeviceVk.h" +#include "dawn/native/Limits.h" +#include "dawn/native/vulkan/BackendVk.h" +#include "dawn/native/vulkan/DeviceVk.h" #include "dawn/common/GPUInfo.h" diff --git a/src/dawn_native/vulkan/AdapterVk.h b/src/dawn/native/vulkan/AdapterVk.h similarity index 96% rename from src/dawn_native/vulkan/AdapterVk.h rename to src/dawn/native/vulkan/AdapterVk.h index dca8f24681..2f3948ecce 100644 --- a/src/dawn_native/vulkan/AdapterVk.h +++ b/src/dawn/native/vulkan/AdapterVk.h @@ -15,11 +15,11 @@ #ifndef DAWNNATIVE_VULKAN_ADAPTERVK_H_ #define DAWNNATIVE_VULKAN_ADAPTERVK_H_ -#include "dawn_native/Adapter.h" +#include "dawn/native/Adapter.h" #include "dawn/common/RefCounted.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/vulkan/VulkanInfo.h" +#include "dawn/native/vulkan/VulkanInfo.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/BackendVk.cpp b/src/dawn/native/vulkan/BackendVk.cpp similarity index 98% rename from src/dawn_native/vulkan/BackendVk.cpp rename to src/dawn/native/vulkan/BackendVk.cpp index d7c8548827..fb4555c6c1 100644 --- a/src/dawn_native/vulkan/BackendVk.cpp +++ b/src/dawn/native/vulkan/BackendVk.cpp @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/BackendVk.h" +#include "dawn/native/vulkan/BackendVk.h" #include "dawn/common/BitSetIterator.h" #include "dawn/common/Log.h" #include "dawn/common/SystemUtils.h" -#include "dawn_native/Instance.h" -#include "dawn_native/VulkanBackend.h" -#include "dawn_native/vulkan/AdapterVk.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/Instance.h" +#include "dawn/native/VulkanBackend.h" +#include "dawn/native/vulkan/AdapterVk.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" // TODO(crbug.com/dawn/283): Link against the Vulkan Loader and remove this. #if defined(DAWN_ENABLE_SWIFTSHADER) diff --git a/src/dawn_native/vulkan/BackendVk.h b/src/dawn/native/vulkan/BackendVk.h similarity index 95% rename from src/dawn_native/vulkan/BackendVk.h rename to src/dawn/native/vulkan/BackendVk.h index 437a24ee6e..2902dbb43b 100644 --- a/src/dawn_native/vulkan/BackendVk.h +++ b/src/dawn/native/vulkan/BackendVk.h @@ -15,13 +15,13 @@ #ifndef DAWNNATIVE_VULKAN_BACKENDVK_H_ #define DAWNNATIVE_VULKAN_BACKENDVK_H_ -#include "dawn_native/BackendConnection.h" +#include "dawn/native/BackendConnection.h" #include "dawn/common/DynamicLib.h" #include "dawn/common/RefCounted.h" #include "dawn/common/ityp_array.h" -#include "dawn_native/vulkan/VulkanFunctions.h" -#include "dawn_native/vulkan/VulkanInfo.h" +#include "dawn/native/vulkan/VulkanFunctions.h" +#include "dawn/native/vulkan/VulkanInfo.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/BindGroupLayoutVk.cpp b/src/dawn/native/vulkan/BindGroupLayoutVk.cpp similarity index 96% rename from src/dawn_native/vulkan/BindGroupLayoutVk.cpp rename to src/dawn/native/vulkan/BindGroupLayoutVk.cpp index 6bf07ec3e9..20a8e1bcfd 100644 --- a/src/dawn_native/vulkan/BindGroupLayoutVk.cpp +++ b/src/dawn/native/vulkan/BindGroupLayoutVk.cpp @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/BindGroupLayoutVk.h" +#include "dawn/native/vulkan/BindGroupLayoutVk.h" #include "dawn/common/BitSetIterator.h" #include "dawn/common/ityp_vector.h" -#include "dawn_native/vulkan/BindGroupVk.h" -#include "dawn_native/vulkan/DescriptorSetAllocator.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/vulkan/BindGroupVk.h" +#include "dawn/native/vulkan/DescriptorSetAllocator.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" #include diff --git a/src/dawn_native/vulkan/BindGroupLayoutVk.h b/src/dawn/native/vulkan/BindGroupLayoutVk.h similarity index 98% rename from src/dawn_native/vulkan/BindGroupLayoutVk.h rename to src/dawn/native/vulkan/BindGroupLayoutVk.h index 4f670517f9..558ff7fc29 100644 --- a/src/dawn_native/vulkan/BindGroupLayoutVk.h +++ b/src/dawn/native/vulkan/BindGroupLayoutVk.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_VULKAN_BINDGROUPLAYOUTVK_H_ #define DAWNNATIVE_VULKAN_BINDGROUPLAYOUTVK_H_ -#include "dawn_native/BindGroupLayout.h" +#include "dawn/native/BindGroupLayout.h" #include "dawn/common/SlabAllocator.h" #include "dawn/common/vulkan_platform.h" diff --git a/src/dawn_native/vulkan/BindGroupVk.cpp b/src/dawn/native/vulkan/BindGroupVk.cpp similarity index 94% rename from src/dawn_native/vulkan/BindGroupVk.cpp rename to src/dawn/native/vulkan/BindGroupVk.cpp index d84acc2e92..12703f227c 100644 --- a/src/dawn_native/vulkan/BindGroupVk.cpp +++ b/src/dawn/native/vulkan/BindGroupVk.cpp @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/BindGroupVk.h" +#include "dawn/native/vulkan/BindGroupVk.h" #include "dawn/common/BitSetIterator.h" #include "dawn/common/ityp_stack_vec.h" -#include "dawn_native/ExternalTexture.h" -#include "dawn_native/vulkan/BindGroupLayoutVk.h" -#include "dawn_native/vulkan/BufferVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/SamplerVk.h" -#include "dawn_native/vulkan/TextureVk.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/ExternalTexture.h" +#include "dawn/native/vulkan/BindGroupLayoutVk.h" +#include "dawn/native/vulkan/BufferVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/SamplerVk.h" +#include "dawn/native/vulkan/TextureVk.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/BindGroupVk.h b/src/dawn/native/vulkan/BindGroupVk.h similarity index 92% rename from src/dawn_native/vulkan/BindGroupVk.h rename to src/dawn/native/vulkan/BindGroupVk.h index 2d0ef57544..100ea85291 100644 --- a/src/dawn_native/vulkan/BindGroupVk.h +++ b/src/dawn/native/vulkan/BindGroupVk.h @@ -15,12 +15,12 @@ #ifndef DAWNNATIVE_VULKAN_BINDGROUPVK_H_ #define DAWNNATIVE_VULKAN_BINDGROUPVK_H_ -#include "dawn_native/BindGroup.h" +#include "dawn/native/BindGroup.h" #include "dawn/common/PlacementAllocated.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/vulkan/BindGroupLayoutVk.h" -#include "dawn_native/vulkan/DescriptorSetAllocation.h" +#include "dawn/native/vulkan/BindGroupLayoutVk.h" +#include "dawn/native/vulkan/DescriptorSetAllocation.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/BufferVk.cpp b/src/dawn/native/vulkan/BufferVk.cpp similarity index 97% rename from src/dawn_native/vulkan/BufferVk.cpp rename to src/dawn/native/vulkan/BufferVk.cpp index 794f226912..c7e9fb02d3 100644 --- a/src/dawn_native/vulkan/BufferVk.cpp +++ b/src/dawn/native/vulkan/BufferVk.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/BufferVk.h" +#include "dawn/native/vulkan/BufferVk.h" -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/ResourceHeapVk.h" -#include "dawn_native/vulkan/ResourceMemoryAllocatorVk.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/ResourceHeapVk.h" +#include "dawn/native/vulkan/ResourceMemoryAllocatorVk.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" #include diff --git a/src/dawn_native/vulkan/BufferVk.h b/src/dawn/native/vulkan/BufferVk.h similarity index 97% rename from src/dawn_native/vulkan/BufferVk.h rename to src/dawn/native/vulkan/BufferVk.h index 548c10c83a..1f7ae74835 100644 --- a/src/dawn_native/vulkan/BufferVk.h +++ b/src/dawn/native/vulkan/BufferVk.h @@ -15,11 +15,11 @@ #ifndef DAWNNATIVE_VULKAN_BUFFERVK_H_ #define DAWNNATIVE_VULKAN_BUFFERVK_H_ -#include "dawn_native/Buffer.h" +#include "dawn/native/Buffer.h" #include "dawn/common/SerialQueue.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/ResourceMemoryAllocation.h" +#include "dawn/native/ResourceMemoryAllocation.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/CommandBufferVk.cpp b/src/dawn/native/vulkan/CommandBufferVk.cpp similarity index 98% rename from src/dawn_native/vulkan/CommandBufferVk.cpp rename to src/dawn/native/vulkan/CommandBufferVk.cpp index e3fe5b7197..1fba2b3534 100644 --- a/src/dawn_native/vulkan/CommandBufferVk.cpp +++ b/src/dawn/native/vulkan/CommandBufferVk.cpp @@ -12,29 +12,29 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/CommandBufferVk.h" +#include "dawn/native/vulkan/CommandBufferVk.h" -#include "dawn_native/BindGroupTracker.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/CommandValidation.h" -#include "dawn_native/Commands.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/EnumMaskIterator.h" -#include "dawn_native/RenderBundle.h" -#include "dawn_native/vulkan/BindGroupVk.h" -#include "dawn_native/vulkan/BufferVk.h" -#include "dawn_native/vulkan/CommandRecordingContext.h" -#include "dawn_native/vulkan/ComputePipelineVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/PipelineLayoutVk.h" -#include "dawn_native/vulkan/QuerySetVk.h" -#include "dawn_native/vulkan/RenderPassCache.h" -#include "dawn_native/vulkan/RenderPipelineVk.h" -#include "dawn_native/vulkan/StagingBufferVk.h" -#include "dawn_native/vulkan/TextureVk.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/BindGroupTracker.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/CommandValidation.h" +#include "dawn/native/Commands.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/EnumMaskIterator.h" +#include "dawn/native/RenderBundle.h" +#include "dawn/native/vulkan/BindGroupVk.h" +#include "dawn/native/vulkan/BufferVk.h" +#include "dawn/native/vulkan/CommandRecordingContext.h" +#include "dawn/native/vulkan/ComputePipelineVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/PipelineLayoutVk.h" +#include "dawn/native/vulkan/QuerySetVk.h" +#include "dawn/native/vulkan/RenderPassCache.h" +#include "dawn/native/vulkan/RenderPipelineVk.h" +#include "dawn/native/vulkan/StagingBufferVk.h" +#include "dawn/native/vulkan/TextureVk.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" #include diff --git a/src/dawn_native/vulkan/CommandBufferVk.h b/src/dawn/native/vulkan/CommandBufferVk.h similarity index 96% rename from src/dawn_native/vulkan/CommandBufferVk.h rename to src/dawn/native/vulkan/CommandBufferVk.h index 219083b009..b0d1e9cab9 100644 --- a/src/dawn_native/vulkan/CommandBufferVk.h +++ b/src/dawn/native/vulkan/CommandBufferVk.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_VULKAN_COMMANDBUFFERVK_H_ #define DAWNNATIVE_VULKAN_COMMANDBUFFERVK_H_ -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/Error.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/Error.h" #include "dawn/common/vulkan_platform.h" diff --git a/src/dawn_native/vulkan/CommandRecordingContext.h b/src/dawn/native/vulkan/CommandRecordingContext.h similarity index 97% rename from src/dawn_native/vulkan/CommandRecordingContext.h rename to src/dawn/native/vulkan/CommandRecordingContext.h index cadc22518b..44f1c90726 100644 --- a/src/dawn_native/vulkan/CommandRecordingContext.h +++ b/src/dawn/native/vulkan/CommandRecordingContext.h @@ -16,7 +16,7 @@ #include "dawn/common/vulkan_platform.h" -#include "dawn_native/vulkan/BufferVk.h" +#include "dawn/native/vulkan/BufferVk.h" namespace dawn::native::vulkan { // Used to track operations that are handled after recording. diff --git a/src/dawn_native/vulkan/ComputePipelineVk.cpp b/src/dawn/native/vulkan/ComputePipelineVk.cpp similarity index 92% rename from src/dawn_native/vulkan/ComputePipelineVk.cpp rename to src/dawn/native/vulkan/ComputePipelineVk.cpp index 6b2ae245d7..fa13e26ad0 100644 --- a/src/dawn_native/vulkan/ComputePipelineVk.cpp +++ b/src/dawn/native/vulkan/ComputePipelineVk.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/ComputePipelineVk.h" +#include "dawn/native/vulkan/ComputePipelineVk.h" -#include "dawn_native/CreatePipelineAsyncTask.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/PipelineLayoutVk.h" -#include "dawn_native/vulkan/ShaderModuleVk.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/CreatePipelineAsyncTask.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/PipelineLayoutVk.h" +#include "dawn/native/vulkan/ShaderModuleVk.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/ComputePipelineVk.h b/src/dawn/native/vulkan/ComputePipelineVk.h similarity index 95% rename from src/dawn_native/vulkan/ComputePipelineVk.h rename to src/dawn/native/vulkan/ComputePipelineVk.h index a610c899f0..ef4aeff1be 100644 --- a/src/dawn_native/vulkan/ComputePipelineVk.h +++ b/src/dawn/native/vulkan/ComputePipelineVk.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_VULKAN_COMPUTEPIPELINEVK_H_ #define DAWNNATIVE_VULKAN_COMPUTEPIPELINEVK_H_ -#include "dawn_native/ComputePipeline.h" +#include "dawn/native/ComputePipeline.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/DescriptorSetAllocation.h b/src/dawn/native/vulkan/DescriptorSetAllocation.h similarity index 100% rename from src/dawn_native/vulkan/DescriptorSetAllocation.h rename to src/dawn/native/vulkan/DescriptorSetAllocation.h diff --git a/src/dawn_native/vulkan/DescriptorSetAllocator.cpp b/src/dawn/native/vulkan/DescriptorSetAllocator.cpp similarity index 97% rename from src/dawn_native/vulkan/DescriptorSetAllocator.cpp rename to src/dawn/native/vulkan/DescriptorSetAllocator.cpp index a8fb8c37c2..0f89d61454 100644 --- a/src/dawn_native/vulkan/DescriptorSetAllocator.cpp +++ b/src/dawn/native/vulkan/DescriptorSetAllocator.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/DescriptorSetAllocator.h" +#include "dawn/native/vulkan/DescriptorSetAllocator.h" -#include "dawn_native/vulkan/BindGroupLayoutVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/vulkan/BindGroupLayoutVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/VulkanError.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/DescriptorSetAllocator.h b/src/dawn/native/vulkan/DescriptorSetAllocator.h similarity index 93% rename from src/dawn_native/vulkan/DescriptorSetAllocator.h rename to src/dawn/native/vulkan/DescriptorSetAllocator.h index d705fae845..b6cd49507d 100644 --- a/src/dawn_native/vulkan/DescriptorSetAllocator.h +++ b/src/dawn/native/vulkan/DescriptorSetAllocator.h @@ -17,10 +17,10 @@ #include "dawn/common/SerialQueue.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/Error.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/vulkan/DescriptorSetAllocation.h" +#include "dawn/native/Error.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/vulkan/DescriptorSetAllocation.h" #include #include diff --git a/src/dawn_native/vulkan/DeviceVk.cpp b/src/dawn/native/vulkan/DeviceVk.cpp similarity index 97% rename from src/dawn_native/vulkan/DeviceVk.cpp rename to src/dawn/native/vulkan/DeviceVk.cpp index 6bb6787fdd..2662817d86 100644 --- a/src/dawn_native/vulkan/DeviceVk.cpp +++ b/src/dawn/native/vulkan/DeviceVk.cpp @@ -12,35 +12,35 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/DeviceVk.h" #include "dawn/common/Platform.h" -#include "dawn_native/BackendConnection.h" -#include "dawn_native/ChainUtils_autogen.h" -#include "dawn_native/Error.h" -#include "dawn_native/ErrorData.h" -#include "dawn_native/VulkanBackend.h" -#include "dawn_native/vulkan/AdapterVk.h" -#include "dawn_native/vulkan/BackendVk.h" -#include "dawn_native/vulkan/BindGroupLayoutVk.h" -#include "dawn_native/vulkan/BindGroupVk.h" -#include "dawn_native/vulkan/BufferVk.h" -#include "dawn_native/vulkan/CommandBufferVk.h" -#include "dawn_native/vulkan/ComputePipelineVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/PipelineLayoutVk.h" -#include "dawn_native/vulkan/QuerySetVk.h" -#include "dawn_native/vulkan/QueueVk.h" -#include "dawn_native/vulkan/RenderPassCache.h" -#include "dawn_native/vulkan/RenderPipelineVk.h" -#include "dawn_native/vulkan/ResourceMemoryAllocatorVk.h" -#include "dawn_native/vulkan/SamplerVk.h" -#include "dawn_native/vulkan/ShaderModuleVk.h" -#include "dawn_native/vulkan/StagingBufferVk.h" -#include "dawn_native/vulkan/SwapChainVk.h" -#include "dawn_native/vulkan/TextureVk.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/BackendConnection.h" +#include "dawn/native/ChainUtils_autogen.h" +#include "dawn/native/Error.h" +#include "dawn/native/ErrorData.h" +#include "dawn/native/VulkanBackend.h" +#include "dawn/native/vulkan/AdapterVk.h" +#include "dawn/native/vulkan/BackendVk.h" +#include "dawn/native/vulkan/BindGroupLayoutVk.h" +#include "dawn/native/vulkan/BindGroupVk.h" +#include "dawn/native/vulkan/BufferVk.h" +#include "dawn/native/vulkan/CommandBufferVk.h" +#include "dawn/native/vulkan/ComputePipelineVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/PipelineLayoutVk.h" +#include "dawn/native/vulkan/QuerySetVk.h" +#include "dawn/native/vulkan/QueueVk.h" +#include "dawn/native/vulkan/RenderPassCache.h" +#include "dawn/native/vulkan/RenderPipelineVk.h" +#include "dawn/native/vulkan/ResourceMemoryAllocatorVk.h" +#include "dawn/native/vulkan/SamplerVk.h" +#include "dawn/native/vulkan/ShaderModuleVk.h" +#include "dawn/native/vulkan/StagingBufferVk.h" +#include "dawn/native/vulkan/SwapChainVk.h" +#include "dawn/native/vulkan/TextureVk.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/DeviceVk.h b/src/dawn/native/vulkan/DeviceVk.h similarity index 95% rename from src/dawn_native/vulkan/DeviceVk.h rename to src/dawn/native/vulkan/DeviceVk.h index 4bd86ddf62..e660cf3811 100644 --- a/src/dawn_native/vulkan/DeviceVk.h +++ b/src/dawn/native/vulkan/DeviceVk.h @@ -15,19 +15,19 @@ #ifndef DAWNNATIVE_VULKAN_DEVICEVK_H_ #define DAWNNATIVE_VULKAN_DEVICEVK_H_ -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" #include "dawn/common/SerialQueue.h" -#include "dawn_native/Commands.h" -#include "dawn_native/Device.h" -#include "dawn_native/vulkan/CommandRecordingContext.h" -#include "dawn_native/vulkan/DescriptorSetAllocator.h" -#include "dawn_native/vulkan/Forward.h" -#include "dawn_native/vulkan/VulkanFunctions.h" -#include "dawn_native/vulkan/VulkanInfo.h" +#include "dawn/native/Commands.h" +#include "dawn/native/Device.h" +#include "dawn/native/vulkan/CommandRecordingContext.h" +#include "dawn/native/vulkan/DescriptorSetAllocator.h" +#include "dawn/native/vulkan/Forward.h" +#include "dawn/native/vulkan/VulkanFunctions.h" +#include "dawn/native/vulkan/VulkanInfo.h" -#include "dawn_native/vulkan/external_memory/MemoryService.h" -#include "dawn_native/vulkan/external_semaphore/SemaphoreService.h" +#include "dawn/native/vulkan/external_memory/MemoryService.h" +#include "dawn/native/vulkan/external_semaphore/SemaphoreService.h" #include #include diff --git a/src/dawn_native/vulkan/ExternalHandle.h b/src/dawn/native/vulkan/ExternalHandle.h similarity index 100% rename from src/dawn_native/vulkan/ExternalHandle.h rename to src/dawn/native/vulkan/ExternalHandle.h diff --git a/src/dawn_native/vulkan/FencedDeleter.cpp b/src/dawn/native/vulkan/FencedDeleter.cpp similarity index 98% rename from src/dawn_native/vulkan/FencedDeleter.cpp rename to src/dawn/native/vulkan/FencedDeleter.cpp index 03a158ce14..09c91b43c3 100644 --- a/src/dawn_native/vulkan/FencedDeleter.cpp +++ b/src/dawn/native/vulkan/FencedDeleter.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/DeviceVk.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/FencedDeleter.h b/src/dawn/native/vulkan/FencedDeleter.h similarity index 98% rename from src/dawn_native/vulkan/FencedDeleter.h rename to src/dawn/native/vulkan/FencedDeleter.h index 6ed1594c8b..bd4c88a24e 100644 --- a/src/dawn_native/vulkan/FencedDeleter.h +++ b/src/dawn/native/vulkan/FencedDeleter.h @@ -17,7 +17,7 @@ #include "dawn/common/SerialQueue.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/IntegerTypes.h" +#include "dawn/native/IntegerTypes.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/Forward.h b/src/dawn/native/vulkan/Forward.h similarity index 98% rename from src/dawn_native/vulkan/Forward.h rename to src/dawn/native/vulkan/Forward.h index d01e40d545..35f6adecb9 100644 --- a/src/dawn_native/vulkan/Forward.h +++ b/src/dawn/native/vulkan/Forward.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_VULKAN_FORWARD_H_ #define DAWNNATIVE_VULKAN_FORWARD_H_ -#include "dawn_native/ToBackend.h" +#include "dawn/native/ToBackend.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/NativeSwapChainImplVk.cpp b/src/dawn/native/vulkan/NativeSwapChainImplVk.cpp similarity index 98% rename from src/dawn_native/vulkan/NativeSwapChainImplVk.cpp rename to src/dawn/native/vulkan/NativeSwapChainImplVk.cpp index 4182333074..e16ae2caec 100644 --- a/src/dawn_native/vulkan/NativeSwapChainImplVk.cpp +++ b/src/dawn/native/vulkan/NativeSwapChainImplVk.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/NativeSwapChainImplVk.h" +#include "dawn/native/vulkan/NativeSwapChainImplVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/TextureVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/TextureVk.h" #include diff --git a/src/dawn_native/vulkan/NativeSwapChainImplVk.h b/src/dawn/native/vulkan/NativeSwapChainImplVk.h similarity index 96% rename from src/dawn_native/vulkan/NativeSwapChainImplVk.h rename to src/dawn/native/vulkan/NativeSwapChainImplVk.h index 7af843f33d..529146576a 100644 --- a/src/dawn_native/vulkan/NativeSwapChainImplVk.h +++ b/src/dawn/native/vulkan/NativeSwapChainImplVk.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_VULKAN_NATIVESWAPCHAINIMPLVK_H_ #define DAWNNATIVE_VULKAN_NATIVESWAPCHAINIMPLVK_H_ -#include "dawn_native/vulkan/VulkanInfo.h" +#include "dawn/native/vulkan/VulkanInfo.h" #include "dawn/dawn_wsi.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/PipelineLayoutVk.cpp b/src/dawn/native/vulkan/PipelineLayoutVk.cpp similarity index 91% rename from src/dawn_native/vulkan/PipelineLayoutVk.cpp rename to src/dawn/native/vulkan/PipelineLayoutVk.cpp index 6a10e78fb5..245f2c9ce5 100644 --- a/src/dawn_native/vulkan/PipelineLayoutVk.cpp +++ b/src/dawn/native/vulkan/PipelineLayoutVk.cpp @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/PipelineLayoutVk.h" +#include "dawn/native/vulkan/PipelineLayoutVk.h" #include "dawn/common/BitSetIterator.h" -#include "dawn_native/vulkan/BindGroupLayoutVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/vulkan/BindGroupLayoutVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/PipelineLayoutVk.h b/src/dawn/native/vulkan/PipelineLayoutVk.h similarity index 95% rename from src/dawn_native/vulkan/PipelineLayoutVk.h rename to src/dawn/native/vulkan/PipelineLayoutVk.h index f83c5f90f2..56d51e577b 100644 --- a/src/dawn_native/vulkan/PipelineLayoutVk.h +++ b/src/dawn/native/vulkan/PipelineLayoutVk.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_VULKAN_PIPELINELAYOUTVK_H_ #define DAWNNATIVE_VULKAN_PIPELINELAYOUTVK_H_ -#include "dawn_native/PipelineLayout.h" +#include "dawn/native/PipelineLayout.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/QuerySetVk.cpp b/src/dawn/native/vulkan/QuerySetVk.cpp similarity index 95% rename from src/dawn_native/vulkan/QuerySetVk.cpp rename to src/dawn/native/vulkan/QuerySetVk.cpp index 23689b6d19..398179304b 100644 --- a/src/dawn_native/vulkan/QuerySetVk.cpp +++ b/src/dawn/native/vulkan/QuerySetVk.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/QuerySetVk.h" +#include "dawn/native/vulkan/QuerySetVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" #include "dawn/platform/DawnPlatform.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/QuerySetVk.h b/src/dawn/native/vulkan/QuerySetVk.h similarity index 97% rename from src/dawn_native/vulkan/QuerySetVk.h rename to src/dawn/native/vulkan/QuerySetVk.h index 1e5f5f5594..78a52c0ab8 100644 --- a/src/dawn_native/vulkan/QuerySetVk.h +++ b/src/dawn/native/vulkan/QuerySetVk.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_VULKAN_QUERYSETVK_H_ #define DAWNNATIVE_VULKAN_QUERYSETVK_H_ -#include "dawn_native/QuerySet.h" +#include "dawn/native/QuerySet.h" #include "dawn/common/vulkan_platform.h" diff --git a/src/dawn_native/vulkan/QueueVk.cpp b/src/dawn/native/vulkan/QueueVk.cpp similarity index 83% rename from src/dawn_native/vulkan/QueueVk.cpp rename to src/dawn/native/vulkan/QueueVk.cpp index 40edd4a17c..875b771b0d 100644 --- a/src/dawn_native/vulkan/QueueVk.cpp +++ b/src/dawn/native/vulkan/QueueVk.cpp @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/QueueVk.h" +#include "dawn/native/vulkan/QueueVk.h" #include "dawn/common/Math.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandValidation.h" +#include "dawn/native/Commands.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/vulkan/CommandBufferVk.h" +#include "dawn/native/vulkan/CommandRecordingContext.h" +#include "dawn/native/vulkan/DeviceVk.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandValidation.h" -#include "dawn_native/Commands.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/vulkan/CommandBufferVk.h" -#include "dawn_native/vulkan/CommandRecordingContext.h" -#include "dawn_native/vulkan/DeviceVk.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/QueueVk.h b/src/dawn/native/vulkan/QueueVk.h similarity index 97% rename from src/dawn_native/vulkan/QueueVk.h rename to src/dawn/native/vulkan/QueueVk.h index 5cf000c73c..a80b875ec6 100644 --- a/src/dawn_native/vulkan/QueueVk.h +++ b/src/dawn/native/vulkan/QueueVk.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_VULKAN_QUEUEVK_H_ #define DAWNNATIVE_VULKAN_QUEUEVK_H_ -#include "dawn_native/Queue.h" +#include "dawn/native/Queue.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/RenderPassCache.cpp b/src/dawn/native/vulkan/RenderPassCache.cpp similarity index 98% rename from src/dawn_native/vulkan/RenderPassCache.cpp rename to src/dawn/native/vulkan/RenderPassCache.cpp index 98424bcace..695dbd9520 100644 --- a/src/dawn_native/vulkan/RenderPassCache.cpp +++ b/src/dawn/native/vulkan/RenderPassCache.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/RenderPassCache.h" +#include "dawn/native/vulkan/RenderPassCache.h" #include "dawn/common/BitSetIterator.h" #include "dawn/common/HashUtils.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/TextureVk.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/TextureVk.h" +#include "dawn/native/vulkan/VulkanError.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/RenderPassCache.h b/src/dawn/native/vulkan/RenderPassCache.h similarity index 97% rename from src/dawn_native/vulkan/RenderPassCache.h rename to src/dawn/native/vulkan/RenderPassCache.h index 5716d1369a..aaf9fc808f 100644 --- a/src/dawn_native/vulkan/RenderPassCache.h +++ b/src/dawn/native/vulkan/RenderPassCache.h @@ -19,9 +19,9 @@ #include "dawn/common/ityp_array.h" #include "dawn/common/ityp_bitset.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/Error.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/Error.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/dawn_platform.h" #include #include diff --git a/src/dawn_native/vulkan/RenderPipelineVk.cpp b/src/dawn/native/vulkan/RenderPipelineVk.cpp similarity index 98% rename from src/dawn_native/vulkan/RenderPipelineVk.cpp rename to src/dawn/native/vulkan/RenderPipelineVk.cpp index 7db2e70562..580be6c86f 100644 --- a/src/dawn_native/vulkan/RenderPipelineVk.cpp +++ b/src/dawn/native/vulkan/RenderPipelineVk.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/RenderPipelineVk.h" +#include "dawn/native/vulkan/RenderPipelineVk.h" -#include "dawn_native/CreatePipelineAsyncTask.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/PipelineLayoutVk.h" -#include "dawn_native/vulkan/RenderPassCache.h" -#include "dawn_native/vulkan/ShaderModuleVk.h" -#include "dawn_native/vulkan/TextureVk.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/CreatePipelineAsyncTask.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/PipelineLayoutVk.h" +#include "dawn/native/vulkan/RenderPassCache.h" +#include "dawn/native/vulkan/ShaderModuleVk.h" +#include "dawn/native/vulkan/TextureVk.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/RenderPipelineVk.h b/src/dawn/native/vulkan/RenderPipelineVk.h similarity index 96% rename from src/dawn_native/vulkan/RenderPipelineVk.h rename to src/dawn/native/vulkan/RenderPipelineVk.h index 7bdfe8e529..7d87cacabb 100644 --- a/src/dawn_native/vulkan/RenderPipelineVk.h +++ b/src/dawn/native/vulkan/RenderPipelineVk.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_VULKAN_RENDERPIPELINEVK_H_ #define DAWNNATIVE_VULKAN_RENDERPIPELINEVK_H_ -#include "dawn_native/RenderPipeline.h" +#include "dawn/native/RenderPipeline.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/ResourceHeapVk.cpp b/src/dawn/native/vulkan/ResourceHeapVk.cpp similarity index 95% rename from src/dawn_native/vulkan/ResourceHeapVk.cpp rename to src/dawn/native/vulkan/ResourceHeapVk.cpp index 8e070305b4..94ce7fc934 100644 --- a/src/dawn_native/vulkan/ResourceHeapVk.cpp +++ b/src/dawn/native/vulkan/ResourceHeapVk.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/ResourceHeapVk.h" +#include "dawn/native/vulkan/ResourceHeapVk.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/ResourceHeapVk.h b/src/dawn/native/vulkan/ResourceHeapVk.h similarity index 97% rename from src/dawn_native/vulkan/ResourceHeapVk.h rename to src/dawn/native/vulkan/ResourceHeapVk.h index 25382905e7..5b822c8990 100644 --- a/src/dawn_native/vulkan/ResourceHeapVk.h +++ b/src/dawn/native/vulkan/ResourceHeapVk.h @@ -16,7 +16,7 @@ #define DAWNNATIVE_VULKAN_RESOURCEHEAPVK_H_ #include "dawn/common/vulkan_platform.h" -#include "dawn_native/ResourceHeap.h" +#include "dawn/native/ResourceHeap.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.cpp b/src/dawn/native/vulkan/ResourceMemoryAllocatorVk.cpp similarity index 97% rename from src/dawn_native/vulkan/ResourceMemoryAllocatorVk.cpp rename to src/dawn/native/vulkan/ResourceMemoryAllocatorVk.cpp index f8cb966cfe..6088ac0643 100644 --- a/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.cpp +++ b/src/dawn/native/vulkan/ResourceMemoryAllocatorVk.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/ResourceMemoryAllocatorVk.h" +#include "dawn/native/vulkan/ResourceMemoryAllocatorVk.h" #include "dawn/common/Math.h" -#include "dawn_native/BuddyMemoryAllocator.h" -#include "dawn_native/ResourceHeapAllocator.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/ResourceHeapVk.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/BuddyMemoryAllocator.h" +#include "dawn/native/ResourceHeapAllocator.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/ResourceHeapVk.h" +#include "dawn/native/vulkan/VulkanError.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.h b/src/dawn/native/vulkan/ResourceMemoryAllocatorVk.h similarity index 92% rename from src/dawn_native/vulkan/ResourceMemoryAllocatorVk.h rename to src/dawn/native/vulkan/ResourceMemoryAllocatorVk.h index b3fdeaec04..81864fd13e 100644 --- a/src/dawn_native/vulkan/ResourceMemoryAllocatorVk.h +++ b/src/dawn/native/vulkan/ResourceMemoryAllocatorVk.h @@ -17,10 +17,10 @@ #include "dawn/common/SerialQueue.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/Error.h" -#include "dawn_native/IntegerTypes.h" -#include "dawn_native/PooledResourceMemoryAllocator.h" -#include "dawn_native/ResourceMemoryAllocation.h" +#include "dawn/native/Error.h" +#include "dawn/native/IntegerTypes.h" +#include "dawn/native/PooledResourceMemoryAllocator.h" +#include "dawn/native/ResourceMemoryAllocation.h" #include #include diff --git a/src/dawn_native/vulkan/SamplerVk.cpp b/src/dawn/native/vulkan/SamplerVk.cpp similarity index 95% rename from src/dawn_native/vulkan/SamplerVk.cpp rename to src/dawn/native/vulkan/SamplerVk.cpp index 9b022046d1..c7fc1a362c 100644 --- a/src/dawn_native/vulkan/SamplerVk.cpp +++ b/src/dawn/native/vulkan/SamplerVk.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/SamplerVk.h" +#include "dawn/native/vulkan/SamplerVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/SamplerVk.h b/src/dawn/native/vulkan/SamplerVk.h similarity index 95% rename from src/dawn_native/vulkan/SamplerVk.h rename to src/dawn/native/vulkan/SamplerVk.h index c32cb111a7..1b246c99bd 100644 --- a/src/dawn_native/vulkan/SamplerVk.h +++ b/src/dawn/native/vulkan/SamplerVk.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_VULKAN_SAMPLERVK_H_ #define DAWNNATIVE_VULKAN_SAMPLERVK_H_ -#include "dawn_native/Sampler.h" +#include "dawn/native/Sampler.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/ShaderModuleVk.cpp b/src/dawn/native/vulkan/ShaderModuleVk.cpp similarity index 95% rename from src/dawn_native/vulkan/ShaderModuleVk.cpp rename to src/dawn/native/vulkan/ShaderModuleVk.cpp index 2b89f0a5ba..d0ad35b5f3 100644 --- a/src/dawn_native/vulkan/ShaderModuleVk.cpp +++ b/src/dawn/native/vulkan/ShaderModuleVk.cpp @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/ShaderModuleVk.h" +#include "dawn/native/vulkan/ShaderModuleVk.h" +#include "dawn/native/SpirvValidation.h" +#include "dawn/native/TintUtils.h" +#include "dawn/native/vulkan/BindGroupLayoutVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/PipelineLayoutVk.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/platform/tracing/TraceEvent.h" -#include "dawn_native/SpirvValidation.h" -#include "dawn_native/TintUtils.h" -#include "dawn_native/vulkan/BindGroupLayoutVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/PipelineLayoutVk.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" #include #include diff --git a/src/dawn_native/vulkan/ShaderModuleVk.h b/src/dawn/native/vulkan/ShaderModuleVk.h similarity index 97% rename from src/dawn_native/vulkan/ShaderModuleVk.h rename to src/dawn/native/vulkan/ShaderModuleVk.h index 2de986f9e9..7040b74f7f 100644 --- a/src/dawn_native/vulkan/ShaderModuleVk.h +++ b/src/dawn/native/vulkan/ShaderModuleVk.h @@ -15,10 +15,10 @@ #ifndef DAWNNATIVE_VULKAN_SHADERMODULEVK_H_ #define DAWNNATIVE_VULKAN_SHADERMODULEVK_H_ -#include "dawn_native/ShaderModule.h" +#include "dawn/native/ShaderModule.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" #include diff --git a/src/dawn_native/vulkan/StagingBufferVk.cpp b/src/dawn/native/vulkan/StagingBufferVk.cpp similarity index 89% rename from src/dawn_native/vulkan/StagingBufferVk.cpp rename to src/dawn/native/vulkan/StagingBufferVk.cpp index 58920c9c64..fb6631592e 100644 --- a/src/dawn_native/vulkan/StagingBufferVk.cpp +++ b/src/dawn/native/vulkan/StagingBufferVk.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/StagingBufferVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/ResourceHeapVk.h" -#include "dawn_native/vulkan/ResourceMemoryAllocatorVk.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/vulkan/StagingBufferVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/ResourceHeapVk.h" +#include "dawn/native/vulkan/ResourceMemoryAllocatorVk.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/StagingBufferVk.h b/src/dawn/native/vulkan/StagingBufferVk.h similarity index 93% rename from src/dawn_native/vulkan/StagingBufferVk.h rename to src/dawn/native/vulkan/StagingBufferVk.h index acae11431c..b6ad68b06c 100644 --- a/src/dawn_native/vulkan/StagingBufferVk.h +++ b/src/dawn/native/vulkan/StagingBufferVk.h @@ -16,8 +16,8 @@ #define DAWNNATIVE_STAGINGBUFFERVK_H_ #include "dawn/common/vulkan_platform.h" -#include "dawn_native/ResourceMemoryAllocation.h" -#include "dawn_native/StagingBuffer.h" +#include "dawn/native/ResourceMemoryAllocation.h" +#include "dawn/native/StagingBuffer.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/SwapChainVk.cpp b/src/dawn/native/vulkan/SwapChainVk.cpp similarity index 98% rename from src/dawn_native/vulkan/SwapChainVk.cpp rename to src/dawn/native/vulkan/SwapChainVk.cpp index 7d6df49c22..d0750e6709 100644 --- a/src/dawn_native/vulkan/SwapChainVk.cpp +++ b/src/dawn/native/vulkan/SwapChainVk.cpp @@ -12,22 +12,22 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/SwapChainVk.h" +#include "dawn/native/vulkan/SwapChainVk.h" #include "dawn/common/Compiler.h" -#include "dawn_native/Instance.h" -#include "dawn_native/Surface.h" -#include "dawn_native/vulkan/AdapterVk.h" -#include "dawn_native/vulkan/BackendVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/TextureVk.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/Instance.h" +#include "dawn/native/Surface.h" +#include "dawn/native/vulkan/AdapterVk.h" +#include "dawn/native/vulkan/BackendVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/TextureVk.h" +#include "dawn/native/vulkan/VulkanError.h" #include #if defined(DAWN_USE_X11) -# include "dawn_native/XlibXcbFunctions.h" +# include "dawn/native/XlibXcbFunctions.h" #endif // defined(DAWN_USE_X11) namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/SwapChainVk.h b/src/dawn/native/vulkan/SwapChainVk.h similarity index 99% rename from src/dawn_native/vulkan/SwapChainVk.h rename to src/dawn/native/vulkan/SwapChainVk.h index f5fd581745..4ec2ad8fed 100644 --- a/src/dawn_native/vulkan/SwapChainVk.h +++ b/src/dawn/native/vulkan/SwapChainVk.h @@ -15,7 +15,7 @@ #ifndef DAWNNATIVE_VULKAN_SWAPCHAINVK_H_ #define DAWNNATIVE_VULKAN_SWAPCHAINVK_H_ -#include "dawn_native/SwapChain.h" +#include "dawn/native/SwapChain.h" #include "dawn/common/vulkan_platform.h" diff --git a/src/dawn_native/vulkan/TextureVk.cpp b/src/dawn/native/vulkan/TextureVk.cpp similarity index 98% rename from src/dawn_native/vulkan/TextureVk.cpp rename to src/dawn/native/vulkan/TextureVk.cpp index c4b3bbd3e0..52d03bc0f4 100644 --- a/src/dawn_native/vulkan/TextureVk.cpp +++ b/src/dawn/native/vulkan/TextureVk.cpp @@ -12,24 +12,24 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/TextureVk.h" +#include "dawn/native/vulkan/TextureVk.h" #include "dawn/common/Assert.h" #include "dawn/common/Math.h" -#include "dawn_native/DynamicUploader.h" -#include "dawn_native/EnumMaskIterator.h" -#include "dawn_native/Error.h" -#include "dawn_native/VulkanBackend.h" -#include "dawn_native/vulkan/AdapterVk.h" -#include "dawn_native/vulkan/BufferVk.h" -#include "dawn_native/vulkan/CommandRecordingContext.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/ResourceHeapVk.h" -#include "dawn_native/vulkan/ResourceMemoryAllocatorVk.h" -#include "dawn_native/vulkan/StagingBufferVk.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/DynamicUploader.h" +#include "dawn/native/EnumMaskIterator.h" +#include "dawn/native/Error.h" +#include "dawn/native/VulkanBackend.h" +#include "dawn/native/vulkan/AdapterVk.h" +#include "dawn/native/vulkan/BufferVk.h" +#include "dawn/native/vulkan/CommandRecordingContext.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/ResourceHeapVk.h" +#include "dawn/native/vulkan/ResourceMemoryAllocatorVk.h" +#include "dawn/native/vulkan/StagingBufferVk.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/TextureVk.h b/src/dawn/native/vulkan/TextureVk.h similarity index 97% rename from src/dawn_native/vulkan/TextureVk.h rename to src/dawn/native/vulkan/TextureVk.h index d4bbf619ef..2452ade02c 100644 --- a/src/dawn_native/vulkan/TextureVk.h +++ b/src/dawn/native/vulkan/TextureVk.h @@ -15,13 +15,13 @@ #ifndef DAWNNATIVE_VULKAN_TEXTUREVK_H_ #define DAWNNATIVE_VULKAN_TEXTUREVK_H_ -#include "dawn_native/Texture.h" +#include "dawn/native/Texture.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/PassResourceUsage.h" -#include "dawn_native/ResourceMemoryAllocation.h" -#include "dawn_native/vulkan/ExternalHandle.h" -#include "dawn_native/vulkan/external_memory/MemoryService.h" +#include "dawn/native/PassResourceUsage.h" +#include "dawn/native/ResourceMemoryAllocation.h" +#include "dawn/native/vulkan/ExternalHandle.h" +#include "dawn/native/vulkan/external_memory/MemoryService.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/UtilsVulkan.cpp b/src/dawn/native/vulkan/UtilsVulkan.cpp similarity index 97% rename from src/dawn_native/vulkan/UtilsVulkan.cpp rename to src/dawn/native/vulkan/UtilsVulkan.cpp index a6cfc5c6e0..c5290d9114 100644 --- a/src/dawn_native/vulkan/UtilsVulkan.cpp +++ b/src/dawn/native/vulkan/UtilsVulkan.cpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/UtilsVulkan.h" #include "dawn/common/Assert.h" -#include "dawn_native/EnumMaskIterator.h" -#include "dawn_native/Format.h" -#include "dawn_native/Pipeline.h" -#include "dawn_native/ShaderModule.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/Forward.h" -#include "dawn_native/vulkan/TextureVk.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/EnumMaskIterator.h" +#include "dawn/native/Format.h" +#include "dawn/native/Pipeline.h" +#include "dawn/native/ShaderModule.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/Forward.h" +#include "dawn/native/vulkan/TextureVk.h" +#include "dawn/native/vulkan/VulkanError.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/UtilsVulkan.h b/src/dawn/native/vulkan/UtilsVulkan.h similarity index 98% rename from src/dawn_native/vulkan/UtilsVulkan.h rename to src/dawn/native/vulkan/UtilsVulkan.h index 0f1f33dba5..b13e03c196 100644 --- a/src/dawn_native/vulkan/UtilsVulkan.h +++ b/src/dawn/native/vulkan/UtilsVulkan.h @@ -16,8 +16,8 @@ #define DAWNNATIVE_VULKAN_UTILSVULKAN_H_ #include "dawn/common/vulkan_platform.h" -#include "dawn_native/Commands.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/Commands.h" +#include "dawn/native/dawn_platform.h" namespace dawn::native { struct ProgrammableStage; diff --git a/src/dawn_native/vulkan/VulkanBackend.cpp b/src/dawn/native/vulkan/VulkanBackend.cpp similarity index 96% rename from src/dawn_native/vulkan/VulkanBackend.cpp rename to src/dawn/native/vulkan/VulkanBackend.cpp index 4fa81c9bba..e8f630a824 100644 --- a/src/dawn_native/vulkan/VulkanBackend.cpp +++ b/src/dawn/native/vulkan/VulkanBackend.cpp @@ -19,12 +19,12 @@ // of the non-dispatchable handles. #include "dawn/common/vulkan_platform.h" -#include "dawn_native/VulkanBackend.h" +#include "dawn/native/VulkanBackend.h" #include "dawn/common/SwapChainUtils.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/NativeSwapChainImplVk.h" -#include "dawn_native/vulkan/TextureVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/NativeSwapChainImplVk.h" +#include "dawn/native/vulkan/TextureVk.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/VulkanError.cpp b/src/dawn/native/vulkan/VulkanError.cpp similarity index 98% rename from src/dawn_native/vulkan/VulkanError.cpp rename to src/dawn/native/vulkan/VulkanError.cpp index 8a84bc8fc6..49416b9c1d 100644 --- a/src/dawn_native/vulkan/VulkanError.cpp +++ b/src/dawn/native/vulkan/VulkanError.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/vulkan/VulkanError.h" #include diff --git a/src/dawn_native/vulkan/VulkanError.h b/src/dawn/native/vulkan/VulkanError.h similarity index 96% rename from src/dawn_native/vulkan/VulkanError.h rename to src/dawn/native/vulkan/VulkanError.h index 885aae2901..e17e73b7ae 100644 --- a/src/dawn_native/vulkan/VulkanError.h +++ b/src/dawn/native/vulkan/VulkanError.h @@ -15,8 +15,8 @@ #ifndef DAWNNATIVE_VULKAN_VULKANERROR_H_ #define DAWNNATIVE_VULKAN_VULKANERROR_H_ -#include "dawn_native/ErrorInjector.h" -#include "dawn_native/vulkan/VulkanFunctions.h" +#include "dawn/native/ErrorInjector.h" +#include "dawn/native/vulkan/VulkanFunctions.h" constexpr VkResult VK_FAKE_ERROR_FOR_TESTING = VK_RESULT_MAX_ENUM; constexpr VkResult VK_FAKE_DEVICE_OOM_FOR_TESTING = static_cast(VK_RESULT_MAX_ENUM - 1); diff --git a/src/dawn_native/vulkan/VulkanExtensions.cpp b/src/dawn/native/vulkan/VulkanExtensions.cpp similarity index 99% rename from src/dawn_native/vulkan/VulkanExtensions.cpp rename to src/dawn/native/vulkan/VulkanExtensions.cpp index 72b6f99bd1..429b36aa39 100644 --- a/src/dawn_native/vulkan/VulkanExtensions.cpp +++ b/src/dawn/native/vulkan/VulkanExtensions.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/VulkanExtensions.h" +#include "dawn/native/vulkan/VulkanExtensions.h" #include "dawn/common/Assert.h" #include "dawn/common/vulkan_platform.h" diff --git a/src/dawn_native/vulkan/VulkanExtensions.h b/src/dawn/native/vulkan/VulkanExtensions.h similarity index 100% rename from src/dawn_native/vulkan/VulkanExtensions.h rename to src/dawn/native/vulkan/VulkanExtensions.h diff --git a/src/dawn_native/vulkan/VulkanFunctions.cpp b/src/dawn/native/vulkan/VulkanFunctions.cpp similarity index 99% rename from src/dawn_native/vulkan/VulkanFunctions.cpp rename to src/dawn/native/vulkan/VulkanFunctions.cpp index 1bae6be34b..782cd5a698 100644 --- a/src/dawn_native/vulkan/VulkanFunctions.cpp +++ b/src/dawn/native/vulkan/VulkanFunctions.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/VulkanFunctions.h" +#include "dawn/native/vulkan/VulkanFunctions.h" #include "dawn/common/DynamicLib.h" -#include "dawn_native/vulkan/VulkanInfo.h" +#include "dawn/native/vulkan/VulkanInfo.h" namespace dawn::native::vulkan { diff --git a/src/dawn_native/vulkan/VulkanFunctions.h b/src/dawn/native/vulkan/VulkanFunctions.h similarity index 99% rename from src/dawn_native/vulkan/VulkanFunctions.h rename to src/dawn/native/vulkan/VulkanFunctions.h index bcf06ef0d0..07b8b39dc0 100644 --- a/src/dawn_native/vulkan/VulkanFunctions.h +++ b/src/dawn/native/vulkan/VulkanFunctions.h @@ -17,7 +17,7 @@ #include "dawn/common/vulkan_platform.h" -#include "dawn_native/Error.h" +#include "dawn/native/Error.h" class DynamicLib; diff --git a/src/dawn_native/vulkan/VulkanInfo.cpp b/src/dawn/native/vulkan/VulkanInfo.cpp similarity index 98% rename from src/dawn_native/vulkan/VulkanInfo.cpp rename to src/dawn/native/vulkan/VulkanInfo.cpp index 202d6d1012..a734a9b6f4 100644 --- a/src/dawn_native/vulkan/VulkanInfo.cpp +++ b/src/dawn/native/vulkan/VulkanInfo.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/VulkanInfo.h" +#include "dawn/native/vulkan/VulkanInfo.h" -#include "dawn_native/vulkan/AdapterVk.h" -#include "dawn_native/vulkan/BackendVk.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/vulkan/AdapterVk.h" +#include "dawn/native/vulkan/BackendVk.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" #include diff --git a/src/dawn_native/vulkan/VulkanInfo.h b/src/dawn/native/vulkan/VulkanInfo.h similarity index 97% rename from src/dawn_native/vulkan/VulkanInfo.h rename to src/dawn/native/vulkan/VulkanInfo.h index 6e51115c0b..2e0c2aa827 100644 --- a/src/dawn_native/vulkan/VulkanInfo.h +++ b/src/dawn/native/vulkan/VulkanInfo.h @@ -17,8 +17,8 @@ #include "dawn/common/ityp_array.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/Error.h" -#include "dawn_native/vulkan/VulkanExtensions.h" +#include "dawn/native/Error.h" +#include "dawn/native/vulkan/VulkanExtensions.h" #include diff --git a/src/dawn_native/vulkan/external_memory/MemoryService.h b/src/dawn/native/vulkan/external_memory/MemoryService.h similarity index 96% rename from src/dawn_native/vulkan/external_memory/MemoryService.h rename to src/dawn/native/vulkan/external_memory/MemoryService.h index ba1c0a4982..034bada4cf 100644 --- a/src/dawn_native/vulkan/external_memory/MemoryService.h +++ b/src/dawn/native/vulkan/external_memory/MemoryService.h @@ -16,9 +16,9 @@ #define DAWNNATIVE_VULKAN_EXTERNALMEMORY_SERVICE_H_ #include "dawn/common/vulkan_platform.h" -#include "dawn_native/Error.h" -#include "dawn_native/VulkanBackend.h" -#include "dawn_native/vulkan/ExternalHandle.h" +#include "dawn/native/Error.h" +#include "dawn/native/VulkanBackend.h" +#include "dawn/native/vulkan/ExternalHandle.h" namespace dawn::native::vulkan { class Device; diff --git a/src/dawn_native/vulkan/external_memory/MemoryServiceDmaBuf.cpp b/src/dawn/native/vulkan/external_memory/MemoryServiceDmaBuf.cpp similarity index 98% rename from src/dawn_native/vulkan/external_memory/MemoryServiceDmaBuf.cpp rename to src/dawn/native/vulkan/external_memory/MemoryServiceDmaBuf.cpp index 384d4d2809..c304a922ff 100644 --- a/src/dawn_native/vulkan/external_memory/MemoryServiceDmaBuf.cpp +++ b/src/dawn/native/vulkan/external_memory/MemoryServiceDmaBuf.cpp @@ -13,13 +13,13 @@ // limitations under the License. #include "dawn/common/Assert.h" -#include "dawn_native/vulkan/AdapterVk.h" -#include "dawn_native/vulkan/BackendVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/ResourceMemoryAllocatorVk.h" -#include "dawn_native/vulkan/UtilsVulkan.h" -#include "dawn_native/vulkan/VulkanError.h" -#include "dawn_native/vulkan/external_memory/MemoryService.h" +#include "dawn/native/vulkan/AdapterVk.h" +#include "dawn/native/vulkan/BackendVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/ResourceMemoryAllocatorVk.h" +#include "dawn/native/vulkan/UtilsVulkan.h" +#include "dawn/native/vulkan/VulkanError.h" +#include "dawn/native/vulkan/external_memory/MemoryService.h" namespace dawn::native { namespace vulkan::external_memory { diff --git a/src/dawn_native/vulkan/external_memory/MemoryServiceNull.cpp b/src/dawn/native/vulkan/external_memory/MemoryServiceNull.cpp similarity index 96% rename from src/dawn_native/vulkan/external_memory/MemoryServiceNull.cpp rename to src/dawn/native/vulkan/external_memory/MemoryServiceNull.cpp index 081cd21085..7b3c239916 100644 --- a/src/dawn_native/vulkan/external_memory/MemoryServiceNull.cpp +++ b/src/dawn/native/vulkan/external_memory/MemoryServiceNull.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/external_memory/MemoryService.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/external_memory/MemoryService.h" namespace dawn::native { namespace vulkan::external_memory { diff --git a/src/dawn_native/vulkan/external_memory/MemoryServiceOpaqueFD.cpp b/src/dawn/native/vulkan/external_memory/MemoryServiceOpaqueFD.cpp similarity index 96% rename from src/dawn_native/vulkan/external_memory/MemoryServiceOpaqueFD.cpp rename to src/dawn/native/vulkan/external_memory/MemoryServiceOpaqueFD.cpp index b51ec936f3..24a830b408 100644 --- a/src/dawn_native/vulkan/external_memory/MemoryServiceOpaqueFD.cpp +++ b/src/dawn/native/vulkan/external_memory/MemoryServiceOpaqueFD.cpp @@ -13,12 +13,12 @@ // limitations under the License. #include "dawn/common/Assert.h" -#include "dawn_native/vulkan/AdapterVk.h" -#include "dawn_native/vulkan/BackendVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/TextureVk.h" -#include "dawn_native/vulkan/VulkanError.h" -#include "dawn_native/vulkan/external_memory/MemoryService.h" +#include "dawn/native/vulkan/AdapterVk.h" +#include "dawn/native/vulkan/BackendVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/TextureVk.h" +#include "dawn/native/vulkan/VulkanError.h" +#include "dawn/native/vulkan/external_memory/MemoryService.h" namespace dawn::native { namespace vulkan::external_memory { diff --git a/src/dawn_native/vulkan/external_memory/MemoryServiceZirconHandle.cpp b/src/dawn/native/vulkan/external_memory/MemoryServiceZirconHandle.cpp similarity index 96% rename from src/dawn_native/vulkan/external_memory/MemoryServiceZirconHandle.cpp rename to src/dawn/native/vulkan/external_memory/MemoryServiceZirconHandle.cpp index 3e0ff7c44e..b61b0c515b 100644 --- a/src/dawn_native/vulkan/external_memory/MemoryServiceZirconHandle.cpp +++ b/src/dawn/native/vulkan/external_memory/MemoryServiceZirconHandle.cpp @@ -13,12 +13,12 @@ // limitations under the License. #include "dawn/common/Assert.h" -#include "dawn_native/vulkan/AdapterVk.h" -#include "dawn_native/vulkan/BackendVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/TextureVk.h" -#include "dawn_native/vulkan/VulkanError.h" -#include "dawn_native/vulkan/external_memory/MemoryService.h" +#include "dawn/native/vulkan/AdapterVk.h" +#include "dawn/native/vulkan/BackendVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/TextureVk.h" +#include "dawn/native/vulkan/VulkanError.h" +#include "dawn/native/vulkan/external_memory/MemoryService.h" namespace dawn::native { namespace vulkan::external_memory { diff --git a/src/dawn_native/vulkan/external_semaphore/SemaphoreService.h b/src/dawn/native/vulkan/external_semaphore/SemaphoreService.h similarity index 92% rename from src/dawn_native/vulkan/external_semaphore/SemaphoreService.h rename to src/dawn/native/vulkan/external_semaphore/SemaphoreService.h index 582b598562..c1f69f1dae 100644 --- a/src/dawn_native/vulkan/external_semaphore/SemaphoreService.h +++ b/src/dawn/native/vulkan/external_semaphore/SemaphoreService.h @@ -16,10 +16,10 @@ #define DAWNNATIVE_VULKAN_EXTERNALSEMAPHORE_SERVICE_H_ #include "dawn/common/vulkan_platform.h" -#include "dawn_native/Error.h" -#include "dawn_native/vulkan/ExternalHandle.h" -#include "dawn_native/vulkan/VulkanFunctions.h" -#include "dawn_native/vulkan/VulkanInfo.h" +#include "dawn/native/Error.h" +#include "dawn/native/vulkan/ExternalHandle.h" +#include "dawn/native/vulkan/VulkanFunctions.h" +#include "dawn/native/vulkan/VulkanInfo.h" namespace dawn::native::vulkan { class Device; diff --git a/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceFD.cpp b/src/dawn/native/vulkan/external_semaphore/SemaphoreServiceFD.cpp similarity index 95% rename from src/dawn_native/vulkan/external_semaphore/SemaphoreServiceFD.cpp rename to src/dawn/native/vulkan/external_semaphore/SemaphoreServiceFD.cpp index d7038bcb0c..7e2b619f5c 100644 --- a/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceFD.cpp +++ b/src/dawn/native/vulkan/external_semaphore/SemaphoreServiceFD.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/AdapterVk.h" -#include "dawn_native/vulkan/BackendVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/VulkanError.h" -#include "dawn_native/vulkan/external_semaphore/SemaphoreService.h" +#include "dawn/native/vulkan/AdapterVk.h" +#include "dawn/native/vulkan/BackendVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/VulkanError.h" +#include "dawn/native/vulkan/external_semaphore/SemaphoreService.h" static constexpr VkExternalSemaphoreHandleTypeFlagBits kHandleType = #if defined(DAWN_USE_SYNC_FDS) diff --git a/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceNull.cpp b/src/dawn/native/vulkan/external_semaphore/SemaphoreServiceNull.cpp similarity index 94% rename from src/dawn_native/vulkan/external_semaphore/SemaphoreServiceNull.cpp rename to src/dawn/native/vulkan/external_semaphore/SemaphoreServiceNull.cpp index b3c7a60e8a..3146e3771a 100644 --- a/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceNull.cpp +++ b/src/dawn/native/vulkan/external_semaphore/SemaphoreServiceNull.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/external_semaphore/SemaphoreService.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/external_semaphore/SemaphoreService.h" namespace dawn::native { namespace vulkan::external_semaphore { diff --git a/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp b/src/dawn/native/vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp similarity index 96% rename from src/dawn_native/vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp rename to src/dawn/native/vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp index bc069dc6d1..03fa79c65d 100644 --- a/src/dawn_native/vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp +++ b/src/dawn/native/vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/vulkan/AdapterVk.h" -#include "dawn_native/vulkan/BackendVk.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/VulkanError.h" -#include "dawn_native/vulkan/external_semaphore/SemaphoreService.h" +#include "dawn/native/vulkan/AdapterVk.h" +#include "dawn/native/vulkan/BackendVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/VulkanError.h" +#include "dawn/native/vulkan/external_semaphore/SemaphoreService.h" namespace dawn::native { namespace vulkan::external_semaphore { diff --git a/src/dawn_native/webgpu_absl_format.cpp b/src/dawn/native/webgpu_absl_format.cpp similarity index 71% rename from src/dawn_native/webgpu_absl_format.cpp rename to src/dawn/native/webgpu_absl_format.cpp index f112b9f89d..79e32421df 100644 --- a/src/dawn_native/webgpu_absl_format.cpp +++ b/src/dawn/native/webgpu_absl_format.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/webgpu_absl_format.h" +#include "dawn/native/webgpu_absl_format.h" -#include "dawn_native/Device.h" -#include "dawn_native/ObjectBase.h" -#include "dawn_native/Texture.h" +#include "dawn/native/Device.h" +#include "dawn/native/ObjectBase.h" +#include "dawn/native/Texture.h" namespace dawn::native { @@ -24,42 +24,41 @@ namespace dawn::native { // Structs // - absl::FormatConvertResult - AbslFormatConvert(const Color* value, - const absl::FormatConversionSpec& spec, - absl::FormatSink* s) { + absl::FormatConvertResult AbslFormatConvert( + const Color* value, + const absl::FormatConversionSpec& spec, + absl::FormatSink* s) { if (value == nullptr) { s->Append("[null]"); return {true}; } - s->Append(absl::StrFormat("[Color r:%f, g:%f, b:%f, a:%f]", - value->r, value->g, value->b, value->a)); + s->Append(absl::StrFormat("[Color r:%f, g:%f, b:%f, a:%f]", value->r, value->g, value->b, + value->a)); return {true}; } - absl::FormatConvertResult - AbslFormatConvert(const Extent3D* value, - const absl::FormatConversionSpec& spec, - absl::FormatSink* s) { + absl::FormatConvertResult AbslFormatConvert( + const Extent3D* value, + const absl::FormatConversionSpec& spec, + absl::FormatSink* s) { if (value == nullptr) { s->Append("[null]"); return {true}; } s->Append(absl::StrFormat("[Extent3D width:%u, height:%u, depthOrArrayLayers:%u]", - value->width, value->height, value->depthOrArrayLayers)); + value->width, value->height, value->depthOrArrayLayers)); return {true}; } - absl::FormatConvertResult - AbslFormatConvert(const Origin3D* value, - const absl::FormatConversionSpec& spec, - absl::FormatSink* s) { + absl::FormatConvertResult AbslFormatConvert( + const Origin3D* value, + const absl::FormatConversionSpec& spec, + absl::FormatSink* s) { if (value == nullptr) { s->Append("[null]"); return {true}; } - s->Append(absl::StrFormat("[Origin3D x:%u, y:%u, z:%u]", - value->x, value->y, value->z)); + s->Append(absl::StrFormat("[Origin3D x:%u, y:%u, z:%u]", value->x, value->y, value->z)); return {true}; } @@ -67,10 +66,10 @@ namespace dawn::native { // Objects // - absl::FormatConvertResult - AbslFormatConvert(const DeviceBase* value, - const absl::FormatConversionSpec& spec, - absl::FormatSink* s) { + absl::FormatConvertResult AbslFormatConvert( + const DeviceBase* value, + const absl::FormatConversionSpec& spec, + absl::FormatSink* s) { if (value == nullptr) { s->Append("[null]"); return {true}; @@ -84,10 +83,10 @@ namespace dawn::native { return {true}; } - absl::FormatConvertResult - AbslFormatConvert(const ApiObjectBase* value, - const absl::FormatConversionSpec& spec, - absl::FormatSink* s) { + absl::FormatConvertResult AbslFormatConvert( + const ApiObjectBase* value, + const absl::FormatConversionSpec& spec, + absl::FormatSink* s) { if (value == nullptr) { s->Append("[null]"); return {true}; @@ -105,10 +104,10 @@ namespace dawn::native { return {true}; } - absl::FormatConvertResult - AbslFormatConvert(const TextureViewBase* value, - const absl::FormatConversionSpec& spec, - absl::FormatSink* s) { + absl::FormatConvertResult AbslFormatConvert( + const TextureViewBase* value, + const absl::FormatConversionSpec& spec, + absl::FormatSink* s) { if (value == nullptr) { s->Append("[null]"); return {true}; diff --git a/src/dawn_native/webgpu_absl_format.h b/src/dawn/native/webgpu_absl_format.h similarity index 58% rename from src/dawn_native/webgpu_absl_format.h rename to src/dawn/native/webgpu_absl_format.h index 21e431259a..4dc5117598 100644 --- a/src/dawn_native/webgpu_absl_format.h +++ b/src/dawn/native/webgpu_absl_format.h @@ -16,8 +16,8 @@ #define DAWNNATIVE_WEBGPUABSLFORMAT_H_ #include "absl/strings/str_format.h" -#include "dawn_native/dawn_platform.h" -#include "dawn_native/webgpu_absl_format_autogen.h" +#include "dawn/native/dawn_platform.h" +#include "dawn/native/webgpu_absl_format_autogen.h" namespace dawn::native { @@ -26,46 +26,46 @@ namespace dawn::native { // struct Color; - absl::FormatConvertResult - AbslFormatConvert(const Color* value, - const absl::FormatConversionSpec& spec, - absl::FormatSink* s); + absl::FormatConvertResult AbslFormatConvert( + const Color* value, + const absl::FormatConversionSpec& spec, + absl::FormatSink* s); struct Extent3D; - absl::FormatConvertResult - AbslFormatConvert(const Extent3D* value, - const absl::FormatConversionSpec& spec, - absl::FormatSink* s); + absl::FormatConvertResult AbslFormatConvert( + const Extent3D* value, + const absl::FormatConversionSpec& spec, + absl::FormatSink* s); struct Origin3D; - absl::FormatConvertResult - AbslFormatConvert(const Origin3D* value, - const absl::FormatConversionSpec& spec, - absl::FormatSink* s); + absl::FormatConvertResult AbslFormatConvert( + const Origin3D* value, + const absl::FormatConversionSpec& spec, + absl::FormatSink* s); // // Objects // class DeviceBase; - absl::FormatConvertResult - AbslFormatConvert(const DeviceBase* value, - const absl::FormatConversionSpec& spec, - absl::FormatSink* s); + absl::FormatConvertResult AbslFormatConvert( + const DeviceBase* value, + const absl::FormatConversionSpec& spec, + absl::FormatSink* s); class ApiObjectBase; - absl::FormatConvertResult - AbslFormatConvert(const ApiObjectBase* value, - const absl::FormatConversionSpec& spec, - absl::FormatSink* s); + absl::FormatConvertResult AbslFormatConvert( + const ApiObjectBase* value, + const absl::FormatConversionSpec& spec, + absl::FormatSink* s); // Special case for TextureViews, since frequently the texture will be the // thing that's labeled. class TextureViewBase; - absl::FormatConvertResult - AbslFormatConvert(const TextureViewBase* value, - const absl::FormatConversionSpec& spec, - absl::FormatSink* s); + absl::FormatConvertResult AbslFormatConvert( + const TextureViewBase* value, + const absl::FormatConversionSpec& spec, + absl::FormatSink* s); } // namespace dawn::native diff --git a/src/dawn/node/README.md b/src/dawn/node/README.md index 1306d243d5..d1b7e4ab06 100644 --- a/src/dawn/node/README.md +++ b/src/dawn/node/README.md @@ -71,8 +71,8 @@ VK_ICD_FILENAMES=/Linux/vk_swiftshader_icd.json ./src/d The `--flag` parameter must be passed in multiple times, once for each flag begin set. Here are some common arguments: * `dawn-backend=` * `dlldir=` - used to add an extra DLL search path on Windows, primarily to load the right d3dcompiler_47.dll -* `enable-dawn-features=` - enable [Dawn toggles](https://dawn.googlesource.com/dawn/+/refs/heads/main/src/dawn_native/Toggles.cpp), e.g. `dump_shaders` -* `disable-dawn-features=` - disable [Dawn toggles](https://dawn.googlesource.com/dawn/+/refs/heads/main/src/dawn_native/Toggles.cpp) +* `enable-dawn-features=` - enable [Dawn toggles](https://dawn.googlesource.com/dawn/+/refs/heads/main/src/dawn/native/Toggles.cpp), e.g. `dump_shaders` +* `disable-dawn-features=` - disable [Dawn toggles](https://dawn.googlesource.com/dawn/+/refs/heads/main/src/dawn/native/Toggles.cpp) For example, on Windows, to use the d3dcompiler_47.dll from a Chromium checkout, and to dump shader output, we could run the following using Git Bash: diff --git a/src/dawn/node/binding/Converter.h b/src/dawn/node/binding/Converter.h index 29953df826..cfe38e681c 100644 --- a/src/dawn/node/binding/Converter.h +++ b/src/dawn/node/binding/Converter.h @@ -18,8 +18,8 @@ #include #include +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/binding/Errors.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPU.h b/src/dawn/node/binding/GPU.h index f33a0c47ba..de6b140ee0 100644 --- a/src/dawn/node/binding/GPU.h +++ b/src/dawn/node/binding/GPU.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPU_H_ #define DAWN_NODE_BINDING_GPU_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/binding/Flags.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUAdapter.cpp b/src/dawn/node/binding/GPUAdapter.cpp index b8e97db4e6..dadd300bdd 100644 --- a/src/dawn/node/binding/GPUAdapter.cpp +++ b/src/dawn/node/binding/GPUAdapter.cpp @@ -181,7 +181,7 @@ namespace wgpu::binding { interop::Promise> promise(env, PROMISE_INFO); std::vector requiredFeatures; - // See src/dawn_native/Features.cpp for enum <-> string mappings. + // See src/dawn/native/Features.cpp for enum <-> string mappings. for (auto required : descriptor.requiredFeatures) { switch (required) { case interop::GPUFeatureName::kTextureCompressionBc: diff --git a/src/dawn/node/binding/GPUAdapter.h b/src/dawn/node/binding/GPUAdapter.h index 1498c16906..de03234cc6 100644 --- a/src/dawn/node/binding/GPUAdapter.h +++ b/src/dawn/node/binding/GPUAdapter.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUADAPTER_H_ #define DAWN_NODE_BINDING_GPUADAPTER_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUBindGroup.h b/src/dawn/node/binding/GPUBindGroup.h index 10fc9fe1c8..b644b90645 100644 --- a/src/dawn/node/binding/GPUBindGroup.h +++ b/src/dawn/node/binding/GPUBindGroup.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUBINDGROUP_H_ #define DAWN_NODE_BINDING_GPUBINDGROUP_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUBindGroupLayout.h b/src/dawn/node/binding/GPUBindGroupLayout.h index 45373b4d4c..009c96c29b 100644 --- a/src/dawn/node/binding/GPUBindGroupLayout.h +++ b/src/dawn/node/binding/GPUBindGroupLayout.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUBINDGROUPLAYOUT_H_ #define DAWN_NODE_BINDING_GPUBINDGROUPLAYOUT_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUBuffer.h b/src/dawn/node/binding/GPUBuffer.h index 35e1577bbe..32cdfe6d3c 100644 --- a/src/dawn/node/binding/GPUBuffer.h +++ b/src/dawn/node/binding/GPUBuffer.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUBUFFER_H_ #define DAWN_NODE_BINDING_GPUBUFFER_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/binding/AsyncRunner.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUCommandBuffer.h b/src/dawn/node/binding/GPUCommandBuffer.h index 43bd2f83bb..bd84d1b746 100644 --- a/src/dawn/node/binding/GPUCommandBuffer.h +++ b/src/dawn/node/binding/GPUCommandBuffer.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUCOMMANDBUFFER_H_ #define DAWN_NODE_BINDING_GPUCOMMANDBUFFER_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUCommandEncoder.h b/src/dawn/node/binding/GPUCommandEncoder.h index b192f7bf06..cf5a77dc8a 100644 --- a/src/dawn/node/binding/GPUCommandEncoder.h +++ b/src/dawn/node/binding/GPUCommandEncoder.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUCOMMANDENCODER_H_ #define DAWN_NODE_BINDING_GPUCOMMANDENCODER_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUComputePassEncoder.h b/src/dawn/node/binding/GPUComputePassEncoder.h index fc715330b7..d9ffd7ec82 100644 --- a/src/dawn/node/binding/GPUComputePassEncoder.h +++ b/src/dawn/node/binding/GPUComputePassEncoder.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUCOMPUTEPASSENCODER_H_ #define DAWN_NODE_BINDING_GPUCOMPUTEPASSENCODER_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUComputePipeline.h b/src/dawn/node/binding/GPUComputePipeline.h index 0b763dd836..c37eb284ac 100644 --- a/src/dawn/node/binding/GPUComputePipeline.h +++ b/src/dawn/node/binding/GPUComputePipeline.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUPIPELINE_H_ #define DAWN_NODE_BINDING_GPUPIPELINE_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUPipelineLayout.h b/src/dawn/node/binding/GPUPipelineLayout.h index fab2215c1b..174b1611b5 100644 --- a/src/dawn/node/binding/GPUPipelineLayout.h +++ b/src/dawn/node/binding/GPUPipelineLayout.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUPIPELINELAYOUT_H_ #define DAWN_NODE_BINDING_GPUPIPELINELAYOUT_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUQuerySet.h b/src/dawn/node/binding/GPUQuerySet.h index 793b85139c..a7e37d3b56 100644 --- a/src/dawn/node/binding/GPUQuerySet.h +++ b/src/dawn/node/binding/GPUQuerySet.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUQUERYSET_H_ #define DAWN_NODE_BINDING_GPUQUERYSET_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUQueue.h b/src/dawn/node/binding/GPUQueue.h index b04883771e..be8ba8c712 100644 --- a/src/dawn/node/binding/GPUQueue.h +++ b/src/dawn/node/binding/GPUQueue.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUQUEUE_H_ #define DAWN_NODE_BINDING_GPUQUEUE_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/binding/AsyncRunner.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPURenderBundle.h b/src/dawn/node/binding/GPURenderBundle.h index 6c7948e52b..76635c3f66 100644 --- a/src/dawn/node/binding/GPURenderBundle.h +++ b/src/dawn/node/binding/GPURenderBundle.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPURENDERBUNDLE_H_ #define DAWN_NODE_BINDING_GPURENDERBUNDLE_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPURenderBundleEncoder.h b/src/dawn/node/binding/GPURenderBundleEncoder.h index 11ced26486..c459e84db2 100644 --- a/src/dawn/node/binding/GPURenderBundleEncoder.h +++ b/src/dawn/node/binding/GPURenderBundleEncoder.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPURENDERBUNDLEENCODER_H_ #define DAWN_NODE_BINDING_GPURENDERBUNDLEENCODER_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPURenderPassEncoder.h b/src/dawn/node/binding/GPURenderPassEncoder.h index 437b10b628..c40de7982a 100644 --- a/src/dawn/node/binding/GPURenderPassEncoder.h +++ b/src/dawn/node/binding/GPURenderPassEncoder.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPURENDERPASSENCODER_H_ #define DAWN_NODE_BINDING_GPURENDERPASSENCODER_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPURenderPipeline.h b/src/dawn/node/binding/GPURenderPipeline.h index 78a5c095bb..3eaf2cd15f 100644 --- a/src/dawn/node/binding/GPURenderPipeline.h +++ b/src/dawn/node/binding/GPURenderPipeline.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPURENDERPIPELINE_H_ #define DAWN_NODE_BINDING_GPURENDERPIPELINE_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUSampler.h b/src/dawn/node/binding/GPUSampler.h index 1b925b08f3..4f1ff20444 100644 --- a/src/dawn/node/binding/GPUSampler.h +++ b/src/dawn/node/binding/GPUSampler.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUSAMPLER_H_ #define DAWN_NODE_BINDING_GPUSAMPLER_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUShaderModule.h b/src/dawn/node/binding/GPUShaderModule.h index 6bb7714333..c0a94aab30 100644 --- a/src/dawn/node/binding/GPUShaderModule.h +++ b/src/dawn/node/binding/GPUShaderModule.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUSHADERMODULE_H_ #define DAWN_NODE_BINDING_GPUSHADERMODULE_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/binding/AsyncRunner.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUSupportedLimits.h b/src/dawn/node/binding/GPUSupportedLimits.h index 7a2aa86537..e571c67c37 100644 --- a/src/dawn/node/binding/GPUSupportedLimits.h +++ b/src/dawn/node/binding/GPUSupportedLimits.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUSUPPORTEDLIMITS_H_ #define DAWN_NODE_BINDING_GPUSUPPORTEDLIMITS_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUTexture.h b/src/dawn/node/binding/GPUTexture.h index f7dbe9180a..cdff7014a0 100644 --- a/src/dawn/node/binding/GPUTexture.h +++ b/src/dawn/node/binding/GPUTexture.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUTEXTURE_H_ #define DAWN_NODE_BINDING_GPUTEXTURE_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/node/binding/GPUTextureView.h b/src/dawn/node/binding/GPUTextureView.h index 4394eab307..6568e70e55 100644 --- a/src/dawn/node/binding/GPUTextureView.h +++ b/src/dawn/node/binding/GPUTextureView.h @@ -15,8 +15,8 @@ #ifndef DAWN_NODE_BINDING_GPUTEXTUREVIEW_H_ #define DAWN_NODE_BINDING_GPUTEXTUREVIEW_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "napi.h" #include "src/dawn/node/interop/WebGPU.h" diff --git a/src/dawn/utils/BUILD.gn b/src/dawn/utils/BUILD.gn index a9a3761e09..3643f73009 100644 --- a/src/dawn/utils/BUILD.gn +++ b/src/dawn/utils/BUILD.gn @@ -89,8 +89,8 @@ static_library("utils") { deps = [ "${dawn_root}/src/dawn:dawn_proc", "${dawn_root}/src/dawn/common", + "${dawn_root}/src/dawn/native:headers", "${dawn_root}/src/dawn/wire", - "${dawn_root}/src/dawn_native:dawn_native_headers", "${dawn_spirv_tools_dir}:spvtools_opt", ] libs = [] @@ -156,7 +156,7 @@ if (dawn_standalone) { deps = [ ":glfw", "${dawn_root}/src/dawn/common", - "${dawn_root}/src/dawn_native", + "${dawn_root}/src/dawn/native", ] libs = [] frameworks = [] diff --git a/src/dawn/utils/BackendBinding.cpp b/src/dawn/utils/BackendBinding.cpp index d1f178967c..f97e6b9427 100644 --- a/src/dawn/utils/BackendBinding.cpp +++ b/src/dawn/utils/BackendBinding.cpp @@ -19,7 +19,7 @@ #include "GLFW/glfw3.h" #if defined(DAWN_ENABLE_BACKEND_OPENGL) -# include "dawn_native/OpenGLBackend.h" +# include "dawn/native/OpenGLBackend.h" #endif // defined(DAWN_ENABLE_BACKEND_OPENGL) namespace utils { diff --git a/src/dawn/utils/BackendBinding.h b/src/dawn/utils/BackendBinding.h index 175bb5d185..352d294c91 100644 --- a/src/dawn/utils/BackendBinding.h +++ b/src/dawn/utils/BackendBinding.h @@ -15,8 +15,8 @@ #ifndef UTILS_BACKENDBINDING_H_ #define UTILS_BACKENDBINDING_H_ +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" struct GLFWwindow; diff --git a/src/dawn/utils/D3D12Binding.cpp b/src/dawn/utils/D3D12Binding.cpp index 7b64c299ae..9ed65b2b77 100644 --- a/src/dawn/utils/D3D12Binding.cpp +++ b/src/dawn/utils/D3D12Binding.cpp @@ -15,7 +15,7 @@ #include "dawn/utils/BackendBinding.h" #include "dawn/common/Assert.h" -#include "dawn_native/D3D12Backend.h" +#include "dawn/native/D3D12Backend.h" #include "GLFW/glfw3.h" #define GLFW_EXPOSE_NATIVE_WIN32 diff --git a/src/dawn/utils/MetalBinding.mm b/src/dawn/utils/MetalBinding.mm index 330a6b0f3a..b35245cf73 100644 --- a/src/dawn/utils/MetalBinding.mm +++ b/src/dawn/utils/MetalBinding.mm @@ -16,7 +16,7 @@ #include "dawn/common/Assert.h" #include "dawn/common/SwapChainUtils.h" -#include "dawn_native/MetalBackend.h" +#include "dawn/native/MetalBackend.h" #define GLFW_EXPOSE_NATIVE_COCOA #include "GLFW/glfw3.h" diff --git a/src/dawn/utils/NullBinding.cpp b/src/dawn/utils/NullBinding.cpp index 3c547f0a03..c33b6dda40 100644 --- a/src/dawn/utils/NullBinding.cpp +++ b/src/dawn/utils/NullBinding.cpp @@ -15,7 +15,7 @@ #include "dawn/utils/BackendBinding.h" #include "dawn/common/Assert.h" -#include "dawn_native/NullBackend.h" +#include "dawn/native/NullBackend.h" #include diff --git a/src/dawn/utils/OpenGLBinding.cpp b/src/dawn/utils/OpenGLBinding.cpp index 0df6895115..35972afc64 100644 --- a/src/dawn/utils/OpenGLBinding.cpp +++ b/src/dawn/utils/OpenGLBinding.cpp @@ -18,7 +18,7 @@ #include "dawn/common/Platform.h" #include "dawn/common/SwapChainUtils.h" #include "dawn/dawn_wsi.h" -#include "dawn_native/OpenGLBackend.h" +#include "dawn/native/OpenGLBackend.h" #include #include "GLFW/glfw3.h" diff --git a/src/dawn/utils/VulkanBinding.cpp b/src/dawn/utils/VulkanBinding.cpp index 564fd96db9..fc94090a0b 100644 --- a/src/dawn/utils/VulkanBinding.cpp +++ b/src/dawn/utils/VulkanBinding.cpp @@ -15,7 +15,7 @@ #include "dawn/utils/BackendBinding.h" #include "dawn/common/Assert.h" -#include "dawn_native/VulkanBackend.h" +#include "dawn/native/VulkanBackend.h" // Include GLFW after VulkanBackend so that it declares the Vulkan-specific functions #include "GLFW/glfw3.h" diff --git a/src/dawn/utils/WireHelper.cpp b/src/dawn/utils/WireHelper.cpp index ea00cc694a..73eed81899 100644 --- a/src/dawn/utils/WireHelper.cpp +++ b/src/dawn/utils/WireHelper.cpp @@ -18,10 +18,10 @@ #include "dawn/common/Log.h" #include "dawn/common/SystemUtils.h" #include "dawn/dawn_proc.h" +#include "dawn/native/DawnNative.h" #include "dawn/utils/TerribleCommandBuffer.h" #include "dawn/wire/WireClient.h" #include "dawn/wire/WireServer.h" -#include "dawn_native/DawnNative.h" #include #include diff --git a/src/dawn_native/BUILD.gn b/src/dawn_native/BUILD.gn index 96b369b3e3..e811642bcc 100644 --- a/src/dawn_native/BUILD.gn +++ b/src/dawn_native/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2020 The Dawn Authors +# Copyright 2022 The Dawn Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,765 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("../../scripts/dawn_overrides_with_defaults.gni") - -import("//build_overrides/build.gni") -import("${dawn_root}/generator/dawn_generator.gni") -import("${dawn_root}/scripts/dawn_component.gni") -import("${dawn_root}/scripts/dawn_features.gni") - -# Import mac_deployment_target -if (is_mac) { - if (dawn_has_build) { - import("//build/config/mac/mac_sdk.gni") - } else { - mac_deployment_target = "10.11.0" - } +################################################################################ +# Build target aliases +# TODO(crbug.com/dawn/1275) - remove these +################################################################################ +group("dawn_native") { + public_deps = [ "../dawn/native" ] } - -# The VVLs are an optional dependency, only use it if the path has been set. -enable_vulkan_validation_layers = dawn_enable_vulkan_validation_layers && - dawn_vulkan_validation_layers_dir != "" -if (enable_vulkan_validation_layers) { - import("//build_overrides/vulkan_validation_layers.gni") -} - -# ANGLE is an optional dependency; only use it if the path has been set. -use_angle = dawn_use_angle && defined(dawn_angle_dir) - -# Swiftshader is an optional dependency, only use it if the path has been set. -use_swiftshader = dawn_use_swiftshader && dawn_swiftshader_dir != "" -if (use_swiftshader) { - assert(dawn_enable_vulkan, - "dawn_use_swiftshader requires dawn_enable_vulkan=true") - import("${dawn_swiftshader_dir}/src/Vulkan/vulkan.gni") -} - -# The Vulkan loader is an optional dependency, only use it if the path has been -# set. -if (dawn_enable_vulkan) { - enable_vulkan_loader = - dawn_enable_vulkan_loader && dawn_vulkan_loader_dir != "" -} - -group("dawn_abseil") { - # When build_with_chromium=true we need to include "//third_party/abseil-cpp:absl" while - # it's beneficial to be more specific with standalone Dawn, especially when it comes to - # including it as a dependency in other projects (such as Skia). - if (build_with_chromium) { - public_deps = [ "$dawn_abseil_dir:absl" ] - } else { - public_deps = [ "${dawn_root}/third_party/gn/abseil-cpp:str_format" ] - } -} - -config("dawn_native_internal") { - configs = [ "${dawn_root}/src/dawn/common:internal_config" ] - - # Suppress warnings that Metal isn't in the deployment target of Chrome: - # initialization of the Metal backend is behind a IsMetalSupported check so - # Dawn won't call Metal functions on macOS 10.10. - # At the time this is written Chromium supports 10.10.0 and above, so if we - # aren't on 10.11 it means we are on 10.11 and above, and Metal is available. - # Skipping this check on 10.11 and above is important as it allows getting - # proper compilation warning when using 10.12 and above feature for example. - # TODO(crbug.com/1004024): Consider using API_AVAILABLE annotations on all - # metal code in dawn once crbug.com/1004024 is sorted out if Chromium still - # supports 10.10 then. - if (is_mac && mac_deployment_target == "10.10.0") { - cflags_objcc = [ "-Wno-unguarded-availability" ] - } -} - -config("dawn_native_weak_framework") { - if (is_mac && dawn_enable_metal) { - weak_frameworks = [ "Metal.framework" ] - } -} - -# Config that adds the @executable_path rpath if needed so that Swiftshader or the Vulkan loader are found. -config("dawn_native_vulkan_rpath") { - if (is_mac && dawn_enable_vulkan && - (use_swiftshader || enable_vulkan_loader)) { - ldflags = [ - "-rpath", - "@executable_path/", - ] - } -} - -dawn_json_generator("dawn_native_utils_gen") { - target = "dawn_native_utils" - outputs = [ - "src/dawn_native/ChainUtils_autogen.h", - "src/dawn_native/ChainUtils_autogen.cpp", - "src/dawn_native/ProcTable.cpp", - "src/dawn_native/dawn_platform_autogen.h", - "src/dawn_native/wgpu_structs_autogen.h", - "src/dawn_native/wgpu_structs_autogen.cpp", - "src/dawn_native/ValidationUtils_autogen.h", - "src/dawn_native/ValidationUtils_autogen.cpp", - "src/dawn_native/webgpu_absl_format_autogen.h", - "src/dawn_native/webgpu_absl_format_autogen.cpp", - "src/dawn_native/ObjectType_autogen.h", - "src/dawn_native/ObjectType_autogen.cpp", - ] -} - -if (dawn_enable_opengl) { - dawn_generator("dawn_native_opengl_loader_gen") { - script = "${dawn_root}/generator/opengl_loader_generator.py" - args = [ - "--gl-xml", - rebase_path("${dawn_root}/third_party/khronos/gl.xml", root_build_dir), - "--supported-extensions", - rebase_path("opengl/supported_extensions.json", root_build_dir), - ] - outputs = [ - "src/dawn_native/opengl/OpenGLFunctionsBase_autogen.cpp", - "src/dawn_native/opengl/OpenGLFunctionsBase_autogen.h", - "src/dawn_native/opengl/opengl_platform_autogen.h", - ] - } -} - -# Public dawn_native headers so they can be publicly visible for -# dependencies of dawn_native -source_set("dawn_native_headers") { - public_deps = [ "${dawn_root}/src/dawn:dawncpp_headers" ] - all_dependent_configs = [ "${dawn_root}/src/dawn/common:public_include_dirs" ] - sources = [ - "${dawn_root}/src/include/dawn_native/DawnNative.h", - "${dawn_root}/src/include/dawn_native/dawn_native_export.h", - - # Include all backend's public headers so that dependencies can include - # them even when the backends are disabled. - "${dawn_root}/src/include/dawn_native/D3D12Backend.h", - "${dawn_root}/src/include/dawn_native/MetalBackend.h", - "${dawn_root}/src/include/dawn_native/NullBackend.h", - "${dawn_root}/src/include/dawn_native/OpenGLBackend.h", - "${dawn_root}/src/include/dawn_native/VulkanBackend.h", - ] -} - -# The meat of the compilation for dawn_native so that we can cheaply have -# shared_library / static_library versions of it. It compiles all the files -# except those that define exported symbols. -source_set("dawn_native_sources") { - deps = [ - ":dawn_native_headers", - ":dawn_native_utils_gen", - "${dawn_root}/src/dawn/common", - "${dawn_spirv_tools_dir}:spvtools_opt", - "${dawn_spirv_tools_dir}:spvtools_val", - "${dawn_tint_dir}/src:libtint", - ] - if (dawn_use_spirv_cross) { - deps += [ "${dawn_root}/third_party/gn/spirv_cross:spirv_cross" ] - } - defines = [] - libs = [] - data_deps = [] - - configs += [ ":dawn_native_internal" ] - - # Dependencies that are needed to compile dawn_native entry points in - # FooBackend.cpp need to be public deps so they are propagated to the - # dawn_native target - public_deps = [ - ":dawn_abseil", - "${dawn_root}/src/dawn/platform", - ] - - sources = get_target_outputs(":dawn_native_utils_gen") - sources += [ - "Adapter.cpp", - "Adapter.h", - "AsyncTask.cpp", - "AsyncTask.h", - "AttachmentState.cpp", - "AttachmentState.h", - "BackendConnection.cpp", - "BackendConnection.h", - "BindGroup.cpp", - "BindGroup.h", - "BindGroupLayout.cpp", - "BindGroupLayout.h", - "BindGroupTracker.h", - "BindingInfo.cpp", - "BindingInfo.h", - "BuddyAllocator.cpp", - "BuddyAllocator.h", - "BuddyMemoryAllocator.cpp", - "BuddyMemoryAllocator.h", - "Buffer.cpp", - "Buffer.h", - "CachedObject.cpp", - "CachedObject.h", - "CallbackTaskManager.cpp", - "CallbackTaskManager.h", - "CommandAllocator.cpp", - "CommandAllocator.h", - "CommandBuffer.cpp", - "CommandBuffer.h", - "CommandBufferStateTracker.cpp", - "CommandBufferStateTracker.h", - "CommandEncoder.cpp", - "CommandEncoder.h", - "CommandValidation.cpp", - "CommandValidation.h", - "Commands.cpp", - "Commands.h", - "CompilationMessages.cpp", - "CompilationMessages.h", - "ComputePassEncoder.cpp", - "ComputePassEncoder.h", - "ComputePipeline.cpp", - "ComputePipeline.h", - "CopyTextureForBrowserHelper.cpp", - "CopyTextureForBrowserHelper.h", - "CreatePipelineAsyncTask.cpp", - "CreatePipelineAsyncTask.h", - "Device.cpp", - "Device.h", - "DynamicUploader.cpp", - "DynamicUploader.h", - "EncodingContext.cpp", - "EncodingContext.h", - "EnumClassBitmasks.h", - "EnumMaskIterator.h", - "Error.cpp", - "Error.h", - "ErrorData.cpp", - "ErrorData.h", - "ErrorInjector.cpp", - "ErrorInjector.h", - "ErrorScope.cpp", - "ErrorScope.h", - "ExternalTexture.cpp", - "ExternalTexture.h", - "Features.cpp", - "Features.h", - "Format.cpp", - "Format.h", - "Forward.h", - "IndirectDrawMetadata.cpp", - "IndirectDrawMetadata.h", - "IndirectDrawValidationEncoder.cpp", - "IndirectDrawValidationEncoder.h", - "Instance.cpp", - "Instance.h", - "IntegerTypes.h", - "InternalPipelineStore.cpp", - "InternalPipelineStore.h", - "Limits.cpp", - "Limits.h", - "ObjectBase.cpp", - "ObjectBase.h", - "ObjectContentHasher.cpp", - "ObjectContentHasher.h", - "PassResourceUsage.h", - "PassResourceUsageTracker.cpp", - "PassResourceUsageTracker.h", - "PerStage.cpp", - "PerStage.h", - "PersistentCache.cpp", - "PersistentCache.h", - "Pipeline.cpp", - "Pipeline.h", - "PipelineLayout.cpp", - "PipelineLayout.h", - "PooledResourceMemoryAllocator.cpp", - "PooledResourceMemoryAllocator.h", - "ProgrammableEncoder.cpp", - "ProgrammableEncoder.h", - "QueryHelper.cpp", - "QueryHelper.h", - "QuerySet.cpp", - "QuerySet.h", - "Queue.cpp", - "Queue.h", - "RenderBundle.cpp", - "RenderBundle.h", - "RenderBundleEncoder.cpp", - "RenderBundleEncoder.h", - "RenderEncoderBase.cpp", - "RenderEncoderBase.h", - "RenderPassEncoder.cpp", - "RenderPassEncoder.h", - "RenderPipeline.cpp", - "RenderPipeline.h", - "ResourceHeap.h", - "ResourceHeapAllocator.h", - "ResourceMemoryAllocation.cpp", - "ResourceMemoryAllocation.h", - "RingBufferAllocator.cpp", - "RingBufferAllocator.h", - "Sampler.cpp", - "Sampler.h", - "ScratchBuffer.cpp", - "ScratchBuffer.h", - "ShaderModule.cpp", - "ShaderModule.h", - "StagingBuffer.cpp", - "StagingBuffer.h", - "Subresource.cpp", - "Subresource.h", - "SubresourceStorage.h", - "Surface.cpp", - "Surface.h", - "SwapChain.cpp", - "SwapChain.h", - "Texture.cpp", - "Texture.h", - "TintUtils.cpp", - "TintUtils.h", - "ToBackend.h", - "Toggles.cpp", - "Toggles.h", - "VertexFormat.cpp", - "VertexFormat.h", - "dawn_platform.h", - "utils/WGPUHelpers.cpp", - "utils/WGPUHelpers.h", - "webgpu_absl_format.cpp", - "webgpu_absl_format.h", - ] - - if (dawn_use_x11) { - libs += [ "X11" ] - sources += [ - "XlibXcbFunctions.cpp", - "XlibXcbFunctions.h", - ] - } - - # Only win32 app needs to link with user32.lib - # In UWP, all availiable APIs are defined in WindowsApp.lib - if (is_win && !dawn_is_winuwp) { - libs += [ "user32.lib" ] - } - - if (dawn_is_winuwp && is_debug) { - # DXGIGetDebugInterface1 is defined in dxgi.lib - # But this API is tagged as a development-only capability - # which implies that linking to this function will cause - # the application to fail Windows store certification - # So we only link to it in debug build when compiling for UWP. - # In win32 we load dxgi.dll using LoadLibrary - # so no need for static linking. - libs += [ "dxgi.lib" ] - } - - # TODO(dawn:766): - # Should link dxcompiler.lib and WinPixEventRuntime_UAP.lib in UWP - # Somehow use dxcompiler.lib makes CoreApp unable to activate - # WinPIX should be added as third party tools and linked statically - - if (dawn_enable_d3d12) { - libs += [ "dxguid.lib" ] - sources += [ - "d3d12/AdapterD3D12.cpp", - "d3d12/AdapterD3D12.h", - "d3d12/BackendD3D12.cpp", - "d3d12/BackendD3D12.h", - "d3d12/BindGroupD3D12.cpp", - "d3d12/BindGroupD3D12.h", - "d3d12/BindGroupLayoutD3D12.cpp", - "d3d12/BindGroupLayoutD3D12.h", - "d3d12/BufferD3D12.cpp", - "d3d12/BufferD3D12.h", - "d3d12/CPUDescriptorHeapAllocationD3D12.cpp", - "d3d12/CPUDescriptorHeapAllocationD3D12.h", - "d3d12/CommandAllocatorManager.cpp", - "d3d12/CommandAllocatorManager.h", - "d3d12/CommandBufferD3D12.cpp", - "d3d12/CommandBufferD3D12.h", - "d3d12/CommandRecordingContext.cpp", - "d3d12/CommandRecordingContext.h", - "d3d12/ComputePipelineD3D12.cpp", - "d3d12/ComputePipelineD3D12.h", - "d3d12/D3D11on12Util.cpp", - "d3d12/D3D11on12Util.h", - "d3d12/D3D12Error.cpp", - "d3d12/D3D12Error.h", - "d3d12/D3D12Info.cpp", - "d3d12/D3D12Info.h", - "d3d12/DeviceD3D12.cpp", - "d3d12/DeviceD3D12.h", - "d3d12/Forward.h", - "d3d12/GPUDescriptorHeapAllocationD3D12.cpp", - "d3d12/GPUDescriptorHeapAllocationD3D12.h", - "d3d12/HeapAllocatorD3D12.cpp", - "d3d12/HeapAllocatorD3D12.h", - "d3d12/HeapD3D12.cpp", - "d3d12/HeapD3D12.h", - "d3d12/IntegerTypes.h", - "d3d12/NativeSwapChainImplD3D12.cpp", - "d3d12/NativeSwapChainImplD3D12.h", - "d3d12/PageableD3D12.cpp", - "d3d12/PageableD3D12.h", - "d3d12/PipelineLayoutD3D12.cpp", - "d3d12/PipelineLayoutD3D12.h", - "d3d12/PlatformFunctions.cpp", - "d3d12/PlatformFunctions.h", - "d3d12/QuerySetD3D12.cpp", - "d3d12/QuerySetD3D12.h", - "d3d12/QueueD3D12.cpp", - "d3d12/QueueD3D12.h", - "d3d12/RenderPassBuilderD3D12.cpp", - "d3d12/RenderPassBuilderD3D12.h", - "d3d12/RenderPipelineD3D12.cpp", - "d3d12/RenderPipelineD3D12.h", - "d3d12/ResidencyManagerD3D12.cpp", - "d3d12/ResidencyManagerD3D12.h", - "d3d12/ResourceAllocatorManagerD3D12.cpp", - "d3d12/ResourceAllocatorManagerD3D12.h", - "d3d12/ResourceHeapAllocationD3D12.cpp", - "d3d12/ResourceHeapAllocationD3D12.h", - "d3d12/SamplerD3D12.cpp", - "d3d12/SamplerD3D12.h", - "d3d12/SamplerHeapCacheD3D12.cpp", - "d3d12/SamplerHeapCacheD3D12.h", - "d3d12/ShaderModuleD3D12.cpp", - "d3d12/ShaderModuleD3D12.h", - "d3d12/ShaderVisibleDescriptorAllocatorD3D12.cpp", - "d3d12/ShaderVisibleDescriptorAllocatorD3D12.h", - "d3d12/StagingBufferD3D12.cpp", - "d3d12/StagingBufferD3D12.h", - "d3d12/StagingDescriptorAllocatorD3D12.cpp", - "d3d12/StagingDescriptorAllocatorD3D12.h", - "d3d12/SwapChainD3D12.cpp", - "d3d12/SwapChainD3D12.h", - "d3d12/TextureCopySplitter.cpp", - "d3d12/TextureCopySplitter.h", - "d3d12/TextureD3D12.cpp", - "d3d12/TextureD3D12.h", - "d3d12/UtilsD3D12.cpp", - "d3d12/UtilsD3D12.h", - "d3d12/d3d12_platform.h", - ] - } - - if (dawn_enable_metal) { - frameworks = [ - "Cocoa.framework", - "IOKit.framework", - "IOSurface.framework", - "QuartzCore.framework", - ] - sources += [ - "Surface_metal.mm", - "metal/BackendMTL.h", - "metal/BackendMTL.mm", - "metal/BindGroupLayoutMTL.h", - "metal/BindGroupLayoutMTL.mm", - "metal/BindGroupMTL.h", - "metal/BindGroupMTL.mm", - "metal/BufferMTL.h", - "metal/BufferMTL.mm", - "metal/CommandBufferMTL.h", - "metal/CommandBufferMTL.mm", - "metal/CommandRecordingContext.h", - "metal/CommandRecordingContext.mm", - "metal/ComputePipelineMTL.h", - "metal/ComputePipelineMTL.mm", - "metal/DeviceMTL.h", - "metal/DeviceMTL.mm", - "metal/Forward.h", - "metal/PipelineLayoutMTL.h", - "metal/PipelineLayoutMTL.mm", - "metal/QuerySetMTL.h", - "metal/QuerySetMTL.mm", - "metal/QueueMTL.h", - "metal/QueueMTL.mm", - "metal/RenderPipelineMTL.h", - "metal/RenderPipelineMTL.mm", - "metal/SamplerMTL.h", - "metal/SamplerMTL.mm", - "metal/ShaderModuleMTL.h", - "metal/ShaderModuleMTL.mm", - "metal/StagingBufferMTL.h", - "metal/StagingBufferMTL.mm", - "metal/SwapChainMTL.h", - "metal/SwapChainMTL.mm", - "metal/TextureMTL.h", - "metal/TextureMTL.mm", - "metal/UtilsMetal.h", - "metal/UtilsMetal.mm", - ] - } - - if (dawn_enable_null) { - sources += [ - "null/DeviceNull.cpp", - "null/DeviceNull.h", - ] - } - - if (dawn_enable_opengl || dawn_enable_vulkan) { - sources += [ - "SpirvValidation.cpp", - "SpirvValidation.h", - ] - } - - if (dawn_enable_opengl) { - public_deps += [ - ":dawn_native_opengl_loader_gen", - "${dawn_root}/third_party/khronos:khronos_platform", - ] - sources += get_target_outputs(":dawn_native_opengl_loader_gen") - sources += [ - "opengl/BackendGL.cpp", - "opengl/BackendGL.h", - "opengl/BindGroupGL.cpp", - "opengl/BindGroupGL.h", - "opengl/BindGroupLayoutGL.cpp", - "opengl/BindGroupLayoutGL.h", - "opengl/BufferGL.cpp", - "opengl/BufferGL.h", - "opengl/CommandBufferGL.cpp", - "opengl/CommandBufferGL.h", - "opengl/ComputePipelineGL.cpp", - "opengl/ComputePipelineGL.h", - "opengl/DeviceGL.cpp", - "opengl/DeviceGL.h", - "opengl/Forward.h", - "opengl/GLFormat.cpp", - "opengl/GLFormat.h", - "opengl/NativeSwapChainImplGL.cpp", - "opengl/NativeSwapChainImplGL.h", - "opengl/OpenGLFunctions.cpp", - "opengl/OpenGLFunctions.h", - "opengl/OpenGLVersion.cpp", - "opengl/OpenGLVersion.h", - "opengl/PersistentPipelineStateGL.cpp", - "opengl/PersistentPipelineStateGL.h", - "opengl/PipelineGL.cpp", - "opengl/PipelineGL.h", - "opengl/PipelineLayoutGL.cpp", - "opengl/PipelineLayoutGL.h", - "opengl/QuerySetGL.cpp", - "opengl/QuerySetGL.h", - "opengl/QueueGL.cpp", - "opengl/QueueGL.h", - "opengl/RenderPipelineGL.cpp", - "opengl/RenderPipelineGL.h", - "opengl/SamplerGL.cpp", - "opengl/SamplerGL.h", - "opengl/ShaderModuleGL.cpp", - "opengl/ShaderModuleGL.h", - "opengl/SpirvUtils.cpp", - "opengl/SpirvUtils.h", - "opengl/SwapChainGL.cpp", - "opengl/SwapChainGL.h", - "opengl/TextureGL.cpp", - "opengl/TextureGL.h", - "opengl/UtilsGL.cpp", - "opengl/UtilsGL.h", - "opengl/opengl_platform.h", - ] - } - - if (dawn_enable_vulkan) { - public_deps += [ "${dawn_root}/third_party/khronos:vulkan_headers" ] - sources += [ - "vulkan/AdapterVk.cpp", - "vulkan/AdapterVk.h", - "vulkan/BackendVk.cpp", - "vulkan/BackendVk.h", - "vulkan/BindGroupLayoutVk.cpp", - "vulkan/BindGroupLayoutVk.h", - "vulkan/BindGroupVk.cpp", - "vulkan/BindGroupVk.h", - "vulkan/BufferVk.cpp", - "vulkan/BufferVk.h", - "vulkan/CommandBufferVk.cpp", - "vulkan/CommandBufferVk.h", - "vulkan/CommandRecordingContext.h", - "vulkan/ComputePipelineVk.cpp", - "vulkan/ComputePipelineVk.h", - "vulkan/DescriptorSetAllocation.h", - "vulkan/DescriptorSetAllocator.cpp", - "vulkan/DescriptorSetAllocator.h", - "vulkan/DeviceVk.cpp", - "vulkan/DeviceVk.h", - "vulkan/ExternalHandle.h", - "vulkan/FencedDeleter.cpp", - "vulkan/FencedDeleter.h", - "vulkan/Forward.h", - "vulkan/NativeSwapChainImplVk.cpp", - "vulkan/NativeSwapChainImplVk.h", - "vulkan/PipelineLayoutVk.cpp", - "vulkan/PipelineLayoutVk.h", - "vulkan/QuerySetVk.cpp", - "vulkan/QuerySetVk.h", - "vulkan/QueueVk.cpp", - "vulkan/QueueVk.h", - "vulkan/RenderPassCache.cpp", - "vulkan/RenderPassCache.h", - "vulkan/RenderPipelineVk.cpp", - "vulkan/RenderPipelineVk.h", - "vulkan/ResourceHeapVk.cpp", - "vulkan/ResourceHeapVk.h", - "vulkan/ResourceMemoryAllocatorVk.cpp", - "vulkan/ResourceMemoryAllocatorVk.h", - "vulkan/SamplerVk.cpp", - "vulkan/SamplerVk.h", - "vulkan/ShaderModuleVk.cpp", - "vulkan/ShaderModuleVk.h", - "vulkan/StagingBufferVk.cpp", - "vulkan/StagingBufferVk.h", - "vulkan/SwapChainVk.cpp", - "vulkan/SwapChainVk.h", - "vulkan/TextureVk.cpp", - "vulkan/TextureVk.h", - "vulkan/UtilsVulkan.cpp", - "vulkan/UtilsVulkan.h", - "vulkan/VulkanError.cpp", - "vulkan/VulkanError.h", - "vulkan/VulkanExtensions.cpp", - "vulkan/VulkanExtensions.h", - "vulkan/VulkanFunctions.cpp", - "vulkan/VulkanFunctions.h", - "vulkan/VulkanInfo.cpp", - "vulkan/VulkanInfo.h", - "vulkan/external_memory/MemoryService.h", - "vulkan/external_semaphore/SemaphoreService.h", - ] - - if (is_chromeos) { - sources += [ - "vulkan/external_memory/MemoryServiceDmaBuf.cpp", - "vulkan/external_semaphore/SemaphoreServiceFD.cpp", - ] - defines += [ "DAWN_USE_SYNC_FDS" ] - } else if (is_linux) { - sources += [ - "vulkan/external_memory/MemoryServiceOpaqueFD.cpp", - "vulkan/external_semaphore/SemaphoreServiceFD.cpp", - ] - } else if (is_fuchsia) { - sources += [ - "vulkan/external_memory/MemoryServiceZirconHandle.cpp", - "vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp", - ] - } else { - sources += [ - "vulkan/external_memory/MemoryServiceNull.cpp", - "vulkan/external_semaphore/SemaphoreServiceNull.cpp", - ] - } - if (build_with_chromium && is_fuchsia) { - # Necessary to ensure that the Vulkan libraries will be in the - # final Fuchsia package. - data_deps = [ - "//third_party/fuchsia-sdk:vulkan_base", - "//third_party/fuchsia-sdk:vulkan_validation", - - # NOTE: The line below is a work around for http://crbug.com/1001081 - "//third_party/fuchsia-sdk/sdk:trace_engine", - ] - } - if (dawn_is_winuwp) { - defines += [ "DAWN_IS_WINUWP" ] - } - if (enable_vulkan_validation_layers) { - defines += [ - "DAWN_ENABLE_VULKAN_VALIDATION_LAYERS", - "DAWN_VK_DATA_DIR=\"$vulkan_data_subdir\"", - ] - } - if (enable_vulkan_loader) { - data_deps += [ "${dawn_vulkan_loader_dir}:libvulkan" ] - } - if (use_swiftshader) { - data_deps += - [ "${dawn_swiftshader_dir}/src/Vulkan:swiftshader_libvulkan" ] - defines += [ "DAWN_ENABLE_SWIFTSHADER" ] - } - } - - if (use_angle) { - data_deps += [ - "${dawn_angle_dir}:libEGL", - "${dawn_angle_dir}:libGLESv2", - ] - } -} - -# The static and shared libraries for dawn_native. Most of the files are -# already compiled in dawn_native_sources, but we still need to compile -# files defining exported symbols. -dawn_component("dawn_native") { - DEFINE_PREFIX = "DAWN_NATIVE" - - #Make headers publically visible - public_deps = [ ":dawn_native_headers" ] - - deps = [ - ":dawn_native_sources", - "${dawn_root}/src/dawn/common", - ] - sources = [ "DawnNative.cpp" ] - configs = [ ":dawn_native_internal" ] - public_configs = [ - ":dawn_native_weak_framework", - ":dawn_native_vulkan_rpath", - ] - - if (dawn_enable_d3d12) { - sources += [ "d3d12/D3D12Backend.cpp" ] - } - if (dawn_enable_metal) { - sources += [ "metal/MetalBackend.mm" ] - } - if (dawn_enable_null) { - sources += [ "null/NullBackend.cpp" ] - } - if (dawn_enable_opengl) { - sources += [ "opengl/OpenGLBackend.cpp" ] - } - if (dawn_enable_vulkan) { - sources += [ "vulkan/VulkanBackend.cpp" ] - - if (enable_vulkan_validation_layers) { - data_deps = - [ "${dawn_vulkan_validation_layers_dir}:vulkan_validation_layers" ] - if (!is_android) { - data_deps += - [ "${dawn_vulkan_validation_layers_dir}:vulkan_gen_json_files" ] - } - } - } -} - -dawn_json_generator("webgpu_dawn_native_proc_gen") { - target = "webgpu_dawn_native_proc" - outputs = [ "src/dawn_native/webgpu_dawn_native_proc.cpp" ] -} - -dawn_component("webgpu_dawn") { - # For a single library - build `webgpu_dawn_shared` with GN args: - # dawn_complete_static_libs = true - to package a single lib - # - # is_debug = false - # - setting this to true makes library over 50Mb - # - # use_custom_libcxx = false - # - Otherwise, libc++ symbols may conflict if the - # library is used outside of Chromium. - # - # dawn_use_swiftshader = false - # angle_enable_swiftshader = false - # - SwiftShader can't be built without use_custom_libcxx. - # It should be built separately. - DEFINE_PREFIX = "WGPU" - - sources = get_target_outputs(":webgpu_dawn_native_proc_gen") - deps = [ - ":static", - ":webgpu_dawn_native_proc_gen", - ] +group("webgpu_dawn") { + public_deps = [ "../dawn/native:webgpu_dawn" ] } diff --git a/src/fuzzers/dawn/BUILD.gn b/src/fuzzers/dawn/BUILD.gn index 063ec5668e..c2a851d5d6 100644 --- a/src/fuzzers/dawn/BUILD.gn +++ b/src/fuzzers/dawn/BUILD.gn @@ -78,9 +78,9 @@ static_library("dawn_wire_server_fuzzer_common") { "${dawn_root}/src/dawn:dawn_proc", "${dawn_root}/src/dawn:dawncpp", "${dawn_root}/src/dawn/common", + "${dawn_root}/src/dawn/native:static", "${dawn_root}/src/dawn/utils", "${dawn_root}/src/dawn/wire:static", - "${dawn_root}/src/dawn_native:static", ] } diff --git a/src/fuzzers/dawn/DawnWireServerAndD3D12BackendFuzzer.cpp b/src/fuzzers/dawn/DawnWireServerAndD3D12BackendFuzzer.cpp index f170e04812..2eff9b4c62 100644 --- a/src/fuzzers/dawn/DawnWireServerAndD3D12BackendFuzzer.cpp +++ b/src/fuzzers/dawn/DawnWireServerAndD3D12BackendFuzzer.cpp @@ -14,7 +14,7 @@ #include "DawnWireServerFuzzer.h" -#include "dawn_native/DawnNative.h" +#include "dawn/native/DawnNative.h" #include "testing/libfuzzer/libfuzzer_exports.h" extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv) { diff --git a/src/fuzzers/dawn/DawnWireServerAndFrontendFuzzer.cpp b/src/fuzzers/dawn/DawnWireServerAndFrontendFuzzer.cpp index 47c5312a2d..26e1cce09c 100644 --- a/src/fuzzers/dawn/DawnWireServerAndFrontendFuzzer.cpp +++ b/src/fuzzers/dawn/DawnWireServerAndFrontendFuzzer.cpp @@ -15,7 +15,7 @@ #include "DawnWireServerFuzzer.h" #include "dawn/common/Assert.h" -#include "dawn_native/DawnNative.h" +#include "dawn/native/DawnNative.h" #include "testing/libfuzzer/libfuzzer_exports.h" extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv) { diff --git a/src/fuzzers/dawn/DawnWireServerAndVulkanBackendFuzzer.cpp b/src/fuzzers/dawn/DawnWireServerAndVulkanBackendFuzzer.cpp index 6a0e95110b..157ce01dc1 100644 --- a/src/fuzzers/dawn/DawnWireServerAndVulkanBackendFuzzer.cpp +++ b/src/fuzzers/dawn/DawnWireServerAndVulkanBackendFuzzer.cpp @@ -14,7 +14,7 @@ #include "DawnWireServerFuzzer.h" -#include "dawn_native/DawnNative.h" +#include "dawn/native/DawnNative.h" #include "testing/libfuzzer/libfuzzer_exports.h" extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv) { diff --git a/src/fuzzers/dawn/DawnWireServerFuzzer.cpp b/src/fuzzers/dawn/DawnWireServerFuzzer.cpp index a64ef3271b..bf35518697 100644 --- a/src/fuzzers/dawn/DawnWireServerFuzzer.cpp +++ b/src/fuzzers/dawn/DawnWireServerFuzzer.cpp @@ -18,10 +18,10 @@ #include "dawn/common/Log.h" #include "dawn/common/SystemUtils.h" #include "dawn/dawn_proc.h" +#include "dawn/native/DawnNative.h" #include "dawn/utils/SystemUtils.h" #include "dawn/webgpu_cpp.h" #include "dawn/wire/WireServer.h" -#include "dawn_native/DawnNative.h" #include #include diff --git a/src/include/dawn/native/D3D12Backend.h b/src/include/dawn/native/D3D12Backend.h new file mode 100644 index 0000000000..6f11bb77f5 --- /dev/null +++ b/src/include/dawn/native/D3D12Backend.h @@ -0,0 +1,111 @@ +// Copyright 2018 The Dawn Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef DAWNNATIVE_D3D12BACKEND_H_ +#define DAWNNATIVE_D3D12BACKEND_H_ + +#include +#include + +#include +#include +#include +#include + +#include + +struct ID3D12Device; +struct ID3D12Resource; + +namespace dawn::native::d3d12 { + + class D3D11on12ResourceCache; + + DAWN_NATIVE_EXPORT Microsoft::WRL::ComPtr GetD3D12Device(WGPUDevice device); + DAWN_NATIVE_EXPORT DawnSwapChainImplementation CreateNativeSwapChainImpl(WGPUDevice device, + HWND window); + DAWN_NATIVE_EXPORT WGPUTextureFormat + GetNativeSwapChainPreferredFormat(const DawnSwapChainImplementation* swapChain); + + enum MemorySegment { + Local, + NonLocal, + }; + + DAWN_NATIVE_EXPORT uint64_t SetExternalMemoryReservation(WGPUDevice device, + uint64_t requestedReservationSize, + MemorySegment memorySegment); + + struct DAWN_NATIVE_EXPORT ExternalImageDescriptorDXGISharedHandle : ExternalImageDescriptor { + public: + ExternalImageDescriptorDXGISharedHandle(); + + // Note: SharedHandle must be a handle to a texture object. + HANDLE sharedHandle; + }; + + // Keyed mutex acquire/release uses a fixed key of 0 to match Chromium behavior. + constexpr UINT64 kDXGIKeyedMutexAcquireReleaseKey = 0; + + struct DAWN_NATIVE_EXPORT ExternalImageAccessDescriptorDXGIKeyedMutex + : ExternalImageAccessDescriptor { + public: + // TODO(chromium:1241533): Remove deprecated keyed mutex params after removing associated + // code from Chromium - we use a fixed key of 0 for acquire and release everywhere now. + uint64_t acquireMutexKey; + uint64_t releaseMutexKey; + bool isSwapChainTexture = false; + }; + + class DAWN_NATIVE_EXPORT ExternalImageDXGI { + public: + ~ExternalImageDXGI(); + + // Note: SharedHandle must be a handle to a texture object. + static std::unique_ptr Create( + WGPUDevice device, + const ExternalImageDescriptorDXGISharedHandle* descriptor); + + WGPUTexture ProduceTexture(WGPUDevice device, + const ExternalImageAccessDescriptorDXGIKeyedMutex* descriptor); + + private: + ExternalImageDXGI(Microsoft::WRL::ComPtr d3d12Resource, + const WGPUTextureDescriptor* descriptor); + + Microsoft::WRL::ComPtr mD3D12Resource; + + // Contents of WGPUTextureDescriptor are stored individually since the descriptor + // could outlive this image. + WGPUTextureUsageFlags mUsage; + WGPUTextureUsageFlags mUsageInternal = WGPUTextureUsage_None; + WGPUTextureDimension mDimension; + WGPUExtent3D mSize; + WGPUTextureFormat mFormat; + uint32_t mMipLevelCount; + uint32_t mSampleCount; + + std::unique_ptr mD3D11on12ResourceCache; + }; + + struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase { + AdapterDiscoveryOptions(); + AdapterDiscoveryOptions(Microsoft::WRL::ComPtr adapter); + + Microsoft::WRL::ComPtr dxgiAdapter; + }; + +} // namespace dawn::native::d3d12 + +#endif // DAWNNATIVE_D3D12BACKEND_H_ diff --git a/src/include/dawn/native/DawnNative.h b/src/include/dawn/native/DawnNative.h new file mode 100644 index 0000000000..d62d0ef02a --- /dev/null +++ b/src/include/dawn/native/DawnNative.h @@ -0,0 +1,261 @@ +// Copyright 2018 The Dawn Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef DAWNNATIVE_DAWNNATIVE_H_ +#define DAWNNATIVE_DAWNNATIVE_H_ + +#include +#include +#include + +#include +#include + +namespace dawn::platform { + class Platform; +} // namespace dawn::platform + +namespace wgpu { + struct AdapterProperties; + struct DeviceDescriptor; +} // namespace wgpu + +namespace dawn::native { + + class InstanceBase; + class AdapterBase; + + // An optional parameter of Adapter::CreateDevice() to send additional information when creating + // a Device. For example, we can use it to enable a workaround, optimization or feature. + struct DAWN_NATIVE_EXPORT DawnDeviceDescriptor { + std::vector requiredFeatures; + std::vector forceEnabledToggles; + std::vector forceDisabledToggles; + + const WGPURequiredLimits* requiredLimits = nullptr; + }; + + // A struct to record the information of a toggle. A toggle is a code path in Dawn device that + // can be manually configured to run or not outside Dawn, including workarounds, special + // features and optimizations. + struct ToggleInfo { + const char* name; + const char* description; + const char* url; + }; + + // A struct to record the information of a feature. A feature is a GPU feature that is not + // required to be supported by all Dawn backends and can only be used when it is enabled on the + // creation of device. + using FeatureInfo = ToggleInfo; + + // An adapter is an object that represent on possibility of creating devices in the system. + // Most of the time it will represent a combination of a physical GPU and an API. Not that the + // same GPU can be represented by multiple adapters but on different APIs. + // + // The underlying Dawn adapter is owned by the Dawn instance so this class is not RAII but just + // a reference to an underlying adapter. + class DAWN_NATIVE_EXPORT Adapter { + public: + Adapter(); + Adapter(AdapterBase* impl); + ~Adapter(); + + Adapter(const Adapter& other); + Adapter& operator=(const Adapter& other); + + // Essentially webgpu.h's wgpuAdapterGetProperties while we don't have WGPUAdapter in + // dawn.json + void GetProperties(wgpu::AdapterProperties* properties) const; + void GetProperties(WGPUAdapterProperties* properties) const; + + std::vector GetSupportedExtensions() const; + std::vector GetSupportedFeatures() const; + WGPUDeviceProperties GetAdapterProperties() const; + bool GetLimits(WGPUSupportedLimits* limits) const; + + void SetUseTieredLimits(bool useTieredLimits); + + // Check that the Adapter is able to support importing external images. This is necessary + // to implement the swapchain and interop APIs in Chromium. + bool SupportsExternalImages() const; + + explicit operator bool() const; + + // Create a device on this adapter. On an error, nullptr is returned. + WGPUDevice CreateDevice(const DawnDeviceDescriptor* deviceDescriptor); + WGPUDevice CreateDevice(const wgpu::DeviceDescriptor* deviceDescriptor); + WGPUDevice CreateDevice(const WGPUDeviceDescriptor* deviceDescriptor = nullptr); + + void RequestDevice(const DawnDeviceDescriptor* descriptor, + WGPURequestDeviceCallback callback, + void* userdata); + void RequestDevice(const wgpu::DeviceDescriptor* descriptor, + WGPURequestDeviceCallback callback, + void* userdata); + void RequestDevice(const WGPUDeviceDescriptor* descriptor, + WGPURequestDeviceCallback callback, + void* userdata); + + // Returns the underlying WGPUAdapter object. + WGPUAdapter Get() const; + + // Reset the backend device object for testing purposes. + void ResetInternalDeviceForTesting(); + + private: + AdapterBase* mImpl = nullptr; + }; + + // Base class for options passed to Instance::DiscoverAdapters. + struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptionsBase { + public: + const WGPUBackendType backendType; + + protected: + AdapterDiscoveryOptionsBase(WGPUBackendType type); + }; + + enum BackendValidationLevel { Full, Partial, Disabled }; + + // Represents a connection to dawn_native and is used for dependency injection, discovering + // system adapters and injecting custom adapters (like a Swiftshader Vulkan adapter). + // + // This is an RAII class for Dawn instances and also controls the lifetime of all adapters + // for this instance. + class DAWN_NATIVE_EXPORT Instance { + public: + explicit Instance(const WGPUInstanceDescriptor* desc = nullptr); + ~Instance(); + + Instance(const Instance& other) = delete; + Instance& operator=(const Instance& other) = delete; + + // Gather all adapters in the system that can be accessed with no special options. These + // adapters will later be returned by GetAdapters. + void DiscoverDefaultAdapters(); + + // Adds adapters that can be discovered with the options provided (like a getProcAddress). + // The backend is chosen based on the type of the options used. Returns true on success. + bool DiscoverAdapters(const AdapterDiscoveryOptionsBase* options); + + // Returns all the adapters that the instance knows about. + std::vector GetAdapters() const; + + const ToggleInfo* GetToggleInfo(const char* toggleName); + const FeatureInfo* GetFeatureInfo(WGPUFeatureName feature); + + // Enables backend validation layers + void EnableBackendValidation(bool enableBackendValidation); + void SetBackendValidationLevel(BackendValidationLevel validationLevel); + + // Enable debug capture on Dawn startup + void EnableBeginCaptureOnStartup(bool beginCaptureOnStartup); + + void SetPlatform(dawn::platform::Platform* platform); + + // Returns the underlying WGPUInstance object. + WGPUInstance Get() const; + + private: + InstanceBase* mImpl = nullptr; + }; + + // Backend-agnostic API for dawn_native + DAWN_NATIVE_EXPORT const DawnProcTable& GetProcs(); + + // Query the names of all the toggles that are enabled in device + DAWN_NATIVE_EXPORT std::vector GetTogglesUsed(WGPUDevice device); + + // Backdoor to get the number of lazy clears for testing + DAWN_NATIVE_EXPORT size_t GetLazyClearCountForTesting(WGPUDevice device); + + // Backdoor to get the number of deprecation warnings for testing + DAWN_NATIVE_EXPORT size_t GetDeprecationWarningCountForTesting(WGPUDevice device); + + // Query if texture has been initialized + DAWN_NATIVE_EXPORT bool IsTextureSubresourceInitialized( + WGPUTexture texture, + uint32_t baseMipLevel, + uint32_t levelCount, + uint32_t baseArrayLayer, + uint32_t layerCount, + WGPUTextureAspect aspect = WGPUTextureAspect_All); + + // Backdoor to get the order of the ProcMap for testing + DAWN_NATIVE_EXPORT std::vector GetProcMapNamesForTesting(); + + DAWN_NATIVE_EXPORT bool DeviceTick(WGPUDevice device); + + // ErrorInjector functions used for testing only. Defined in dawn_native/ErrorInjector.cpp + DAWN_NATIVE_EXPORT void EnableErrorInjector(); + DAWN_NATIVE_EXPORT void DisableErrorInjector(); + DAWN_NATIVE_EXPORT void ClearErrorInjector(); + DAWN_NATIVE_EXPORT uint64_t AcquireErrorInjectorCallCount(); + DAWN_NATIVE_EXPORT void InjectErrorAt(uint64_t index); + + // The different types of external images + enum ExternalImageType { + OpaqueFD, + DmaBuf, + IOSurface, + DXGISharedHandle, + EGLImage, + }; + + // Common properties of external images + struct DAWN_NATIVE_EXPORT ExternalImageDescriptor { + public: + const WGPUTextureDescriptor* cTextureDescriptor; // Must match image creation params + bool isInitialized; // Whether the texture is initialized on import + ExternalImageType GetType() const; + + protected: + ExternalImageDescriptor(ExternalImageType type); + + private: + ExternalImageType mType; + }; + + struct DAWN_NATIVE_EXPORT ExternalImageAccessDescriptor { + public: + bool isInitialized; // Whether the texture is initialized on import + WGPUTextureUsageFlags usage; + }; + + struct DAWN_NATIVE_EXPORT ExternalImageExportInfo { + public: + bool isInitialized; // Whether the texture is initialized after export + ExternalImageType GetType() const; + + protected: + ExternalImageExportInfo(ExternalImageType type); + + private: + ExternalImageType mType; + }; + + DAWN_NATIVE_EXPORT const char* GetObjectLabelForTesting(void* objectHandle); + + DAWN_NATIVE_EXPORT uint64_t GetAllocatedSizeForTesting(WGPUBuffer buffer); + + DAWN_NATIVE_EXPORT bool BindGroupLayoutBindingsEqualForTesting(WGPUBindGroupLayout a, + WGPUBindGroupLayout b); + +} // namespace dawn::native + +// TODO(dawn:824): Remove once the deprecation period is passed. +namespace dawn_native = dawn::native; + +#endif // DAWNNATIVE_DAWNNATIVE_H_ diff --git a/src/include/dawn/native/MetalBackend.h b/src/include/dawn/native/MetalBackend.h new file mode 100644 index 0000000000..e8699bd02d --- /dev/null +++ b/src/include/dawn/native/MetalBackend.h @@ -0,0 +1,71 @@ +// Copyright 2018 The Dawn Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef DAWNNATIVE_METALBACKEND_H_ +#define DAWNNATIVE_METALBACKEND_H_ + +#include +#include + +// The specifics of the Metal backend expose types in function signatures that might not be +// available in dependent's minimum supported SDK version. Suppress all availability errors using +// clang's pragmas. Dependents using the types without guarded availability will still get errors +// when using the types. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunguarded-availability" + +struct __IOSurface; +typedef __IOSurface* IOSurfaceRef; + +#ifdef __OBJC__ +# import +#endif //__OBJC__ + +namespace dawn::native::metal { + + struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase { + AdapterDiscoveryOptions(); + }; + + struct DAWN_NATIVE_EXPORT ExternalImageDescriptorIOSurface : ExternalImageDescriptor { + public: + ExternalImageDescriptorIOSurface(); + + IOSurfaceRef ioSurface; + uint32_t plane; + }; + + DAWN_NATIVE_EXPORT WGPUTexture + WrapIOSurface(WGPUDevice device, const ExternalImageDescriptorIOSurface* descriptor); + + // When making Metal interop with other APIs, we need to be careful that QueueSubmit doesn't + // mean that the operations will be visible to other APIs/Metal devices right away. macOS + // does have a global queue of graphics operations, but the command buffers are inserted there + // when they are "scheduled". Submitting other operations before the command buffer is + // scheduled could lead to races in who gets scheduled first and incorrect rendering. + DAWN_NATIVE_EXPORT void WaitForCommandsToBeScheduled(WGPUDevice device); + +} // namespace dawn::native::metal + +#ifdef __OBJC__ +namespace dawn::native::metal { + + DAWN_NATIVE_EXPORT id GetMetalDevice(WGPUDevice device); + +} // namespace dawn::native::metal +#endif // __OBJC__ + +#pragma clang diagnostic pop + +#endif // DAWNNATIVE_METALBACKEND_H_ diff --git a/src/include/dawn/native/NullBackend.h b/src/include/dawn/native/NullBackend.h new file mode 100644 index 0000000000..d2799e39ca --- /dev/null +++ b/src/include/dawn/native/NullBackend.h @@ -0,0 +1,25 @@ +// Copyright 2018 The Dawn Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef DAWNNATIVE_NULLBACKEND_H_ +#define DAWNNATIVE_NULLBACKEND_H_ + +#include +#include + +namespace dawn::native::null { + DAWN_NATIVE_EXPORT DawnSwapChainImplementation CreateNativeSwapChainImpl(); +} // namespace dawn::native::null + +#endif // DAWNNATIVE_NULLBACKEND_H_ diff --git a/src/include/dawn/native/OpenGLBackend.h b/src/include/dawn/native/OpenGLBackend.h new file mode 100644 index 0000000000..53c878c48d --- /dev/null +++ b/src/include/dawn/native/OpenGLBackend.h @@ -0,0 +1,55 @@ +// Copyright 2018 The Dawn Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef DAWNNATIVE_OPENGLBACKEND_H_ +#define DAWNNATIVE_OPENGLBACKEND_H_ + +typedef void* EGLImage; + +#include +#include + +namespace dawn::native::opengl { + + struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase { + AdapterDiscoveryOptions(); + + void* (*getProc)(const char*); + }; + + struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptionsES : public AdapterDiscoveryOptionsBase { + AdapterDiscoveryOptionsES(); + + void* (*getProc)(const char*); + }; + + using PresentCallback = void (*)(void*); + DAWN_NATIVE_EXPORT DawnSwapChainImplementation + CreateNativeSwapChainImpl(WGPUDevice device, PresentCallback present, void* presentUserdata); + DAWN_NATIVE_EXPORT WGPUTextureFormat + GetNativeSwapChainPreferredFormat(const DawnSwapChainImplementation* swapChain); + + struct DAWN_NATIVE_EXPORT ExternalImageDescriptorEGLImage : ExternalImageDescriptor { + public: + ExternalImageDescriptorEGLImage(); + + ::EGLImage image; + }; + + DAWN_NATIVE_EXPORT WGPUTexture + WrapExternalEGLImage(WGPUDevice device, const ExternalImageDescriptorEGLImage* descriptor); + +} // namespace dawn::native::opengl + +#endif // DAWNNATIVE_OPENGLBACKEND_H_ diff --git a/src/include/dawn/native/VulkanBackend.h b/src/include/dawn/native/VulkanBackend.h new file mode 100644 index 0000000000..a02cc3c55e --- /dev/null +++ b/src/include/dawn/native/VulkanBackend.h @@ -0,0 +1,140 @@ +// Copyright 2018 The Dawn Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef DAWNNATIVE_VULKANBACKEND_H_ +#define DAWNNATIVE_VULKANBACKEND_H_ + +#include +#include + +#include + +#include + +namespace dawn::native::vulkan { + + DAWN_NATIVE_EXPORT VkInstance GetInstance(WGPUDevice device); + + DAWN_NATIVE_EXPORT PFN_vkVoidFunction GetInstanceProcAddr(WGPUDevice device, const char* pName); + + DAWN_NATIVE_EXPORT DawnSwapChainImplementation + CreateNativeSwapChainImpl(WGPUDevice device, ::VkSurfaceKHR surface); + DAWN_NATIVE_EXPORT WGPUTextureFormat + GetNativeSwapChainPreferredFormat(const DawnSwapChainImplementation* swapChain); + + struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase { + AdapterDiscoveryOptions(); + + bool forceSwiftShader = false; + }; + + struct DAWN_NATIVE_EXPORT ExternalImageDescriptorVk : ExternalImageDescriptor { + public: + // The following members may be ignored if |ExternalImageDescriptor::isInitialized| is false + // since the import does not need to preserve texture contents. + + // See https://www.khronos.org/registry/vulkan/specs/1.1/html/chap7.html. The acquire + // operation old/new layouts must match exactly the layouts in the release operation. So + // we may need to issue two barriers releasedOldLayout -> releasedNewLayout -> + // cTextureDescriptor.usage if the new layout is not compatible with the desired usage. + // The first barrier is the queue transfer, the second is the layout transition to our + // desired usage. + VkImageLayout releasedOldLayout = VK_IMAGE_LAYOUT_GENERAL; + VkImageLayout releasedNewLayout = VK_IMAGE_LAYOUT_GENERAL; + + protected: + using ExternalImageDescriptor::ExternalImageDescriptor; + }; + + struct ExternalImageExportInfoVk : ExternalImageExportInfo { + public: + // See comments in |ExternalImageDescriptorVk| + // Contains the old/new layouts used in the queue release operation. + VkImageLayout releasedOldLayout; + VkImageLayout releasedNewLayout; + + protected: + using ExternalImageExportInfo::ExternalImageExportInfo; + }; + +// Can't use DAWN_PLATFORM_LINUX since header included in both Dawn and Chrome +#ifdef __linux__ + + // Common properties of external images represented by FDs. On successful import the file + // descriptor's ownership is transferred to the Dawn implementation and they shouldn't be + // used outside of Dawn again. TODO(enga): Also transfer ownership in the error case so the + // caller can assume the FD is always consumed. + struct DAWN_NATIVE_EXPORT ExternalImageDescriptorFD : ExternalImageDescriptorVk { + public: + int memoryFD; // A file descriptor from an export of the memory of the image + std::vector waitFDs; // File descriptors of semaphores which will be waited on + + protected: + using ExternalImageDescriptorVk::ExternalImageDescriptorVk; + }; + + // Descriptor for opaque file descriptor image import + struct DAWN_NATIVE_EXPORT ExternalImageDescriptorOpaqueFD : ExternalImageDescriptorFD { + ExternalImageDescriptorOpaqueFD(); + + VkDeviceSize allocationSize; // Must match VkMemoryAllocateInfo from image creation + uint32_t memoryTypeIndex; // Must match VkMemoryAllocateInfo from image creation + }; + + // Descriptor for dma-buf file descriptor image import + struct DAWN_NATIVE_EXPORT ExternalImageDescriptorDmaBuf : ExternalImageDescriptorFD { + ExternalImageDescriptorDmaBuf(); + + uint32_t stride; // Stride of the buffer in bytes + uint64_t drmModifier; // DRM modifier of the buffer + }; + + // Info struct that is written to in |ExportVulkanImage|. + struct DAWN_NATIVE_EXPORT ExternalImageExportInfoFD : ExternalImageExportInfoVk { + public: + // Contains the exported semaphore handles. + std::vector semaphoreHandles; + + protected: + using ExternalImageExportInfoVk::ExternalImageExportInfoVk; + }; + + struct DAWN_NATIVE_EXPORT ExternalImageExportInfoOpaqueFD : ExternalImageExportInfoFD { + ExternalImageExportInfoOpaqueFD(); + }; + + struct DAWN_NATIVE_EXPORT ExternalImageExportInfoDmaBuf : ExternalImageExportInfoFD { + ExternalImageExportInfoDmaBuf(); + }; + +#endif // __linux__ + + // Imports external memory into a Vulkan image. Internally, this uses external memory / + // semaphore extensions to import the image and wait on the provided synchronizaton + // primitives before the texture can be used. + // On failure, returns a nullptr. + DAWN_NATIVE_EXPORT WGPUTexture WrapVulkanImage(WGPUDevice device, + const ExternalImageDescriptorVk* descriptor); + + // Exports external memory from a Vulkan image. This must be called on wrapped textures + // before they are destroyed. It writes the semaphore to wait on and the old/new image + // layouts to |info|. Pass VK_IMAGE_LAYOUT_UNDEFINED as |desiredLayout| if you don't want to + // perform a layout transition. + DAWN_NATIVE_EXPORT bool ExportVulkanImage(WGPUTexture texture, + VkImageLayout desiredLayout, + ExternalImageExportInfoVk* info); + +} // namespace dawn::native::vulkan + +#endif // DAWNNATIVE_VULKANBACKEND_H_ diff --git a/src/include/dawn/native/dawn_native_export.h b/src/include/dawn/native/dawn_native_export.h new file mode 100644 index 0000000000..ffbd9cc369 --- /dev/null +++ b/src/include/dawn/native/dawn_native_export.h @@ -0,0 +1,36 @@ +// Copyright 2018 The Dawn Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef DAWNNATIVE_EXPORT_H_ +#define DAWNNATIVE_EXPORT_H_ + +#if defined(DAWN_NATIVE_SHARED_LIBRARY) +# if defined(_WIN32) +# if defined(DAWN_NATIVE_IMPLEMENTATION) +# define DAWN_NATIVE_EXPORT __declspec(dllexport) +# else +# define DAWN_NATIVE_EXPORT __declspec(dllimport) +# endif +# else // defined(_WIN32) +# if defined(DAWN_NATIVE_IMPLEMENTATION) +# define DAWN_NATIVE_EXPORT __attribute__((visibility("default"))) +# else +# define DAWN_NATIVE_EXPORT +# endif +# endif // defined(_WIN32) +#else // defined(DAWN_NATIVE_SHARED_LIBRARY) +# define DAWN_NATIVE_EXPORT +#endif // defined(DAWN_NATIVE_SHARED_LIBRARY) + +#endif // DAWNNATIVE_EXPORT_H_ diff --git a/src/include/dawn_native/D3D12Backend.h b/src/include/dawn_native/D3D12Backend.h index afb389b674..ade0dd1b88 100644 --- a/src/include/dawn_native/D3D12Backend.h +++ b/src/include/dawn_native/D3D12Backend.h @@ -1,111 +1 @@ -// Copyright 2018 The Dawn Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef DAWNNATIVE_D3D12BACKEND_H_ -#define DAWNNATIVE_D3D12BACKEND_H_ - -#include -#include - -#include -#include -#include -#include - -#include - -struct ID3D12Device; -struct ID3D12Resource; - -namespace dawn::native::d3d12 { - - class D3D11on12ResourceCache; - - DAWN_NATIVE_EXPORT Microsoft::WRL::ComPtr GetD3D12Device(WGPUDevice device); - DAWN_NATIVE_EXPORT DawnSwapChainImplementation CreateNativeSwapChainImpl(WGPUDevice device, - HWND window); - DAWN_NATIVE_EXPORT WGPUTextureFormat - GetNativeSwapChainPreferredFormat(const DawnSwapChainImplementation* swapChain); - - enum MemorySegment { - Local, - NonLocal, - }; - - DAWN_NATIVE_EXPORT uint64_t SetExternalMemoryReservation(WGPUDevice device, - uint64_t requestedReservationSize, - MemorySegment memorySegment); - - struct DAWN_NATIVE_EXPORT ExternalImageDescriptorDXGISharedHandle : ExternalImageDescriptor { - public: - ExternalImageDescriptorDXGISharedHandle(); - - // Note: SharedHandle must be a handle to a texture object. - HANDLE sharedHandle; - }; - - // Keyed mutex acquire/release uses a fixed key of 0 to match Chromium behavior. - constexpr UINT64 kDXGIKeyedMutexAcquireReleaseKey = 0; - - struct DAWN_NATIVE_EXPORT ExternalImageAccessDescriptorDXGIKeyedMutex - : ExternalImageAccessDescriptor { - public: - // TODO(chromium:1241533): Remove deprecated keyed mutex params after removing associated - // code from Chromium - we use a fixed key of 0 for acquire and release everywhere now. - uint64_t acquireMutexKey; - uint64_t releaseMutexKey; - bool isSwapChainTexture = false; - }; - - class DAWN_NATIVE_EXPORT ExternalImageDXGI { - public: - ~ExternalImageDXGI(); - - // Note: SharedHandle must be a handle to a texture object. - static std::unique_ptr Create( - WGPUDevice device, - const ExternalImageDescriptorDXGISharedHandle* descriptor); - - WGPUTexture ProduceTexture(WGPUDevice device, - const ExternalImageAccessDescriptorDXGIKeyedMutex* descriptor); - - private: - ExternalImageDXGI(Microsoft::WRL::ComPtr d3d12Resource, - const WGPUTextureDescriptor* descriptor); - - Microsoft::WRL::ComPtr mD3D12Resource; - - // Contents of WGPUTextureDescriptor are stored individually since the descriptor - // could outlive this image. - WGPUTextureUsageFlags mUsage; - WGPUTextureUsageFlags mUsageInternal = WGPUTextureUsage_None; - WGPUTextureDimension mDimension; - WGPUExtent3D mSize; - WGPUTextureFormat mFormat; - uint32_t mMipLevelCount; - uint32_t mSampleCount; - - std::unique_ptr mD3D11on12ResourceCache; - }; - - struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase { - AdapterDiscoveryOptions(); - AdapterDiscoveryOptions(Microsoft::WRL::ComPtr adapter); - - Microsoft::WRL::ComPtr dxgiAdapter; - }; - -} // namespace dawn::native::d3d12 - -#endif // DAWNNATIVE_D3D12BACKEND_H_ +#include diff --git a/src/include/dawn_native/DawnNative.h b/src/include/dawn_native/DawnNative.h index 9f6e3c221a..637d511804 100644 --- a/src/include/dawn_native/DawnNative.h +++ b/src/include/dawn_native/DawnNative.h @@ -1,261 +1 @@ -// Copyright 2018 The Dawn Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef DAWNNATIVE_DAWNNATIVE_H_ -#define DAWNNATIVE_DAWNNATIVE_H_ - -#include -#include -#include - -#include -#include - -namespace dawn::platform { - class Platform; -} // namespace dawn::platform - -namespace wgpu { - struct AdapterProperties; - struct DeviceDescriptor; -} - -namespace dawn::native { - - class InstanceBase; - class AdapterBase; - - // An optional parameter of Adapter::CreateDevice() to send additional information when creating - // a Device. For example, we can use it to enable a workaround, optimization or feature. - struct DAWN_NATIVE_EXPORT DawnDeviceDescriptor { - std::vector requiredFeatures; - std::vector forceEnabledToggles; - std::vector forceDisabledToggles; - - const WGPURequiredLimits* requiredLimits = nullptr; - }; - - // A struct to record the information of a toggle. A toggle is a code path in Dawn device that - // can be manually configured to run or not outside Dawn, including workarounds, special - // features and optimizations. - struct ToggleInfo { - const char* name; - const char* description; - const char* url; - }; - - // A struct to record the information of a feature. A feature is a GPU feature that is not - // required to be supported by all Dawn backends and can only be used when it is enabled on the - // creation of device. - using FeatureInfo = ToggleInfo; - - // An adapter is an object that represent on possibility of creating devices in the system. - // Most of the time it will represent a combination of a physical GPU and an API. Not that the - // same GPU can be represented by multiple adapters but on different APIs. - // - // The underlying Dawn adapter is owned by the Dawn instance so this class is not RAII but just - // a reference to an underlying adapter. - class DAWN_NATIVE_EXPORT Adapter { - public: - Adapter(); - Adapter(AdapterBase* impl); - ~Adapter(); - - Adapter(const Adapter& other); - Adapter& operator=(const Adapter& other); - - // Essentially webgpu.h's wgpuAdapterGetProperties while we don't have WGPUAdapter in - // dawn.json - void GetProperties(wgpu::AdapterProperties* properties) const; - void GetProperties(WGPUAdapterProperties* properties) const; - - std::vector GetSupportedExtensions() const; - std::vector GetSupportedFeatures() const; - WGPUDeviceProperties GetAdapterProperties() const; - bool GetLimits(WGPUSupportedLimits* limits) const; - - void SetUseTieredLimits(bool useTieredLimits); - - // Check that the Adapter is able to support importing external images. This is necessary - // to implement the swapchain and interop APIs in Chromium. - bool SupportsExternalImages() const; - - explicit operator bool() const; - - // Create a device on this adapter. On an error, nullptr is returned. - WGPUDevice CreateDevice(const DawnDeviceDescriptor* deviceDescriptor); - WGPUDevice CreateDevice(const wgpu::DeviceDescriptor* deviceDescriptor); - WGPUDevice CreateDevice(const WGPUDeviceDescriptor* deviceDescriptor = nullptr); - - void RequestDevice(const DawnDeviceDescriptor* descriptor, - WGPURequestDeviceCallback callback, - void* userdata); - void RequestDevice(const wgpu::DeviceDescriptor* descriptor, - WGPURequestDeviceCallback callback, - void* userdata); - void RequestDevice(const WGPUDeviceDescriptor* descriptor, - WGPURequestDeviceCallback callback, - void* userdata); - - // Returns the underlying WGPUAdapter object. - WGPUAdapter Get() const; - - // Reset the backend device object for testing purposes. - void ResetInternalDeviceForTesting(); - - private: - AdapterBase* mImpl = nullptr; - }; - - // Base class for options passed to Instance::DiscoverAdapters. - struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptionsBase { - public: - const WGPUBackendType backendType; - - protected: - AdapterDiscoveryOptionsBase(WGPUBackendType type); - }; - - enum BackendValidationLevel { Full, Partial, Disabled }; - - // Represents a connection to dawn_native and is used for dependency injection, discovering - // system adapters and injecting custom adapters (like a Swiftshader Vulkan adapter). - // - // This is an RAII class for Dawn instances and also controls the lifetime of all adapters - // for this instance. - class DAWN_NATIVE_EXPORT Instance { - public: - explicit Instance(const WGPUInstanceDescriptor* desc = nullptr); - ~Instance(); - - Instance(const Instance& other) = delete; - Instance& operator=(const Instance& other) = delete; - - // Gather all adapters in the system that can be accessed with no special options. These - // adapters will later be returned by GetAdapters. - void DiscoverDefaultAdapters(); - - // Adds adapters that can be discovered with the options provided (like a getProcAddress). - // The backend is chosen based on the type of the options used. Returns true on success. - bool DiscoverAdapters(const AdapterDiscoveryOptionsBase* options); - - // Returns all the adapters that the instance knows about. - std::vector GetAdapters() const; - - const ToggleInfo* GetToggleInfo(const char* toggleName); - const FeatureInfo* GetFeatureInfo(WGPUFeatureName feature); - - // Enables backend validation layers - void EnableBackendValidation(bool enableBackendValidation); - void SetBackendValidationLevel(BackendValidationLevel validationLevel); - - // Enable debug capture on Dawn startup - void EnableBeginCaptureOnStartup(bool beginCaptureOnStartup); - - void SetPlatform(dawn::platform::Platform* platform); - - // Returns the underlying WGPUInstance object. - WGPUInstance Get() const; - - private: - InstanceBase* mImpl = nullptr; - }; - - // Backend-agnostic API for dawn_native - DAWN_NATIVE_EXPORT const DawnProcTable& GetProcs(); - - // Query the names of all the toggles that are enabled in device - DAWN_NATIVE_EXPORT std::vector GetTogglesUsed(WGPUDevice device); - - // Backdoor to get the number of lazy clears for testing - DAWN_NATIVE_EXPORT size_t GetLazyClearCountForTesting(WGPUDevice device); - - // Backdoor to get the number of deprecation warnings for testing - DAWN_NATIVE_EXPORT size_t GetDeprecationWarningCountForTesting(WGPUDevice device); - - // Query if texture has been initialized - DAWN_NATIVE_EXPORT bool IsTextureSubresourceInitialized( - WGPUTexture texture, - uint32_t baseMipLevel, - uint32_t levelCount, - uint32_t baseArrayLayer, - uint32_t layerCount, - WGPUTextureAspect aspect = WGPUTextureAspect_All); - - // Backdoor to get the order of the ProcMap for testing - DAWN_NATIVE_EXPORT std::vector GetProcMapNamesForTesting(); - - DAWN_NATIVE_EXPORT bool DeviceTick(WGPUDevice device); - - // ErrorInjector functions used for testing only. Defined in dawn_native/ErrorInjector.cpp - DAWN_NATIVE_EXPORT void EnableErrorInjector(); - DAWN_NATIVE_EXPORT void DisableErrorInjector(); - DAWN_NATIVE_EXPORT void ClearErrorInjector(); - DAWN_NATIVE_EXPORT uint64_t AcquireErrorInjectorCallCount(); - DAWN_NATIVE_EXPORT void InjectErrorAt(uint64_t index); - - // The different types of external images - enum ExternalImageType { - OpaqueFD, - DmaBuf, - IOSurface, - DXGISharedHandle, - EGLImage, - }; - - // Common properties of external images - struct DAWN_NATIVE_EXPORT ExternalImageDescriptor { - public: - const WGPUTextureDescriptor* cTextureDescriptor; // Must match image creation params - bool isInitialized; // Whether the texture is initialized on import - ExternalImageType GetType() const; - - protected: - ExternalImageDescriptor(ExternalImageType type); - - private: - ExternalImageType mType; - }; - - struct DAWN_NATIVE_EXPORT ExternalImageAccessDescriptor { - public: - bool isInitialized; // Whether the texture is initialized on import - WGPUTextureUsageFlags usage; - }; - - struct DAWN_NATIVE_EXPORT ExternalImageExportInfo { - public: - bool isInitialized; // Whether the texture is initialized after export - ExternalImageType GetType() const; - - protected: - ExternalImageExportInfo(ExternalImageType type); - - private: - ExternalImageType mType; - }; - - DAWN_NATIVE_EXPORT const char* GetObjectLabelForTesting(void* objectHandle); - - DAWN_NATIVE_EXPORT uint64_t GetAllocatedSizeForTesting(WGPUBuffer buffer); - - DAWN_NATIVE_EXPORT bool BindGroupLayoutBindingsEqualForTesting(WGPUBindGroupLayout a, - WGPUBindGroupLayout b); - -} // namespace dawn::native - -// TODO(dawn:824): Remove once the deprecation period is passed. -namespace dawn_native = dawn::native; - -#endif // DAWNNATIVE_DAWNNATIVE_H_ +#include diff --git a/src/include/dawn_native/MetalBackend.h b/src/include/dawn_native/MetalBackend.h index 17e304e55e..1cb8a892db 100644 --- a/src/include/dawn_native/MetalBackend.h +++ b/src/include/dawn_native/MetalBackend.h @@ -1,71 +1 @@ -// Copyright 2018 The Dawn Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef DAWNNATIVE_METALBACKEND_H_ -#define DAWNNATIVE_METALBACKEND_H_ - -#include -#include - -// The specifics of the Metal backend expose types in function signatures that might not be -// available in dependent's minimum supported SDK version. Suppress all availability errors using -// clang's pragmas. Dependents using the types without guarded availability will still get errors -// when using the types. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunguarded-availability" - -struct __IOSurface; -typedef __IOSurface* IOSurfaceRef; - -#ifdef __OBJC__ -# import -#endif //__OBJC__ - -namespace dawn::native::metal { - - struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase { - AdapterDiscoveryOptions(); - }; - - struct DAWN_NATIVE_EXPORT ExternalImageDescriptorIOSurface : ExternalImageDescriptor { - public: - ExternalImageDescriptorIOSurface(); - - IOSurfaceRef ioSurface; - uint32_t plane; - }; - - DAWN_NATIVE_EXPORT WGPUTexture - WrapIOSurface(WGPUDevice device, const ExternalImageDescriptorIOSurface* descriptor); - - // When making Metal interop with other APIs, we need to be careful that QueueSubmit doesn't - // mean that the operations will be visible to other APIs/Metal devices right away. macOS - // does have a global queue of graphics operations, but the command buffers are inserted there - // when they are "scheduled". Submitting other operations before the command buffer is - // scheduled could lead to races in who gets scheduled first and incorrect rendering. - DAWN_NATIVE_EXPORT void WaitForCommandsToBeScheduled(WGPUDevice device); - -} // namespace dawn::native::metal - -#ifdef __OBJC__ -namespace dawn::native::metal { - - DAWN_NATIVE_EXPORT id GetMetalDevice(WGPUDevice device); - -} // namespace dawn::native::metal -#endif // __OBJC__ - -#pragma clang diagnostic pop - -#endif // DAWNNATIVE_METALBACKEND_H_ +#include diff --git a/src/include/dawn_native/NullBackend.h b/src/include/dawn_native/NullBackend.h index a3928b888c..38e1134948 100644 --- a/src/include/dawn_native/NullBackend.h +++ b/src/include/dawn_native/NullBackend.h @@ -1,25 +1 @@ -// Copyright 2018 The Dawn Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef DAWNNATIVE_NULLBACKEND_H_ -#define DAWNNATIVE_NULLBACKEND_H_ - -#include -#include - -namespace dawn::native::null { - DAWN_NATIVE_EXPORT DawnSwapChainImplementation CreateNativeSwapChainImpl(); -} // namespace dawn::native::null - -#endif // DAWNNATIVE_NULLBACKEND_H_ +#include diff --git a/src/include/dawn_native/OpenGLBackend.h b/src/include/dawn_native/OpenGLBackend.h index 5aaa723622..e7d7adf221 100644 --- a/src/include/dawn_native/OpenGLBackend.h +++ b/src/include/dawn_native/OpenGLBackend.h @@ -1,55 +1 @@ -// Copyright 2018 The Dawn Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef DAWNNATIVE_OPENGLBACKEND_H_ -#define DAWNNATIVE_OPENGLBACKEND_H_ - -typedef void* EGLImage; - -#include -#include - -namespace dawn::native::opengl { - - struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase { - AdapterDiscoveryOptions(); - - void* (*getProc)(const char*); - }; - - struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptionsES : public AdapterDiscoveryOptionsBase { - AdapterDiscoveryOptionsES(); - - void* (*getProc)(const char*); - }; - - using PresentCallback = void (*)(void*); - DAWN_NATIVE_EXPORT DawnSwapChainImplementation - CreateNativeSwapChainImpl(WGPUDevice device, PresentCallback present, void* presentUserdata); - DAWN_NATIVE_EXPORT WGPUTextureFormat - GetNativeSwapChainPreferredFormat(const DawnSwapChainImplementation* swapChain); - - struct DAWN_NATIVE_EXPORT ExternalImageDescriptorEGLImage : ExternalImageDescriptor { - public: - ExternalImageDescriptorEGLImage(); - - ::EGLImage image; - }; - - DAWN_NATIVE_EXPORT WGPUTexture - WrapExternalEGLImage(WGPUDevice device, const ExternalImageDescriptorEGLImage* descriptor); - -} // namespace dawn::native::opengl - -#endif // DAWNNATIVE_OPENGLBACKEND_H_ +#include diff --git a/src/include/dawn_native/VulkanBackend.h b/src/include/dawn_native/VulkanBackend.h index 756ae4af68..f183c03f59 100644 --- a/src/include/dawn_native/VulkanBackend.h +++ b/src/include/dawn_native/VulkanBackend.h @@ -1,140 +1 @@ -// Copyright 2018 The Dawn Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef DAWNNATIVE_VULKANBACKEND_H_ -#define DAWNNATIVE_VULKANBACKEND_H_ - -#include -#include - -#include - -#include - -namespace dawn::native::vulkan { - - DAWN_NATIVE_EXPORT VkInstance GetInstance(WGPUDevice device); - - DAWN_NATIVE_EXPORT PFN_vkVoidFunction GetInstanceProcAddr(WGPUDevice device, const char* pName); - - DAWN_NATIVE_EXPORT DawnSwapChainImplementation - CreateNativeSwapChainImpl(WGPUDevice device, ::VkSurfaceKHR surface); - DAWN_NATIVE_EXPORT WGPUTextureFormat - GetNativeSwapChainPreferredFormat(const DawnSwapChainImplementation* swapChain); - - struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase { - AdapterDiscoveryOptions(); - - bool forceSwiftShader = false; - }; - - struct DAWN_NATIVE_EXPORT ExternalImageDescriptorVk : ExternalImageDescriptor { - public: - // The following members may be ignored if |ExternalImageDescriptor::isInitialized| is false - // since the import does not need to preserve texture contents. - - // See https://www.khronos.org/registry/vulkan/specs/1.1/html/chap7.html. The acquire - // operation old/new layouts must match exactly the layouts in the release operation. So - // we may need to issue two barriers releasedOldLayout -> releasedNewLayout -> - // cTextureDescriptor.usage if the new layout is not compatible with the desired usage. - // The first barrier is the queue transfer, the second is the layout transition to our - // desired usage. - VkImageLayout releasedOldLayout = VK_IMAGE_LAYOUT_GENERAL; - VkImageLayout releasedNewLayout = VK_IMAGE_LAYOUT_GENERAL; - - protected: - using ExternalImageDescriptor::ExternalImageDescriptor; - }; - - struct ExternalImageExportInfoVk : ExternalImageExportInfo { - public: - // See comments in |ExternalImageDescriptorVk| - // Contains the old/new layouts used in the queue release operation. - VkImageLayout releasedOldLayout; - VkImageLayout releasedNewLayout; - - protected: - using ExternalImageExportInfo::ExternalImageExportInfo; - }; - -// Can't use DAWN_PLATFORM_LINUX since header included in both Dawn and Chrome -#ifdef __linux__ - - // Common properties of external images represented by FDs. On successful import the file - // descriptor's ownership is transferred to the Dawn implementation and they shouldn't be - // used outside of Dawn again. TODO(enga): Also transfer ownership in the error case so the - // caller can assume the FD is always consumed. - struct DAWN_NATIVE_EXPORT ExternalImageDescriptorFD : ExternalImageDescriptorVk { - public: - int memoryFD; // A file descriptor from an export of the memory of the image - std::vector waitFDs; // File descriptors of semaphores which will be waited on - - protected: - using ExternalImageDescriptorVk::ExternalImageDescriptorVk; - }; - - // Descriptor for opaque file descriptor image import - struct DAWN_NATIVE_EXPORT ExternalImageDescriptorOpaqueFD : ExternalImageDescriptorFD { - ExternalImageDescriptorOpaqueFD(); - - VkDeviceSize allocationSize; // Must match VkMemoryAllocateInfo from image creation - uint32_t memoryTypeIndex; // Must match VkMemoryAllocateInfo from image creation - }; - - // Descriptor for dma-buf file descriptor image import - struct DAWN_NATIVE_EXPORT ExternalImageDescriptorDmaBuf : ExternalImageDescriptorFD { - ExternalImageDescriptorDmaBuf(); - - uint32_t stride; // Stride of the buffer in bytes - uint64_t drmModifier; // DRM modifier of the buffer - }; - - // Info struct that is written to in |ExportVulkanImage|. - struct DAWN_NATIVE_EXPORT ExternalImageExportInfoFD : ExternalImageExportInfoVk { - public: - // Contains the exported semaphore handles. - std::vector semaphoreHandles; - - protected: - using ExternalImageExportInfoVk::ExternalImageExportInfoVk; - }; - - struct DAWN_NATIVE_EXPORT ExternalImageExportInfoOpaqueFD : ExternalImageExportInfoFD { - ExternalImageExportInfoOpaqueFD(); - }; - - struct DAWN_NATIVE_EXPORT ExternalImageExportInfoDmaBuf : ExternalImageExportInfoFD { - ExternalImageExportInfoDmaBuf(); - }; - -#endif // __linux__ - - // Imports external memory into a Vulkan image. Internally, this uses external memory / - // semaphore extensions to import the image and wait on the provided synchronizaton - // primitives before the texture can be used. - // On failure, returns a nullptr. - DAWN_NATIVE_EXPORT WGPUTexture WrapVulkanImage(WGPUDevice device, - const ExternalImageDescriptorVk* descriptor); - - // Exports external memory from a Vulkan image. This must be called on wrapped textures - // before they are destroyed. It writes the semaphore to wait on and the old/new image - // layouts to |info|. Pass VK_IMAGE_LAYOUT_UNDEFINED as |desiredLayout| if you don't want to - // perform a layout transition. - DAWN_NATIVE_EXPORT bool ExportVulkanImage(WGPUTexture texture, - VkImageLayout desiredLayout, - ExternalImageExportInfoVk* info); - -} // namespace dawn::native::vulkan - -#endif // DAWNNATIVE_VULKANBACKEND_H_ +#include diff --git a/src/include/dawn_native/dawn_native_export.h b/src/include/dawn_native/dawn_native_export.h index ffbd9cc369..89f828797b 100644 --- a/src/include/dawn_native/dawn_native_export.h +++ b/src/include/dawn_native/dawn_native_export.h @@ -1,36 +1 @@ -// Copyright 2018 The Dawn Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef DAWNNATIVE_EXPORT_H_ -#define DAWNNATIVE_EXPORT_H_ - -#if defined(DAWN_NATIVE_SHARED_LIBRARY) -# if defined(_WIN32) -# if defined(DAWN_NATIVE_IMPLEMENTATION) -# define DAWN_NATIVE_EXPORT __declspec(dllexport) -# else -# define DAWN_NATIVE_EXPORT __declspec(dllimport) -# endif -# else // defined(_WIN32) -# if defined(DAWN_NATIVE_IMPLEMENTATION) -# define DAWN_NATIVE_EXPORT __attribute__((visibility("default"))) -# else -# define DAWN_NATIVE_EXPORT -# endif -# endif // defined(_WIN32) -#else // defined(DAWN_NATIVE_SHARED_LIBRARY) -# define DAWN_NATIVE_EXPORT -#endif // defined(DAWN_NATIVE_SHARED_LIBRARY) - -#endif // DAWNNATIVE_EXPORT_H_ +#include diff --git a/src/tests/BUILD.gn b/src/tests/BUILD.gn index 4372dfe231..a050d32953 100644 --- a/src/tests/BUILD.gn +++ b/src/tests/BUILD.gn @@ -133,13 +133,13 @@ source_set("dawn_native_mocks_sources") { deps = [ ":gmock_and_gtest", + "${dawn_root}/src/dawn/native:sources", + "${dawn_root}/src/dawn/native:static", "${dawn_root}/src/dawn/utils", - "${dawn_root}/src/dawn_native:dawn_native_sources", - "${dawn_root}/src/dawn_native:static", ] # Add internal dawn_native config for internal unittests. - configs += [ "${dawn_root}/src/dawn_native:dawn_native_internal" ] + configs += [ "${dawn_root}/src/dawn/native:internal" ] sources = [ "unittests/native/mocks/BindGroupLayoutMock.h", @@ -169,14 +169,14 @@ test("dawn_unittests") { "${dawn_root}/src/dawn:dawn_proc", "${dawn_root}/src/dawn:dawncpp", "${dawn_root}/src/dawn/common", + "${dawn_root}/src/dawn/native:sources", + "${dawn_root}/src/dawn/native:static", "${dawn_root}/src/dawn/utils", "${dawn_root}/src/dawn/wire", - "${dawn_root}/src/dawn_native:dawn_native_sources", - "${dawn_root}/src/dawn_native:static", ] # Add internal dawn_native config for internal unittests. - configs += [ "${dawn_root}/src/dawn_native:dawn_native_internal" ] + configs += [ "${dawn_root}/src/dawn/native:internal" ] sources = get_target_outputs(":mock_webgpu_gen") sources += [ @@ -328,9 +328,9 @@ source_set("dawn_end2end_tests_sources") { "${dawn_root}/src/dawn/common", # Statically linked because the end2end white_box tests use Dawn internals. + "${dawn_root}/src/dawn/native:static", "${dawn_root}/src/dawn/utils", "${dawn_root}/src/dawn/wire", - "${dawn_root}/src/dawn_native:static", ] sources = [ @@ -466,7 +466,7 @@ source_set("dawn_end2end_tests_sources") { } source_set("dawn_white_box_tests_sources") { - configs += [ "${dawn_root}/src/dawn_native:dawn_native_internal" ] + configs += [ "${dawn_root}/src/dawn/native:internal" ] testonly = true deps = [ @@ -474,12 +474,12 @@ source_set("dawn_white_box_tests_sources") { "${dawn_root}/src/dawn:dawn_proc", "${dawn_root}/src/dawn:dawncpp", "${dawn_root}/src/dawn/common", - "${dawn_root}/src/dawn_native:dawn_native_sources", + "${dawn_root}/src/dawn/native:sources", # Statically linked because the end2end white_box tests use Dawn internals. + "${dawn_root}/src/dawn/native:static", "${dawn_root}/src/dawn/utils", "${dawn_root}/src/dawn/wire", - "${dawn_root}/src/dawn_native:static", ] sources = [ @@ -551,9 +551,9 @@ test("dawn_end2end_tests") { "${dawn_root}/src/dawn:dawn_proc", "${dawn_root}/src/dawn:dawncpp", "${dawn_root}/src/dawn/common", + "${dawn_root}/src/dawn/native:static", "${dawn_root}/src/dawn/utils", "${dawn_root}/src/dawn/wire", - "${dawn_root}/src/dawn_native:static", ] sources = [ @@ -592,9 +592,9 @@ test("dawn_perf_tests") { "${dawn_root}/src/dawn:dawn_proc", "${dawn_root}/src/dawn:dawncpp", "${dawn_root}/src/dawn/common", + "${dawn_root}/src/dawn/native", "${dawn_root}/src/dawn/utils", "${dawn_root}/src/dawn/wire", - "${dawn_root}/src/dawn_native", "${dawn_root}/src/dawn_platform", ] diff --git a/src/tests/DawnNativeTest.cpp b/src/tests/DawnNativeTest.cpp index 4c30730c23..937daf00ea 100644 --- a/src/tests/DawnNativeTest.cpp +++ b/src/tests/DawnNativeTest.cpp @@ -17,7 +17,7 @@ #include "absl/strings/str_cat.h" #include "dawn/common/Assert.h" #include "dawn/dawn_proc.h" -#include "dawn_native/ErrorData.h" +#include "dawn/native/ErrorData.h" namespace dawn::native { diff --git a/src/tests/DawnNativeTest.h b/src/tests/DawnNativeTest.h index ab44e39d7a..9e8df19879 100644 --- a/src/tests/DawnNativeTest.h +++ b/src/tests/DawnNativeTest.h @@ -17,9 +17,9 @@ #include +#include "dawn/native/DawnNative.h" +#include "dawn/native/ErrorData.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" -#include "dawn_native/ErrorData.h" namespace dawn::native { diff --git a/src/tests/DawnTest.cpp b/src/tests/DawnTest.cpp index ca624e5e8e..2affa5cbb1 100644 --- a/src/tests/DawnTest.cpp +++ b/src/tests/DawnTest.cpp @@ -41,7 +41,7 @@ #if defined(DAWN_ENABLE_BACKEND_OPENGL) # include "GLFW/glfw3.h" -# include "dawn_native/OpenGLBackend.h" +# include "dawn/native/OpenGLBackend.h" #endif // DAWN_ENABLE_BACKEND_OPENGL namespace { diff --git a/src/tests/DawnTest.h b/src/tests/DawnTest.h index fc13086011..f4ffffa62d 100644 --- a/src/tests/DawnTest.h +++ b/src/tests/DawnTest.h @@ -19,11 +19,11 @@ #include "dawn/common/Platform.h" #include "dawn/common/Preprocessor.h" #include "dawn/dawn_proc_table.h" +#include "dawn/native/DawnNative.h" #include "dawn/utils/ScopedAutoreleasePool.h" #include "dawn/utils/TextureUtils.h" #include "dawn/webgpu_cpp.h" #include "dawn/webgpu_cpp_print.h" -#include "dawn_native/DawnNative.h" #include "tests/ParamGenerator.h" #include "tests/ToggleParser.h" diff --git a/src/tests/end2end/AdapterDiscoveryTests.cpp b/src/tests/end2end/AdapterDiscoveryTests.cpp index ecb7604100..ef9ec13ed4 100644 --- a/src/tests/end2end/AdapterDiscoveryTests.cpp +++ b/src/tests/end2end/AdapterDiscoveryTests.cpp @@ -17,29 +17,29 @@ #include "dawn/common/Platform.h" #include "dawn/common/SystemUtils.h" #include "dawn/dawn_proc.h" +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include "tests/MockCallback.h" #if defined(DAWN_ENABLE_BACKEND_VULKAN) -# include "dawn_native/VulkanBackend.h" +# include "dawn/native/VulkanBackend.h" #endif // defined(DAWN_ENABLE_BACKEND_VULKAN) #if defined(DAWN_ENABLE_BACKEND_D3D12) -# include "dawn_native/D3D12Backend.h" +# include "dawn/native/D3D12Backend.h" #endif // defined(DAWN_ENABLE_BACKEND_D3D12) #if defined(DAWN_ENABLE_BACKEND_METAL) -# include "dawn_native/MetalBackend.h" +# include "dawn/native/MetalBackend.h" #endif // defined(DAWN_ENABLE_BACKEND_METAL) #if defined(DAWN_ENABLE_BACKEND_METAL) -# include "dawn_native/MetalBackend.h" +# include "dawn/native/MetalBackend.h" #endif // defined(DAWN_ENABLE_BACKEND_METAL) #if defined(DAWN_ENABLE_BACKEND_DESKTOP_GL) || defined(DAWN_ENABLE_BACKEND_OPENGLES) # include "GLFW/glfw3.h" -# include "dawn_native/OpenGLBackend.h" +# include "dawn/native/OpenGLBackend.h" #endif // defined(DAWN_ENABLE_BACKEND_DESKTOP_GL) || defined(DAWN_ENABLE_BACKEND_OPENGLES) #include diff --git a/src/tests/end2end/D3D12ResourceWrappingTests.cpp b/src/tests/end2end/D3D12ResourceWrappingTests.cpp index 19587c5bd6..d935ad4f37 100644 --- a/src/tests/end2end/D3D12ResourceWrappingTests.cpp +++ b/src/tests/end2end/D3D12ResourceWrappingTests.cpp @@ -19,9 +19,9 @@ #include #include +#include "dawn/native/D3D12Backend.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "dawn_native/D3D12Backend.h" using Microsoft::WRL::ComPtr; diff --git a/src/tests/end2end/IOSurfaceWrappingTests.cpp b/src/tests/end2end/IOSurfaceWrappingTests.cpp index 99a506fdb6..3b46789b29 100644 --- a/src/tests/end2end/IOSurfaceWrappingTests.cpp +++ b/src/tests/end2end/IOSurfaceWrappingTests.cpp @@ -14,9 +14,9 @@ #include "tests/DawnTest.h" +#include "dawn/native/MetalBackend.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "dawn_native/MetalBackend.h" #include #include diff --git a/src/tests/end2end/VideoViewsTests_gbm.cpp b/src/tests/end2end/VideoViewsTests_gbm.cpp index c75391371a..bd23f2e9de 100644 --- a/src/tests/end2end/VideoViewsTests_gbm.cpp +++ b/src/tests/end2end/VideoViewsTests_gbm.cpp @@ -15,7 +15,7 @@ #include "VideoViewsTests.h" #include "dawn/common/Assert.h" -#include "dawn_native/VulkanBackend.h" +#include "dawn/native/VulkanBackend.h" #include #include diff --git a/src/tests/end2end/VideoViewsTests_win.cpp b/src/tests/end2end/VideoViewsTests_win.cpp index b0c822e26a..f2f7ed507a 100644 --- a/src/tests/end2end/VideoViewsTests_win.cpp +++ b/src/tests/end2end/VideoViewsTests_win.cpp @@ -15,7 +15,7 @@ #include "VideoViewsTests.h" #include "dawn/common/Assert.h" -#include "dawn_native/D3D12Backend.h" +#include "dawn/native/D3D12Backend.h" #include #include diff --git a/src/tests/end2end/WindowSurfaceTests.cpp b/src/tests/end2end/WindowSurfaceTests.cpp index 57edabd451..9f53196784 100644 --- a/src/tests/end2end/WindowSurfaceTests.cpp +++ b/src/tests/end2end/WindowSurfaceTests.cpp @@ -15,8 +15,8 @@ #include "dawn/common/Log.h" #include "dawn/common/Platform.h" #include "dawn/dawn_proc.h" +#include "dawn/native/DawnNative.h" #include "dawn/utils/GLFWUtils.h" -#include "dawn_native/DawnNative.h" #include "tests/DawnTest.h" #include diff --git a/src/tests/unittests/AsyncTaskTests.cpp b/src/tests/unittests/AsyncTaskTests.cpp index cea72ce949..9170885465 100644 --- a/src/tests/unittests/AsyncTaskTests.cpp +++ b/src/tests/unittests/AsyncTaskTests.cpp @@ -21,8 +21,8 @@ #include #include "dawn/common/NonCopyable.h" +#include "dawn/native/AsyncTask.h" #include "dawn/platform/DawnPlatform.h" -#include "dawn_native/AsyncTask.h" namespace { diff --git a/src/tests/unittests/BuddyAllocatorTests.cpp b/src/tests/unittests/BuddyAllocatorTests.cpp index 7e4c282aac..cc824cf969 100644 --- a/src/tests/unittests/BuddyAllocatorTests.cpp +++ b/src/tests/unittests/BuddyAllocatorTests.cpp @@ -13,7 +13,7 @@ // limitations under the License. #include -#include "dawn_native/BuddyAllocator.h" +#include "dawn/native/BuddyAllocator.h" using namespace dawn::native; diff --git a/src/tests/unittests/BuddyMemoryAllocatorTests.cpp b/src/tests/unittests/BuddyMemoryAllocatorTests.cpp index 0bc198f01f..fbe523910e 100644 --- a/src/tests/unittests/BuddyMemoryAllocatorTests.cpp +++ b/src/tests/unittests/BuddyMemoryAllocatorTests.cpp @@ -14,9 +14,9 @@ #include -#include "dawn_native/BuddyMemoryAllocator.h" -#include "dawn_native/PooledResourceMemoryAllocator.h" -#include "dawn_native/ResourceHeapAllocator.h" +#include "dawn/native/BuddyMemoryAllocator.h" +#include "dawn/native/PooledResourceMemoryAllocator.h" +#include "dawn/native/ResourceHeapAllocator.h" #include #include diff --git a/src/tests/unittests/ChainUtilsTests.cpp b/src/tests/unittests/ChainUtilsTests.cpp index aa4c274a08..87d7b46162 100644 --- a/src/tests/unittests/ChainUtilsTests.cpp +++ b/src/tests/unittests/ChainUtilsTests.cpp @@ -14,8 +14,8 @@ #include -#include "dawn_native/ChainUtils_autogen.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/ChainUtils_autogen.h" +#include "dawn/native/dawn_platform.h" // Checks that we cannot find any structs in an empty chain TEST(ChainUtilsTests, FindEmptyChain) { diff --git a/src/tests/unittests/CommandAllocatorTests.cpp b/src/tests/unittests/CommandAllocatorTests.cpp index 70bfc51365..7fb047a63b 100644 --- a/src/tests/unittests/CommandAllocatorTests.cpp +++ b/src/tests/unittests/CommandAllocatorTests.cpp @@ -14,7 +14,7 @@ #include -#include "dawn_native/CommandAllocator.h" +#include "dawn/native/CommandAllocator.h" #include diff --git a/src/tests/unittests/ConcurrentCacheTests.cpp b/src/tests/unittests/ConcurrentCacheTests.cpp index 662ff56acc..6369a39429 100644 --- a/src/tests/unittests/ConcurrentCacheTests.cpp +++ b/src/tests/unittests/ConcurrentCacheTests.cpp @@ -15,9 +15,9 @@ #include #include "dawn/common/ConcurrentCache.h" +#include "dawn/native/AsyncTask.h" #include "dawn/platform/DawnPlatform.h" #include "dawn/utils/SystemUtils.h" -#include "dawn_native/AsyncTask.h" namespace { class SimpleCachedObject { diff --git a/src/tests/unittests/EnumMaskIteratorTests.cpp b/src/tests/unittests/EnumMaskIteratorTests.cpp index 0dd5e59e24..b6c6727efe 100644 --- a/src/tests/unittests/EnumMaskIteratorTests.cpp +++ b/src/tests/unittests/EnumMaskIteratorTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dawn_native/EnumMaskIterator.h" +#include "dawn/native/EnumMaskIterator.h" #include "gtest/gtest.h" diff --git a/src/tests/unittests/ErrorTests.cpp b/src/tests/unittests/ErrorTests.cpp index bd1bf8c741..5af82a4d2b 100644 --- a/src/tests/unittests/ErrorTests.cpp +++ b/src/tests/unittests/ErrorTests.cpp @@ -14,8 +14,8 @@ #include -#include "dawn_native/Error.h" -#include "dawn_native/ErrorData.h" +#include "dawn/native/Error.h" +#include "dawn/native/ErrorData.h" using namespace dawn::native; diff --git a/src/tests/unittests/FeatureTests.cpp b/src/tests/unittests/FeatureTests.cpp index d7844ffd4a..29c1115b1d 100644 --- a/src/tests/unittests/FeatureTests.cpp +++ b/src/tests/unittests/FeatureTests.cpp @@ -14,9 +14,9 @@ #include -#include "dawn_native/Features.h" -#include "dawn_native/Instance.h" -#include "dawn_native/null/DeviceNull.h" +#include "dawn/native/Features.h" +#include "dawn/native/Instance.h" +#include "dawn/native/null/DeviceNull.h" class FeatureTests : public testing::Test { public: diff --git a/src/tests/unittests/GetProcAddressTests.cpp b/src/tests/unittests/GetProcAddressTests.cpp index af1ca73994..56e79a1020 100644 --- a/src/tests/unittests/GetProcAddressTests.cpp +++ b/src/tests/unittests/GetProcAddressTests.cpp @@ -15,10 +15,10 @@ #include #include "dawn/dawn_proc.h" +#include "dawn/native/Instance.h" +#include "dawn/native/null/DeviceNull.h" #include "dawn/utils/TerribleCommandBuffer.h" #include "dawn/wire/WireClient.h" -#include "dawn_native/Instance.h" -#include "dawn_native/null/DeviceNull.h" namespace { diff --git a/src/tests/unittests/LimitsTests.cpp b/src/tests/unittests/LimitsTests.cpp index 88ac3561a4..544c0c5680 100644 --- a/src/tests/unittests/LimitsTests.cpp +++ b/src/tests/unittests/LimitsTests.cpp @@ -14,7 +14,7 @@ #include -#include "dawn_native/Limits.h" +#include "dawn/native/Limits.h" // Test |GetDefaultLimits| returns the default. TEST(Limits, GetDefaultLimits) { diff --git a/src/tests/unittests/PerStageTests.cpp b/src/tests/unittests/PerStageTests.cpp index 736bb7677f..1ae2e17b2f 100644 --- a/src/tests/unittests/PerStageTests.cpp +++ b/src/tests/unittests/PerStageTests.cpp @@ -14,7 +14,7 @@ #include -#include "dawn_native/PerStage.h" +#include "dawn/native/PerStage.h" using namespace dawn::native; diff --git a/src/tests/unittests/PerThreadProcTests.cpp b/src/tests/unittests/PerThreadProcTests.cpp index 47b29342e2..f059e3e79c 100644 --- a/src/tests/unittests/PerThreadProcTests.cpp +++ b/src/tests/unittests/PerThreadProcTests.cpp @@ -13,10 +13,10 @@ // limitations under the License. #include "dawn/dawn_thread_dispatch_proc.h" +#include "dawn/native/DawnNative.h" +#include "dawn/native/Instance.h" +#include "dawn/native/null/DeviceNull.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" -#include "dawn_native/Instance.h" -#include "dawn_native/null/DeviceNull.h" #include #include diff --git a/src/tests/unittests/RingBufferAllocatorTests.cpp b/src/tests/unittests/RingBufferAllocatorTests.cpp index 3787ba3ded..0a103752ef 100644 --- a/src/tests/unittests/RingBufferAllocatorTests.cpp +++ b/src/tests/unittests/RingBufferAllocatorTests.cpp @@ -14,7 +14,7 @@ #include -#include "dawn_native/RingBufferAllocator.h" +#include "dawn/native/RingBufferAllocator.h" using namespace dawn::native; diff --git a/src/tests/unittests/SubresourceStorageTests.cpp b/src/tests/unittests/SubresourceStorageTests.cpp index 2121752b53..ef4926d7b5 100644 --- a/src/tests/unittests/SubresourceStorageTests.cpp +++ b/src/tests/unittests/SubresourceStorageTests.cpp @@ -14,7 +14,7 @@ #include -#include "dawn_native/SubresourceStorage.h" +#include "dawn/native/SubresourceStorage.h" #include "dawn/common/Log.h" diff --git a/src/tests/unittests/ToBackendTests.cpp b/src/tests/unittests/ToBackendTests.cpp index d74088e37f..c143acd6dc 100644 --- a/src/tests/unittests/ToBackendTests.cpp +++ b/src/tests/unittests/ToBackendTests.cpp @@ -15,7 +15,7 @@ #include #include "dawn/common/RefCounted.h" -#include "dawn_native/ToBackend.h" +#include "dawn/native/ToBackend.h" #include diff --git a/src/tests/unittests/d3d12/CopySplitTests.cpp b/src/tests/unittests/d3d12/CopySplitTests.cpp index 3ecea236ba..75f088bd03 100644 --- a/src/tests/unittests/d3d12/CopySplitTests.cpp +++ b/src/tests/unittests/d3d12/CopySplitTests.cpp @@ -17,11 +17,11 @@ #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" +#include "dawn/native/Format.h" +#include "dawn/native/d3d12/TextureCopySplitter.h" +#include "dawn/native/d3d12/d3d12_platform.h" #include "dawn/utils/TestUtils.h" #include "dawn/webgpu_cpp_print.h" -#include "dawn_native/Format.h" -#include "dawn_native/d3d12/TextureCopySplitter.h" -#include "dawn_native/d3d12/d3d12_platform.h" using namespace dawn::native::d3d12; diff --git a/src/tests/unittests/native/CommandBufferEncodingTests.cpp b/src/tests/unittests/native/CommandBufferEncodingTests.cpp index 7074adbcca..b99f19a13d 100644 --- a/src/tests/unittests/native/CommandBufferEncodingTests.cpp +++ b/src/tests/unittests/native/CommandBufferEncodingTests.cpp @@ -14,10 +14,10 @@ #include "tests/DawnNativeTest.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/Commands.h" +#include "dawn/native/ComputePassEncoder.h" #include "dawn/utils/WGPUHelpers.h" -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/Commands.h" -#include "dawn_native/ComputePassEncoder.h" class CommandBufferEncodingTests : public DawnNativeTest { protected: diff --git a/src/tests/unittests/native/DestroyObjectTests.cpp b/src/tests/unittests/native/DestroyObjectTests.cpp index 4b62136e19..b6a3efbbdc 100644 --- a/src/tests/unittests/native/DestroyObjectTests.cpp +++ b/src/tests/unittests/native/DestroyObjectTests.cpp @@ -14,8 +14,8 @@ #include +#include "dawn/native/Toggles.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" -#include "dawn_native/Toggles.h" #include "mocks/BindGroupLayoutMock.h" #include "mocks/BindGroupMock.h" #include "mocks/BufferMock.h" diff --git a/src/tests/unittests/native/DeviceCreationTests.cpp b/src/tests/unittests/native/DeviceCreationTests.cpp index ec9c663e2d..6b49cba1c0 100644 --- a/src/tests/unittests/native/DeviceCreationTests.cpp +++ b/src/tests/unittests/native/DeviceCreationTests.cpp @@ -13,9 +13,9 @@ // limitations under the License. #include "dawn/dawn_proc.h" +#include "dawn/native/DawnNative.h" #include "dawn/utils/SystemUtils.h" #include "dawn/utils/WGPUHelpers.h" -#include "dawn_native/DawnNative.h" #include "tests/MockCallback.h" #include diff --git a/src/tests/unittests/native/mocks/BindGroupLayoutMock.h b/src/tests/unittests/native/mocks/BindGroupLayoutMock.h index 841e5c8ccd..8135f0c209 100644 --- a/src/tests/unittests/native/mocks/BindGroupLayoutMock.h +++ b/src/tests/unittests/native/mocks/BindGroupLayoutMock.h @@ -15,8 +15,8 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_BINDGROUPLAYOUT_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_BINDGROUPLAYOUT_MOCK_H_ -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Device.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Device.h" #include diff --git a/src/tests/unittests/native/mocks/BindGroupMock.h b/src/tests/unittests/native/mocks/BindGroupMock.h index 6faec4eb6a..f6a2370d8c 100644 --- a/src/tests/unittests/native/mocks/BindGroupMock.h +++ b/src/tests/unittests/native/mocks/BindGroupMock.h @@ -15,8 +15,8 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_BINDGROUP_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_BINDGROUP_MOCK_H_ -#include "dawn_native/BindGroup.h" -#include "dawn_native/Device.h" +#include "dawn/native/BindGroup.h" +#include "dawn/native/Device.h" #include diff --git a/src/tests/unittests/native/mocks/BufferMock.h b/src/tests/unittests/native/mocks/BufferMock.h index 9b69e2a1a7..8f17d1d013 100644 --- a/src/tests/unittests/native/mocks/BufferMock.h +++ b/src/tests/unittests/native/mocks/BufferMock.h @@ -15,8 +15,8 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_BUFFER_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_BUFFER_MOCK_H_ -#include "dawn_native/Buffer.h" -#include "dawn_native/Device.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/Device.h" #include diff --git a/src/tests/unittests/native/mocks/CommandBufferMock.h b/src/tests/unittests/native/mocks/CommandBufferMock.h index 7b0ee0876d..7f0198b9c5 100644 --- a/src/tests/unittests/native/mocks/CommandBufferMock.h +++ b/src/tests/unittests/native/mocks/CommandBufferMock.h @@ -15,8 +15,8 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_COMMANDBUFFER_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_COMMANDBUFFER_MOCK_H_ -#include "dawn_native/CommandBuffer.h" -#include "dawn_native/Device.h" +#include "dawn/native/CommandBuffer.h" +#include "dawn/native/Device.h" #include diff --git a/src/tests/unittests/native/mocks/ComputePipelineMock.h b/src/tests/unittests/native/mocks/ComputePipelineMock.h index c6208d835c..6071051f97 100644 --- a/src/tests/unittests/native/mocks/ComputePipelineMock.h +++ b/src/tests/unittests/native/mocks/ComputePipelineMock.h @@ -15,8 +15,8 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_COMPUTEPIPELINE_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_COMPUTEPIPELINE_MOCK_H_ -#include "dawn_native/ComputePipeline.h" -#include "dawn_native/Device.h" +#include "dawn/native/ComputePipeline.h" +#include "dawn/native/Device.h" #include diff --git a/src/tests/unittests/native/mocks/DeviceMock.h b/src/tests/unittests/native/mocks/DeviceMock.h index 6ba104fcfb..d0d5c319bd 100644 --- a/src/tests/unittests/native/mocks/DeviceMock.h +++ b/src/tests/unittests/native/mocks/DeviceMock.h @@ -15,8 +15,8 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_DEVICE_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_DEVICE_MOCK_H_ -#include "dawn_native/Device.h" -#include "dawn_native/RenderPipeline.h" +#include "dawn/native/Device.h" +#include "dawn/native/RenderPipeline.h" #include diff --git a/src/tests/unittests/native/mocks/ExternalTextureMock.h b/src/tests/unittests/native/mocks/ExternalTextureMock.h index 3e3ba2cd23..c40276bedf 100644 --- a/src/tests/unittests/native/mocks/ExternalTextureMock.h +++ b/src/tests/unittests/native/mocks/ExternalTextureMock.h @@ -15,8 +15,8 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_EXTERNALTEXTURE_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_EXTERNALTEXTURE_MOCK_H_ -#include "dawn_native/Device.h" -#include "dawn_native/ExternalTexture.h" +#include "dawn/native/Device.h" +#include "dawn/native/ExternalTexture.h" #include diff --git a/src/tests/unittests/native/mocks/PipelineLayoutMock.h b/src/tests/unittests/native/mocks/PipelineLayoutMock.h index 5201f3b3dc..7e82a40c9b 100644 --- a/src/tests/unittests/native/mocks/PipelineLayoutMock.h +++ b/src/tests/unittests/native/mocks/PipelineLayoutMock.h @@ -15,8 +15,8 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_PIPELINELAYOUT_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_PIPELINELAYOUT_MOCK_H_ -#include "dawn_native/Device.h" -#include "dawn_native/PipelineLayout.h" +#include "dawn/native/Device.h" +#include "dawn/native/PipelineLayout.h" #include diff --git a/src/tests/unittests/native/mocks/QuerySetMock.h b/src/tests/unittests/native/mocks/QuerySetMock.h index 138b143074..c4b8349848 100644 --- a/src/tests/unittests/native/mocks/QuerySetMock.h +++ b/src/tests/unittests/native/mocks/QuerySetMock.h @@ -15,8 +15,8 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_QUERYSET_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_QUERYSET_MOCK_H_ -#include "dawn_native/Device.h" -#include "dawn_native/QuerySet.h" +#include "dawn/native/Device.h" +#include "dawn/native/QuerySet.h" #include diff --git a/src/tests/unittests/native/mocks/RenderPipelineMock.h b/src/tests/unittests/native/mocks/RenderPipelineMock.h index f573dcda94..71e0287b5e 100644 --- a/src/tests/unittests/native/mocks/RenderPipelineMock.h +++ b/src/tests/unittests/native/mocks/RenderPipelineMock.h @@ -15,8 +15,8 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_RENDERPIPELINE_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_RENDERPIPELINE_MOCK_H_ -#include "dawn_native/Device.h" -#include "dawn_native/RenderPipeline.h" +#include "dawn/native/Device.h" +#include "dawn/native/RenderPipeline.h" #include diff --git a/src/tests/unittests/native/mocks/SamplerMock.h b/src/tests/unittests/native/mocks/SamplerMock.h index 4103398e45..48ab08778d 100644 --- a/src/tests/unittests/native/mocks/SamplerMock.h +++ b/src/tests/unittests/native/mocks/SamplerMock.h @@ -15,8 +15,8 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_SAMPLER_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_SAMPLER_MOCK_H_ -#include "dawn_native/Device.h" -#include "dawn_native/Sampler.h" +#include "dawn/native/Device.h" +#include "dawn/native/Sampler.h" #include diff --git a/src/tests/unittests/native/mocks/ShaderModuleMock.h b/src/tests/unittests/native/mocks/ShaderModuleMock.h index 349377a09d..8beeabfe1a 100644 --- a/src/tests/unittests/native/mocks/ShaderModuleMock.h +++ b/src/tests/unittests/native/mocks/ShaderModuleMock.h @@ -15,9 +15,9 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_SHADERMODULE_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_SHADERMODULE_MOCK_H_ -#include "dawn_native/Device.h" -#include "dawn_native/Error.h" -#include "dawn_native/ShaderModule.h" +#include "dawn/native/Device.h" +#include "dawn/native/Error.h" +#include "dawn/native/ShaderModule.h" #include diff --git a/src/tests/unittests/native/mocks/SwapChainMock.h b/src/tests/unittests/native/mocks/SwapChainMock.h index 4619c576c2..711f6fffaa 100644 --- a/src/tests/unittests/native/mocks/SwapChainMock.h +++ b/src/tests/unittests/native/mocks/SwapChainMock.h @@ -15,8 +15,8 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_SWAPCHAIN_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_SWAPCHAIN_MOCK_H_ -#include "dawn_native/Device.h" -#include "dawn_native/SwapChain.h" +#include "dawn/native/Device.h" +#include "dawn/native/SwapChain.h" #include diff --git a/src/tests/unittests/native/mocks/TextureMock.h b/src/tests/unittests/native/mocks/TextureMock.h index 181bd551ec..10aa2e95b2 100644 --- a/src/tests/unittests/native/mocks/TextureMock.h +++ b/src/tests/unittests/native/mocks/TextureMock.h @@ -15,8 +15,8 @@ #ifndef TESTS_UNITTESTS_NATIVE_MOCKS_TEXTURE_MOCK_H_ #define TESTS_UNITTESTS_NATIVE_MOCKS_TEXTURE_MOCK_H_ -#include "dawn_native/Device.h" -#include "dawn_native/Texture.h" +#include "dawn/native/Device.h" +#include "dawn/native/Texture.h" #include diff --git a/src/tests/unittests/validation/CommandBufferValidationTests.cpp b/src/tests/unittests/validation/CommandBufferValidationTests.cpp index c0a04e7232..dd80765c3e 100644 --- a/src/tests/unittests/validation/CommandBufferValidationTests.cpp +++ b/src/tests/unittests/validation/CommandBufferValidationTests.cpp @@ -14,7 +14,7 @@ #include -#include "dawn_native/CommandEncoder.h" +#include "dawn/native/CommandEncoder.h" #include "tests/unittests/validation/ValidationTest.h" diff --git a/src/tests/unittests/validation/DeviceValidationTests.cpp b/src/tests/unittests/validation/DeviceValidationTests.cpp index 8db3c688a2..c5d3535237 100644 --- a/src/tests/unittests/validation/DeviceValidationTests.cpp +++ b/src/tests/unittests/validation/DeviceValidationTests.cpp @@ -14,8 +14,8 @@ #include "tests/unittests/validation/ValidationTest.h" -#include "dawn_native/Device.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/Device.h" +#include "dawn/native/dawn_platform.h" using ::testing::HasSubstr; diff --git a/src/tests/unittests/validation/ShaderModuleValidationTests.cpp b/src/tests/unittests/validation/ShaderModuleValidationTests.cpp index f2bded5e7b..6ddc273797 100644 --- a/src/tests/unittests/validation/ShaderModuleValidationTests.cpp +++ b/src/tests/unittests/validation/ShaderModuleValidationTests.cpp @@ -14,7 +14,7 @@ #include "dawn/common/Constants.h" -#include "dawn_native/ShaderModule.h" +#include "dawn/native/ShaderModule.h" #include "tests/unittests/validation/ValidationTest.h" diff --git a/src/tests/unittests/validation/ValidationTest.cpp b/src/tests/unittests/validation/ValidationTest.cpp index 0c18fb5041..3462168394 100644 --- a/src/tests/unittests/validation/ValidationTest.cpp +++ b/src/tests/unittests/validation/ValidationTest.cpp @@ -17,9 +17,9 @@ #include "dawn/common/Assert.h" #include "dawn/common/SystemUtils.h" #include "dawn/dawn_proc.h" +#include "dawn/native/NullBackend.h" #include "dawn/utils/WireHelper.h" #include "dawn/webgpu.h" -#include "dawn_native/NullBackend.h" #include "tests/ToggleParser.h" #include diff --git a/src/tests/unittests/validation/ValidationTest.h b/src/tests/unittests/validation/ValidationTest.h index 89bea80c7e..989de4102d 100644 --- a/src/tests/unittests/validation/ValidationTest.h +++ b/src/tests/unittests/validation/ValidationTest.h @@ -16,8 +16,8 @@ #define TESTS_UNITTESTS_VALIDATIONTEST_H_ #include "dawn/common/Log.h" +#include "dawn/native/DawnNative.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/DawnNative.h" #include #include diff --git a/src/tests/white_box/BufferAllocatedSizeTests.cpp b/src/tests/white_box/BufferAllocatedSizeTests.cpp index eef4a292f0..9be4dc183f 100644 --- a/src/tests/white_box/BufferAllocatedSizeTests.cpp +++ b/src/tests/white_box/BufferAllocatedSizeTests.cpp @@ -15,7 +15,7 @@ #include "tests/DawnTest.h" #include "dawn/common/Math.h" -#include "dawn_native/DawnNative.h" +#include "dawn/native/DawnNative.h" #include diff --git a/src/tests/white_box/D3D12DescriptorHeapTests.cpp b/src/tests/white_box/D3D12DescriptorHeapTests.cpp index a8ad7acc0e..38258236b7 100644 --- a/src/tests/white_box/D3D12DescriptorHeapTests.cpp +++ b/src/tests/white_box/D3D12DescriptorHeapTests.cpp @@ -14,14 +14,14 @@ #include "tests/DawnTest.h" +#include "dawn/native/Device.h" +#include "dawn/native/Toggles.h" +#include "dawn/native/d3d12/BindGroupLayoutD3D12.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" +#include "dawn/native/d3d12/StagingDescriptorAllocatorD3D12.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "dawn_native/Device.h" -#include "dawn_native/Toggles.h" -#include "dawn_native/d3d12/BindGroupLayoutD3D12.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" -#include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h" constexpr uint32_t kRTSize = 4; diff --git a/src/tests/white_box/D3D12ResidencyTests.cpp b/src/tests/white_box/D3D12ResidencyTests.cpp index f29e1c9ae1..c944aaf20c 100644 --- a/src/tests/white_box/D3D12ResidencyTests.cpp +++ b/src/tests/white_box/D3D12ResidencyTests.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "dawn/native/D3D12Backend.h" +#include "dawn/native/d3d12/BufferD3D12.h" +#include "dawn/native/d3d12/DeviceD3D12.h" +#include "dawn/native/d3d12/ResidencyManagerD3D12.h" +#include "dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "dawn_native/D3D12Backend.h" -#include "dawn_native/d3d12/BufferD3D12.h" -#include "dawn_native/d3d12/DeviceD3D12.h" -#include "dawn_native/d3d12/ResidencyManagerD3D12.h" -#include "dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" #include "tests/DawnTest.h" #include diff --git a/src/tests/white_box/D3D12ResourceHeapTests.cpp b/src/tests/white_box/D3D12ResourceHeapTests.cpp index f68c12fe8f..69afb3ba3c 100644 --- a/src/tests/white_box/D3D12ResourceHeapTests.cpp +++ b/src/tests/white_box/D3D12ResourceHeapTests.cpp @@ -14,8 +14,8 @@ #include "tests/DawnTest.h" -#include "dawn_native/d3d12/BufferD3D12.h" -#include "dawn_native/d3d12/TextureD3D12.h" +#include "dawn/native/d3d12/BufferD3D12.h" +#include "dawn/native/d3d12/TextureD3D12.h" using namespace dawn::native::d3d12; diff --git a/src/tests/white_box/EGLImageWrappingTests.cpp b/src/tests/white_box/EGLImageWrappingTests.cpp index c18c6be9a6..46226ab295 100644 --- a/src/tests/white_box/EGLImageWrappingTests.cpp +++ b/src/tests/white_box/EGLImageWrappingTests.cpp @@ -15,10 +15,10 @@ #include "tests/DawnTest.h" #include "dawn/common/DynamicLib.h" +#include "dawn/native/OpenGLBackend.h" +#include "dawn/native/opengl/DeviceGL.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "dawn_native/OpenGLBackend.h" -#include "dawn_native/opengl/DeviceGL.h" #include diff --git a/src/tests/white_box/InternalResourceUsageTests.cpp b/src/tests/white_box/InternalResourceUsageTests.cpp index db61b9c697..029bef9b1f 100644 --- a/src/tests/white_box/InternalResourceUsageTests.cpp +++ b/src/tests/white_box/InternalResourceUsageTests.cpp @@ -14,7 +14,7 @@ #include "tests/DawnTest.h" -#include "dawn_native/dawn_platform.h" +#include "dawn/native/dawn_platform.h" class InternalResourceUsageTests : public DawnTest { protected: diff --git a/src/tests/white_box/InternalStorageBufferBindingTests.cpp b/src/tests/white_box/InternalStorageBufferBindingTests.cpp index 35d9893cb1..dbad35e69f 100644 --- a/src/tests/white_box/InternalStorageBufferBindingTests.cpp +++ b/src/tests/white_box/InternalStorageBufferBindingTests.cpp @@ -14,10 +14,10 @@ #include "tests/DawnTest.h" +#include "dawn/native/BindGroupLayout.h" +#include "dawn/native/Device.h" +#include "dawn/native/dawn_platform.h" #include "dawn/utils/WGPUHelpers.h" -#include "dawn_native/BindGroupLayout.h" -#include "dawn_native/Device.h" -#include "dawn_native/dawn_platform.h" class InternalStorageBufferBindingTests : public DawnTest { protected: diff --git a/src/tests/white_box/MetalAutoreleasePoolTests.mm b/src/tests/white_box/MetalAutoreleasePoolTests.mm index 3a741d50b7..8a4db410a4 100644 --- a/src/tests/white_box/MetalAutoreleasePoolTests.mm +++ b/src/tests/white_box/MetalAutoreleasePoolTests.mm @@ -14,7 +14,7 @@ #include "tests/DawnTest.h" -#include "dawn_native/metal/DeviceMTL.h" +#include "dawn/native/metal/DeviceMTL.h" using namespace dawn::native::metal; diff --git a/src/tests/white_box/QueryInternalShaderTests.cpp b/src/tests/white_box/QueryInternalShaderTests.cpp index 279f04b6c9..bfa9c09f7e 100644 --- a/src/tests/white_box/QueryInternalShaderTests.cpp +++ b/src/tests/white_box/QueryInternalShaderTests.cpp @@ -14,10 +14,10 @@ #include "tests/DawnTest.h" +#include "dawn/native/Buffer.h" +#include "dawn/native/CommandEncoder.h" +#include "dawn/native/QueryHelper.h" #include "dawn/utils/WGPUHelpers.h" -#include "dawn_native/Buffer.h" -#include "dawn_native/CommandEncoder.h" -#include "dawn_native/QueryHelper.h" namespace { diff --git a/src/tests/white_box/VulkanErrorInjectorTests.cpp b/src/tests/white_box/VulkanErrorInjectorTests.cpp index 6747313f92..5efd0987b6 100644 --- a/src/tests/white_box/VulkanErrorInjectorTests.cpp +++ b/src/tests/white_box/VulkanErrorInjectorTests.cpp @@ -16,10 +16,10 @@ #include "dawn/common/Math.h" #include "dawn/common/vulkan_platform.h" -#include "dawn_native/ErrorData.h" -#include "dawn_native/VulkanBackend.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/VulkanError.h" +#include "dawn/native/ErrorData.h" +#include "dawn/native/VulkanBackend.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/VulkanError.h" namespace { diff --git a/src/tests/white_box/VulkanImageWrappingTests.cpp b/src/tests/white_box/VulkanImageWrappingTests.cpp index b80b700405..d46531efdd 100644 --- a/src/tests/white_box/VulkanImageWrappingTests.cpp +++ b/src/tests/white_box/VulkanImageWrappingTests.cpp @@ -15,9 +15,9 @@ #include "tests/white_box/VulkanImageWrappingTests.h" #include "dawn/common/Math.h" +#include "dawn/native/vulkan/AdapterVk.h" +#include "dawn/native/vulkan/DeviceVk.h" #include "dawn/utils/WGPUHelpers.h" -#include "dawn_native/vulkan/AdapterVk.h" -#include "dawn_native/vulkan/DeviceVk.h" #include "tests/DawnTest.h" namespace dawn::native { namespace vulkan { diff --git a/src/tests/white_box/VulkanImageWrappingTests.h b/src/tests/white_box/VulkanImageWrappingTests.h index c630c7094c..d4173a7e0d 100644 --- a/src/tests/white_box/VulkanImageWrappingTests.h +++ b/src/tests/white_box/VulkanImageWrappingTests.h @@ -20,8 +20,8 @@ #include "dawn/common/vulkan_platform.h" #include "dawn/common/NonCopyable.h" +#include "dawn/native/VulkanBackend.h" #include "dawn/webgpu_cpp.h" -#include "dawn_native/VulkanBackend.h" #include #include diff --git a/src/tests/white_box/VulkanImageWrappingTests_OpaqueFD.cpp b/src/tests/white_box/VulkanImageWrappingTests_OpaqueFD.cpp index 7e94cb9efb..a6f295587f 100644 --- a/src/tests/white_box/VulkanImageWrappingTests_OpaqueFD.cpp +++ b/src/tests/white_box/VulkanImageWrappingTests_OpaqueFD.cpp @@ -14,9 +14,9 @@ #include "tests/white_box/VulkanImageWrappingTests.h" -#include "dawn_native/vulkan/DeviceVk.h" -#include "dawn_native/vulkan/FencedDeleter.h" -#include "dawn_native/vulkan/ResourceMemoryAllocatorVk.h" +#include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/native/vulkan/FencedDeleter.h" +#include "dawn/native/vulkan/ResourceMemoryAllocatorVk.h" #include #include