Retrieve render colorbuffers as a single vector.
Making all our render methods query FBO attachments for rendering
in one place will allow us to easily control the MRT peformance
workaround, and simplify the implementation.
BUG=angle:705
Change-Id: I6c476d45b81228d6ffe8831347443994237e3593
Reviewed-on: https://chromium-review.googlesource.com/215843
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
diff --git a/src/libGLESv2/Framebuffer.h b/src/libGLESv2/Framebuffer.h
index de84fbf..d6dce69 100644
--- a/src/libGLESv2/Framebuffer.h
+++ b/src/libGLESv2/Framebuffer.h
@@ -10,6 +10,8 @@
#ifndef LIBGLESV2_FRAMEBUFFER_H_
#define LIBGLESV2_FRAMEBUFFER_H_
+#include <vector>
+
#include "common/angleutils.h"
#include "common/RefCountObject.h"
#include "constants.h"
@@ -28,6 +30,8 @@
class DepthStencilbuffer;
struct Caps;
+typedef std::vector<FramebufferAttachment *> ColorbufferInfo;
+
class Framebuffer
{
public:
@@ -72,6 +76,11 @@
void invalidateSub(const Caps &caps, GLsizei numAttachments, const GLenum *attachments,
GLint x, GLint y, GLsizei width, GLsizei height);
+ // Use this method to retrieve the color buffer map when doing rendering.
+ // It will apply a workaround for poor shader performance on some systems
+ // by compacting the list to skip NULL values.
+ ColorbufferInfo getColorbuffersForRender() const;
+
protected:
rx::Renderer *mRenderer;