WebMetalRenderPipelineDescriptor.h [plain text]
#pragma once
#if ENABLE(WEBMETAL)
#include "GPULegacyRenderPipelineDescriptor.h"
#include "WebMetalRenderPipelineColorAttachmentDescriptor.h"
#include <wtf/Ref.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
namespace WebCore {
class GPULegacyFunction;
class GPULegacyRenderPipelineDescriptor;
class WebMetalFunction;
class WebMetalRenderPipelineColorAttachmentDescriptor;
class WebMetalRenderPipelineDescriptor : public RefCounted<WebMetalRenderPipelineDescriptor> {
public:
~WebMetalRenderPipelineDescriptor();
static Ref<WebMetalRenderPipelineDescriptor> create();
WebMetalFunction* vertexFunction() const;
void setVertexFunction(RefPtr<WebMetalFunction>&&);
WebMetalFunction* fragmentFunction() const;
void setFragmentFunction(RefPtr<WebMetalFunction>&&);
const Vector<RefPtr<WebMetalRenderPipelineColorAttachmentDescriptor>>& colorAttachments();
unsigned depthAttachmentPixelFormat() const;
void setDepthAttachmentPixelFormat(unsigned);
void reset();
const GPULegacyRenderPipelineDescriptor& descriptor() { return m_descriptor; }
private:
WebMetalRenderPipelineDescriptor();
RefPtr<WebMetalFunction> m_vertexFunction;
RefPtr<WebMetalFunction> m_fragmentFunction;
Vector<RefPtr<WebMetalRenderPipelineColorAttachmentDescriptor>> m_colorAttachments;
GPULegacyRenderPipelineDescriptor m_descriptor;
};
}
#endif