GLES1: Renderer (minimal)
This is the renderer code for GLES1 that delivers basic vertex
attributes, matrices, and allows texturing for unit 0 only (more units
mean implementing the multitexturing pipeline).
+ Sample
+ Update test expectations for GLES1 conformance tests
BUG=angleproject:2554
BUG=angleproject:2306
Change-Id: I398edc764f982fbfc4c5e0f9d6bfef1e91aec47c
Reviewed-on: https://chromium-review.googlesource.com/1057356
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index ae4e182..54bc41d 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -24,6 +24,7 @@
#include "libANGLE/Fence.h"
#include "libANGLE/Framebuffer.h"
#include "libANGLE/FramebufferAttachment.h"
+#include "libANGLE/GLES1Renderer.h"
#include "libANGLE/Path.h"
#include "libANGLE/Program.h"
#include "libANGLE/ProgramPipeline.h"
@@ -388,6 +389,12 @@
bindBufferRange(BufferBinding::Uniform, i, 0, 0, -1);
}
+ // Initialize GLES1 renderer if appropriate.
+ if (getClientVersion() < Version(2, 0))
+ {
+ mGLES1Renderer.reset(new GLES1Renderer());
+ }
+
// Initialize dirty bit masks
mTexImageDirtyBits.set(State::DIRTY_BIT_UNPACK_STATE);
mTexImageDirtyBits.set(State::DIRTY_BIT_UNPACK_BUFFER_BINDING);
@@ -431,6 +438,11 @@
egl::Error Context::onDestroy(const egl::Display *display)
{
+ if (mGLES1Renderer)
+ {
+ mGLES1Renderer->onDestroy(this, &mGLState);
+ }
+
// Delete the Surface first to trigger a finish() in Vulkan.
if (mSurfacelessFramebuffer)
{
@@ -3269,6 +3281,11 @@
Error Context::prepareForDraw()
{
+ if (mGLES1Renderer)
+ {
+ ANGLE_TRY(mGLES1Renderer->prepareForDraw(this, &mGLState));
+ }
+
ANGLE_TRY(syncDirtyObjects());
if (isRobustResourceInitEnabled())