1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Implement Framebuffer Subpass support

* Required for better optimizing mobile platforms
* Will be used by the Vulkan mobile renderer.
This commit is contained in:
reduz
2021-06-24 10:58:36 -03:00
parent 8ccadfabf2
commit bde6f5eed1
10 changed files with 870 additions and 256 deletions

View File

@@ -128,6 +128,34 @@ protected:
}
};
class RDFramebufferPass : public RefCounted {
GDCLASS(RDFramebufferPass, RefCounted)
friend class RenderingDevice;
RD::FramebufferPass base;
public:
RD_SETGET(PackedInt32Array, color_attachments)
RD_SETGET(PackedInt32Array, input_attachments)
RD_SETGET(PackedInt32Array, resolve_attachments)
RD_SETGET(PackedInt32Array, preserve_attachments)
RD_SETGET(int32_t, depth_attachment)
protected:
enum {
ATTACHMENT_UNUSED = -1
};
static void _bind_methods() {
RD_BIND(Variant::PACKED_INT32_ARRAY, RDFramebufferPass, color_attachments);
RD_BIND(Variant::PACKED_INT32_ARRAY, RDFramebufferPass, input_attachments);
RD_BIND(Variant::PACKED_INT32_ARRAY, RDFramebufferPass, resolve_attachments);
RD_BIND(Variant::PACKED_INT32_ARRAY, RDFramebufferPass, preserve_attachments);
RD_BIND(Variant::INT, RDFramebufferPass, depth_attachment);
BIND_CONSTANT(ATTACHMENT_UNUSED);
}
};
class RDSamplerState : public RefCounted {
GDCLASS(RDSamplerState, RefCounted)
friend class RenderingDevice;