aboutsummaryrefslogtreecommitdiff
path: root/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
diff options
context:
space:
mode:
authorJamie Madill <jmadill@chromium.org>2014-09-03 11:56:29 -0400
committerJamie Madill <jmadill@chromium.org>2014-09-03 18:56:06 +0000
commitce20c7f143fcd724c2da0294c552bbe7594dd84d (patch)
tree2c86074e9b3aa4015c08c98e62c28993e022631a /src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
parent04668675302d0ca0249dd6d84e34eb449758909a (diff)
downloadangle-ce20c7f143fcd724c2da0294c552bbe7594dd84d.tar.gz
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>
Diffstat (limited to 'src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp')
-rw-r--r--src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp b/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
index 33c39de3..46d5e7d0 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
@@ -793,15 +793,15 @@ bool Renderer11::applyRenderTarget(gl::Framebuffer *framebuffer)
ID3D11RenderTargetView* framebufferRTVs[gl::IMPLEMENTATION_MAX_DRAW_BUFFERS] = {NULL};
bool missingColorRenderTarget = true;
- for (unsigned int colorAttachment = 0; colorAttachment < gl::IMPLEMENTATION_MAX_DRAW_BUFFERS; colorAttachment++)
+ const gl::ColorbufferInfo &colorbuffers = framebuffer->getColorbuffersForRender();
+
+ for (size_t colorAttachment = 0; colorAttachment < colorbuffers.size(); ++colorAttachment)
{
- const GLenum drawBufferState = framebuffer->getDrawBufferState(colorAttachment);
- gl::FramebufferAttachment *colorbuffer = framebuffer->getColorbuffer(colorAttachment);
+ gl::FramebufferAttachment *colorbuffer = colorbuffers[colorAttachment];
- if (colorbuffer && drawBufferState != GL_NONE)
+ if (colorbuffer)
{
// the draw buffer must be either "none", "back" for the default buffer or the same index as this color (in order)
- ASSERT(drawBufferState == GL_BACK || drawBufferState == (GL_COLOR_ATTACHMENT0_EXT + colorAttachment));
// check for zero-sized default framebuffer, which is a special case.
// in this case we do not wish to modify any state and just silently return false.