dawn-cmake/src/dawn/native/RenderBundle.h
dan sinclair b02535557e Fixup build/include_order issues in src/dawn.
This Cl moves the cpp includes to above the project includes fixing up
the build/include_order issues and enabling the lint check.

A couple includes are marked as NOLINT as the c header has to come after
the project header due to setting defines.

Bug: dawn:1339
Change-Id: Ia47499c94fff99106397b83f6c5c7fe100c44a0e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86513
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-04-19 20:38:44 +00:00

74 lines
2.4 KiB
C++

// Copyright 2019 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 SRC_DAWN_NATIVE_RENDERBUNDLE_H_
#define SRC_DAWN_NATIVE_RENDERBUNDLE_H_
#include <bitset>
#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/dawn_platform.h"
namespace dawn::native {
struct RenderBundleDescriptor;
class RenderBundleEncoder;
class RenderBundleBase final : public ApiObjectBase {
public:
RenderBundleBase(RenderBundleEncoder* encoder,
const RenderBundleDescriptor* descriptor,
Ref<AttachmentState> attachmentState,
bool depthReadOnly,
bool stencilReadOnly,
RenderPassResourceUsage resourceUsage,
IndirectDrawMetadata indirectDrawMetadata);
static RenderBundleBase* MakeError(DeviceBase* device);
ObjectType GetType() const override;
CommandIterator* GetCommands();
const AttachmentState* GetAttachmentState() const;
bool IsDepthReadOnly() const;
bool IsStencilReadOnly() const;
const RenderPassResourceUsage& GetResourceUsage() const;
const IndirectDrawMetadata& GetIndirectDrawMetadata();
private:
RenderBundleBase(DeviceBase* device, ErrorTag errorTag);
void DestroyImpl() override;
CommandIterator mCommands;
IndirectDrawMetadata mIndirectDrawMetadata;
Ref<AttachmentState> mAttachmentState;
bool mDepthReadOnly;
bool mStencilReadOnly;
RenderPassResourceUsage mResourceUsage;
};
} // namespace dawn::native
#endif // SRC_DAWN_NATIVE_RENDERBUNDLE_H_