Commit 2291c935 by Geoff Lang Committed by Commit Bot

"Implement" FramebufferNULL::getImplementationColorRead*

BUG=angleproject:1468 Change-Id: I2727602e66a4f4f2ca166948eebd9c975e315fe7 Reviewed-on: https://chromium-review.googlesource.com/412861 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 1b896c62
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#include "libANGLE/renderer/null/FramebufferNULL.h" #include "libANGLE/renderer/null/FramebufferNULL.h"
#include "libANGLE/formatutils.h"
#include "common/debug.h" #include "common/debug.h"
namespace rx namespace rx
...@@ -87,14 +89,28 @@ gl::Error FramebufferNULL::clearBufferfi(ContextImpl *context, ...@@ -87,14 +89,28 @@ gl::Error FramebufferNULL::clearBufferfi(ContextImpl *context,
GLenum FramebufferNULL::getImplementationColorReadFormat() const GLenum FramebufferNULL::getImplementationColorReadFormat() const
{ {
UNIMPLEMENTED(); const gl::FramebufferAttachment *readAttachment = mState.getReadAttachment();
return GLenum(); if (readAttachment == nullptr)
{
return GL_NONE;
}
const gl::Format &format = readAttachment->getFormat();
ASSERT(format.info != nullptr);
return format.info->getReadPixelsFormat();
} }
GLenum FramebufferNULL::getImplementationColorReadType() const GLenum FramebufferNULL::getImplementationColorReadType() const
{ {
UNIMPLEMENTED(); const gl::FramebufferAttachment *readAttachment = mState.getReadAttachment();
return GLenum(); if (readAttachment == nullptr)
{
return GL_NONE;
}
const gl::Format &format = readAttachment->getFormat();
ASSERT(format.info != nullptr);
return format.info->getReadPixelsType();
} }
gl::Error FramebufferNULL::readPixels(ContextImpl *context, gl::Error FramebufferNULL::readPixels(ContextImpl *context,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment