GPUFramebuffer: Bump max attachment count to 8

This is needed by eevee-rewrite
This commit is contained in:
2022-02-04 19:56:36 +01:00
parent 77d005ea36
commit 25c50ddd09
2 changed files with 5 additions and 2 deletions

View File

@@ -43,8 +43,9 @@ typedef enum GPUAttachmentType : int {
GPU_FB_COLOR_ATTACHMENT3,
GPU_FB_COLOR_ATTACHMENT4,
GPU_FB_COLOR_ATTACHMENT5,
/* Number of maximum output slots.
* We support 6 outputs for now (usually we wouldn't need more to preserve fill rate). */
GPU_FB_COLOR_ATTACHMENT6,
GPU_FB_COLOR_ATTACHMENT7,
/* Number of maximum output slots. */
/* Keep in mind that GL max is GL_MAX_DRAW_BUFFERS and is at least 8, corresponding to
* the maximum number of COLOR attachments specified by glDrawBuffers. */
GPU_FB_MAX_ATTACHMENT,

View File

@@ -141,6 +141,8 @@ static inline GLenum to_gl(const GPUAttachmentType type)
ATTACHMENT(COLOR_ATTACHMENT3);
ATTACHMENT(COLOR_ATTACHMENT4);
ATTACHMENT(COLOR_ATTACHMENT5);
ATTACHMENT(COLOR_ATTACHMENT6);
ATTACHMENT(COLOR_ATTACHMENT7);
default:
BLI_assert(0);
return GL_COLOR_ATTACHMENT0;