[Bf-blender-cvs] [8d4aa6bf441] blender2.8: GPUFramebuffer: Bump the framebuffer attachement limit to 5 color textures
Clément Foucault
noreply at git.blender.org
Fri Nov 24 22:29:32 CET 2017
Commit: 8d4aa6bf44106bbc1605151c05ae6d5bb5c30e29
Author: Clément Foucault
Date: Fri Nov 24 22:26:08 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB8d4aa6bf44106bbc1605151c05ae6d5bb5c30e29
GPUFramebuffer: Bump the framebuffer attachement limit to 5 color textures
===================================================================
M source/blender/gpu/intern/gpu_framebuffer.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c
index 5aa7e5e8008..6830e73cb03 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.c
+++ b/source/blender/gpu/intern/gpu_framebuffer.c
@@ -45,8 +45,8 @@ static struct GPUFrameBufferGlobal {
} GG = {0};
/* Number of maximum output slots.
- * We support 4 outputs for now (usually we wouldn't need more to preserve fill rate) */
-#define GPU_FB_MAX_SLOTS 4
+ * We support 5 outputs for now (usually we wouldn't need more to preserve fill rate) */
+#define GPU_FB_MAX_SLOTS 5
struct GPUFrameBuffer {
GLuint object;
@@ -286,14 +286,14 @@ void GPU_texture_bind_as_framebuffer(GPUTexture *tex)
void GPU_framebuffer_slots_bind(GPUFrameBuffer *fb, int slot)
{
int numslots = 0, i;
- GLenum attachments[4];
+ GLenum attachments[GPU_FB_MAX_SLOTS];
if (!fb->colortex[slot]) {
fprintf(stderr, "Error, framebuffer slot empty!\n");
return;
}
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < GPU_FB_MAX_SLOTS; i++) {
if (fb->colortex[i]) {
attachments[numslots] = GL_COLOR_ATTACHMENT0 + i;
numslots++;
@@ -319,11 +319,11 @@ void GPU_framebuffer_slots_bind(GPUFrameBuffer *fb, int slot)
void GPU_framebuffer_bind(GPUFrameBuffer *fb)
{
int numslots = 0, i;
- GLenum attachments[4];
+ GLenum attachments[GPU_FB_MAX_SLOTS];
GLenum readattachement = 0;
GPUTexture *tex;
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < GPU_FB_MAX_SLOTS; i++) {
if (fb->colortex[i]) {
attachments[numslots] = GL_COLOR_ATTACHMENT0 + i;
tex = fb->colortex[i];
More information about the Bf-blender-cvs
mailing list