Remove some useless #include files and forward declarations

BUG=chromium:1161355

Change-Id: Ie4d0e5da22f4b7a66591265d101f2fbe75a2e00a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42180
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Jiawei Shao 2021-02-23 01:51:06 +00:00 committed by Commit Bot service account
parent 423e3f6896
commit 76a94b17be
25 changed files with 4 additions and 63 deletions

View File

@ -27,8 +27,6 @@
namespace dawn_native { namespace dawn_native {
struct BeginRenderPassCmd;
using QueryAvailabilityMap = std::map<QuerySetBase*, std::vector<bool>>; using QueryAvailabilityMap = std::map<QuerySetBase*, std::vector<bool>>;
class CommandEncoder final : public ObjectBase { class CommandEncoder final : public ObjectBase {

View File

@ -23,9 +23,7 @@
namespace dawn_native { namespace dawn_native {
class AttachmentState;
class QuerySetBase; class QuerySetBase;
struct BeginRenderPassCmd;
struct PassResourceUsage; struct PassResourceUsage;
struct TexelBlockInfo; struct TexelBlockInfo;

View File

@ -25,7 +25,6 @@ namespace dawn_native {
class ComputePipelineBase; class ComputePipelineBase;
class DeviceBase; class DeviceBase;
class PipelineBase;
class RenderPipelineBase; class RenderPipelineBase;
struct CreatePipelineAsyncTaskBase { struct CreatePipelineAsyncTaskBase {

View File

@ -25,7 +25,6 @@
namespace dawn_native { namespace dawn_native {
class CommandAllocator;
class DeviceBase; class DeviceBase;
// Base class for shared functionality between ComputePassEncoder and RenderPassEncoder. // Base class for shared functionality between ComputePassEncoder and RenderPassEncoder.

View File

@ -20,7 +20,6 @@
namespace dawn_native { namespace dawn_native {
class BufferBase; class BufferBase;
class DeviceBase;
class CommandEncoder; class CommandEncoder;
struct TimestampParams { struct TimestampParams {

View File

@ -28,7 +28,6 @@
namespace dawn_native { namespace dawn_native {
struct BeginRenderPassCmd;
struct RenderBundleDescriptor; struct RenderBundleDescriptor;
class RenderBundleEncoder; class RenderBundleEncoder;

View File

@ -27,11 +27,7 @@
namespace dawn_native { namespace dawn_native {
struct BeginRenderPassCmd;
class DeviceBase; class DeviceBase;
struct EntryPointMetadata;
class RenderBundleEncoder;
MaybeError ValidateRenderPipelineDescriptor(DeviceBase* device, MaybeError ValidateRenderPipelineDescriptor(DeviceBase* device,
const RenderPipelineDescriptor* descriptor); const RenderPipelineDescriptor* descriptor);

View File

@ -25,7 +25,6 @@ namespace dawn_native { namespace d3d12 {
class Device; class Device;
class SamplerHeapCacheEntry; class SamplerHeapCacheEntry;
class ShaderVisibleDescriptorAllocator; class ShaderVisibleDescriptorAllocator;
class StagingDescriptorAllocator;
class BindGroup final : public BindGroupBase, public PlacementAllocated { class BindGroup final : public BindGroupBase, public PlacementAllocated {
public: public:

View File

@ -26,7 +26,6 @@ namespace dawn_native { namespace d3d12 {
class BindGroup; class BindGroup;
class CPUDescriptorHeapAllocation; class CPUDescriptorHeapAllocation;
class Device; class Device;
class SamplerHeapCacheEntry;
class StagingDescriptorAllocator; class StagingDescriptorAllocator;
class BindGroupLayout final : public BindGroupLayoutBase { class BindGroupLayout final : public BindGroupLayoutBase {

View File

@ -14,17 +14,11 @@
#include "dawn_native/d3d12/CommandBufferD3D12.h" #include "dawn_native/d3d12/CommandBufferD3D12.h"
#include "common/Assert.h"
#include "dawn_native/BindGroupTracker.h" #include "dawn_native/BindGroupTracker.h"
#include "dawn_native/CommandEncoder.h"
#include "dawn_native/CommandValidation.h" #include "dawn_native/CommandValidation.h"
#include "dawn_native/Commands.h"
#include "dawn_native/EnumMaskIterator.h"
#include "dawn_native/RenderBundle.h" #include "dawn_native/RenderBundle.h"
#include "dawn_native/d3d12/BindGroupD3D12.h" #include "dawn_native/d3d12/BindGroupD3D12.h"
#include "dawn_native/d3d12/BindGroupLayoutD3D12.h" #include "dawn_native/d3d12/BindGroupLayoutD3D12.h"
#include "dawn_native/d3d12/BufferD3D12.h"
#include "dawn_native/d3d12/CommandRecordingContext.h"
#include "dawn_native/d3d12/ComputePipelineD3D12.h" #include "dawn_native/d3d12/ComputePipelineD3D12.h"
#include "dawn_native/d3d12/DeviceD3D12.h" #include "dawn_native/d3d12/DeviceD3D12.h"
#include "dawn_native/d3d12/PipelineLayoutD3D12.h" #include "dawn_native/d3d12/PipelineLayoutD3D12.h"
@ -32,16 +26,10 @@
#include "dawn_native/d3d12/QuerySetD3D12.h" #include "dawn_native/d3d12/QuerySetD3D12.h"
#include "dawn_native/d3d12/RenderPassBuilderD3D12.h" #include "dawn_native/d3d12/RenderPassBuilderD3D12.h"
#include "dawn_native/d3d12/RenderPipelineD3D12.h" #include "dawn_native/d3d12/RenderPipelineD3D12.h"
#include "dawn_native/d3d12/SamplerD3D12.h"
#include "dawn_native/d3d12/SamplerHeapCacheD3D12.h"
#include "dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" #include "dawn_native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h"
#include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h" #include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h"
#include "dawn_native/d3d12/TextureCopySplitter.h"
#include "dawn_native/d3d12/TextureD3D12.h"
#include "dawn_native/d3d12/UtilsD3D12.h" #include "dawn_native/d3d12/UtilsD3D12.h"
#include <deque>
namespace dawn_native { namespace d3d12 { namespace dawn_native { namespace d3d12 {
namespace { namespace {

View File

@ -15,12 +15,8 @@
#ifndef DAWNNATIVE_D3D12_COMMANDBUFFERD3D12_H_ #ifndef DAWNNATIVE_D3D12_COMMANDBUFFERD3D12_H_
#define DAWNNATIVE_D3D12_COMMANDBUFFERD3D12_H_ #define DAWNNATIVE_D3D12_COMMANDBUFFERD3D12_H_
#include "common/Constants.h"
#include "dawn_native/CommandBuffer.h" #include "dawn_native/CommandBuffer.h"
#include "dawn_native/Error.h" #include "dawn_native/Error.h"
#include "dawn_native/d3d12/Forward.h"
#include <array>
namespace dawn_native { namespace dawn_native {
struct BeginRenderPassCmd; struct BeginRenderPassCmd;
@ -30,10 +26,7 @@ namespace dawn_native { namespace d3d12 {
class BindGroupStateTracker; class BindGroupStateTracker;
class CommandRecordingContext; class CommandRecordingContext;
class Device;
class RenderPassDescriptorHeapTracker;
class RenderPassBuilder; class RenderPassBuilder;
class RenderPipeline;
class CommandBuffer final : public CommandBufferBase { class CommandBuffer final : public CommandBufferBase {
public: public:

View File

@ -15,13 +15,15 @@
#define DAWNNATIVE_D3D12_COMMANDRECORDINGCONTEXT_H_ #define DAWNNATIVE_D3D12_COMMANDRECORDINGCONTEXT_H_
#include "dawn_native/Error.h" #include "dawn_native/Error.h"
#include "dawn_native/d3d12/TextureD3D12.h" #include "dawn_native/IntegerTypes.h"
#include "dawn_native/d3d12/d3d12_platform.h" #include "dawn_native/d3d12/d3d12_platform.h"
#include <set> #include <set>
namespace dawn_native { namespace d3d12 { namespace dawn_native { namespace d3d12 {
class CommandAllocatorManager; class CommandAllocatorManager;
class Device;
class Heap;
class Texture; class Texture;
class CommandRecordingContext { class CommandRecordingContext {

View File

@ -14,16 +14,11 @@
#include "dawn_native/d3d12/DeviceD3D12.h" #include "dawn_native/d3d12/DeviceD3D12.h"
#include "common/Assert.h"
#include "dawn_native/BackendConnection.h"
#include "dawn_native/ErrorData.h"
#include "dawn_native/Format.h"
#include "dawn_native/Instance.h" #include "dawn_native/Instance.h"
#include "dawn_native/d3d12/AdapterD3D12.h" #include "dawn_native/d3d12/AdapterD3D12.h"
#include "dawn_native/d3d12/BackendD3D12.h" #include "dawn_native/d3d12/BackendD3D12.h"
#include "dawn_native/d3d12/BindGroupD3D12.h" #include "dawn_native/d3d12/BindGroupD3D12.h"
#include "dawn_native/d3d12/BindGroupLayoutD3D12.h" #include "dawn_native/d3d12/BindGroupLayoutD3D12.h"
#include "dawn_native/d3d12/BufferD3D12.h"
#include "dawn_native/d3d12/CommandAllocatorManager.h" #include "dawn_native/d3d12/CommandAllocatorManager.h"
#include "dawn_native/d3d12/CommandBufferD3D12.h" #include "dawn_native/d3d12/CommandBufferD3D12.h"
#include "dawn_native/d3d12/ComputePipelineD3D12.h" #include "dawn_native/d3d12/ComputePipelineD3D12.h"
@ -42,7 +37,6 @@
#include "dawn_native/d3d12/StagingBufferD3D12.h" #include "dawn_native/d3d12/StagingBufferD3D12.h"
#include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h" #include "dawn_native/d3d12/StagingDescriptorAllocatorD3D12.h"
#include "dawn_native/d3d12/SwapChainD3D12.h" #include "dawn_native/d3d12/SwapChainD3D12.h"
#include "dawn_native/d3d12/TextureD3D12.h"
#include "dawn_native/d3d12/UtilsD3D12.h" #include "dawn_native/d3d12/UtilsD3D12.h"
#include <sstream> #include <sstream>

View File

@ -15,24 +15,16 @@
#ifndef DAWNNATIVE_D3D12_DEVICED3D12_H_ #ifndef DAWNNATIVE_D3D12_DEVICED3D12_H_
#define DAWNNATIVE_D3D12_DEVICED3D12_H_ #define DAWNNATIVE_D3D12_DEVICED3D12_H_
#include "dawn_native/dawn_platform.h"
#include "common/Constants.h"
#include "common/SerialQueue.h" #include "common/SerialQueue.h"
#include "dawn_native/BindingInfo.h"
#include "dawn_native/Commands.h"
#include "dawn_native/Device.h" #include "dawn_native/Device.h"
#include "dawn_native/d3d12/CommandRecordingContext.h" #include "dawn_native/d3d12/CommandRecordingContext.h"
#include "dawn_native/d3d12/D3D12Info.h" #include "dawn_native/d3d12/D3D12Info.h"
#include "dawn_native/d3d12/Forward.h" #include "dawn_native/d3d12/Forward.h"
#include "dawn_native/d3d12/ResourceHeapAllocationD3D12.h" #include "dawn_native/d3d12/TextureD3D12.h"
#include <memory>
namespace dawn_native { namespace d3d12 { namespace dawn_native { namespace d3d12 {
class CommandAllocatorManager; class CommandAllocatorManager;
class DescriptorHeapAllocator;
class PlatformFunctions; class PlatformFunctions;
class ResidencyManager; class ResidencyManager;
class ResourceAllocatorManager; class ResourceAllocatorManager;

View File

@ -23,7 +23,6 @@
namespace dawn_native { namespace d3d12 { namespace dawn_native { namespace d3d12 {
class Device; class Device;
class CommandBuffer;
class Queue final : public QueueBase { class Queue final : public QueueBase {
public: public:

View File

@ -21,7 +21,6 @@
#include "dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h" #include "dawn_native/d3d12/GPUDescriptorHeapAllocationD3D12.h"
#include <unordered_set> #include <unordered_set>
#include <vector>
// |SamplerHeapCacheEntry| maintains a cache of sampler descriptor heap allocations. // |SamplerHeapCacheEntry| maintains a cache of sampler descriptor heap allocations.
// Each entry represents one or more sampler descriptors that co-exist in a CPU and // Each entry represents one or more sampler descriptors that co-exist in a CPU and

View File

@ -21,7 +21,6 @@
namespace dawn_native { namespace d3d12 { namespace dawn_native { namespace d3d12 {
class CommandRecordingContext;
class Device; class Device;
class StagingBuffer : public StagingBufferBase { class StagingBuffer : public StagingBufferBase {

View File

@ -20,7 +20,6 @@
namespace dawn_native { namespace metal { namespace dawn_native { namespace metal {
class BindGroupLayout;
class Device; class Device;
class BindGroup final : public BindGroupBase, public PlacementAllocated { class BindGroup final : public BindGroupBase, public PlacementAllocated {

View File

@ -19,7 +19,6 @@
namespace dawn_native { namespace metal { namespace dawn_native { namespace metal {
class CommandBuffer;
class Device; class Device;
class Queue final : public QueueBase { class Queue final : public QueueBase {

View File

@ -20,7 +20,6 @@
namespace dawn_native { namespace opengl { namespace dawn_native { namespace opengl {
class BindGroupLayout;
class Device; class Device;
MaybeError ValidateGLBindGroupDescriptor(const BindGroupDescriptor* descriptor); MaybeError ValidateGLBindGroupDescriptor(const BindGroupDescriptor* descriptor);

View File

@ -24,7 +24,6 @@ namespace dawn_native {
namespace dawn_native { namespace opengl { namespace dawn_native { namespace opengl {
class Device; class Device;
struct OpenGLFunctions;
class CommandBuffer final : public CommandBufferBase { class CommandBuffer final : public CommandBufferBase {
public: public:

View File

@ -29,7 +29,6 @@ namespace dawn_native {
namespace dawn_native { namespace opengl { namespace dawn_native { namespace opengl {
struct OpenGLFunctions; struct OpenGLFunctions;
class PersistentPipelineState;
class PipelineLayout; class PipelineLayout;
class Sampler; class Sampler;

View File

@ -19,7 +19,6 @@
namespace dawn_native { namespace opengl { namespace dawn_native { namespace opengl {
class CommandBuffer;
class Device; class Device;
class Queue final : public QueueBase { class Queue final : public QueueBase {

View File

@ -18,11 +18,7 @@
#include "dawn_native/vulkan/BufferVk.h" #include "dawn_native/vulkan/BufferVk.h"
#include <vector>
namespace dawn_native { namespace vulkan { namespace dawn_native { namespace vulkan {
class Buffer;
// Used to track operations that are handled after recording. // Used to track operations that are handled after recording.
// Currently only tracks semaphores, but may be used to do barrier coalescing in the future. // Currently only tracks semaphores, but may be used to do barrier coalescing in the future.
struct CommandRecordingContext { struct CommandRecordingContext {

View File

@ -19,7 +19,6 @@
namespace dawn_native { namespace vulkan { namespace dawn_native { namespace vulkan {
class CommandBuffer;
class Device; class Device;
class Queue final : public QueueBase { class Queue final : public QueueBase {