mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-15 17:45:58 +00:00
This patch removes RenderPassDescriptor from BeginRenderPassCmd so that all the backends can get the data of render pass from the non-pointer field of BeginRenderPassCmd instead. In this patch, RenderPassDescriptor has been removed from all Dawn backends other than the virtual function DeviceBase::CreateRenderPassDescriptor(). This patch is one of the preparations on completely removing RenderPassDescriptorBuilder from Dawn. BUG=dawn:6 Change-Id: I3a78f0b2d5318c2bf85858d6fbe939b7861a2cf8 Reviewed-on: https://dawn-review.googlesource.com/c/4800 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
48 lines
1.4 KiB
Objective-C
48 lines
1.4 KiB
Objective-C
// Copyright 2017 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_METAL_COMMANDBUFFERMTL_H_
|
|
#define DAWNNATIVE_METAL_COMMANDBUFFERMTL_H_
|
|
|
|
#include "dawn_native/CommandBuffer.h"
|
|
|
|
#import <Metal/Metal.h>
|
|
|
|
namespace dawn_native {
|
|
struct BeginRenderPassCmd;
|
|
}
|
|
|
|
namespace dawn_native { namespace metal {
|
|
|
|
class Device;
|
|
|
|
class CommandBuffer : public CommandBufferBase {
|
|
public:
|
|
CommandBuffer(CommandBufferBuilder* builder);
|
|
~CommandBuffer();
|
|
|
|
void FillCommands(id<MTLCommandBuffer> commandBuffer);
|
|
|
|
private:
|
|
void EncodeComputePass(id<MTLCommandBuffer> commandBuffer);
|
|
void EncodeRenderPass(id<MTLCommandBuffer> commandBuffer, BeginRenderPassCmd* renderPass);
|
|
|
|
Device* mDevice;
|
|
CommandIterator mCommands;
|
|
};
|
|
|
|
}} // namespace dawn_native::metal
|
|
|
|
#endif // DAWNNATIVE_METAL_COMMANDBUFFERMTL_H_
|