summaryrefslogtreecommitdiffstats
path: root/servers/rendering/rendering_device_binds.h
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2021-06-24 10:58:36 -0300
committerreduz <reduzio@gmail.com>2021-06-24 15:59:15 -0300
commitbde6f5eed1cec3639e5c81d1e5ee34ecf3fe7486 (patch)
tree8f339026a1db2addb5bd728d605b144d5258a320 /servers/rendering/rendering_device_binds.h
parent8ccadfabf21fadc01fda157988c66c6cecf38555 (diff)
downloadredot-engine-bde6f5eed1cec3639e5c81d1e5ee34ecf3fe7486.tar.gz
Implement Framebuffer Subpass support
* Required for better optimizing mobile platforms * Will be used by the Vulkan mobile renderer.
Diffstat (limited to 'servers/rendering/rendering_device_binds.h')
-rw-r--r--servers/rendering/rendering_device_binds.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/servers/rendering/rendering_device_binds.h b/servers/rendering/rendering_device_binds.h
index 912674e309..dc59568ce9 100644
--- a/servers/rendering/rendering_device_binds.h
+++ b/servers/rendering/rendering_device_binds.h
@@ -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;