Commit cab7e1d1 by Geoff Lang

Add stubs for RendererGL workarounds.

BUG=angleproject:884 Change-Id: I9e48803f6150b9d8cd70a36ab9197f78fd01a50f Reviewed-on: https://chromium-review.googlesource.com/288583Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 6941a556
......@@ -87,6 +87,7 @@ RendererGL::RendererGL(const FunctionsGL *functions, const egl::AttributeMap &at
{
ASSERT(mFunctions);
mStateManager = new StateManagerGL(mFunctions, getRendererCaps());
nativegl_gl::GenerateWorkarounds(mFunctions, &mWorkarounds);
#ifndef NDEBUG
if (mFunctions->debugMessageControl && mFunctions->debugMessageCallback)
......
......@@ -11,6 +11,7 @@
#include "libANGLE/Version.h"
#include "libANGLE/renderer/Renderer.h"
#include "libANGLE/renderer/gl/WorkaroundsGL.h"
namespace rx
{
......@@ -88,6 +89,8 @@ class RendererGL : public Renderer
const FunctionsGL *mFunctions;
StateManagerGL *mStateManager;
WorkaroundsGL mWorkarounds;
// For performance debugging
bool mSkipDrawCalls;
};
......
//
// Copyright (c) 2015 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// WorkaroundsGL.h: Workarounds for GL driver bugs and other issues.
#ifndef LIBANGLE_RENDERER_GL_WORKAROUNDSGL_H_
#define LIBANGLE_RENDERER_GL_WORKAROUNDSGL_H_
namespace rx
{
struct WorkaroundsGL
{
WorkaroundsGL()
{
}
// TODO(geofflang): workarounds!
};
}
#endif // LIBANGLE_RENDERER_GL_WORKAROUNDSGL_H_
......@@ -14,6 +14,7 @@
#include "libANGLE/Caps.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/renderer/gl/FunctionsGL.h"
#include "libANGLE/renderer/gl/WorkaroundsGL.h"
#include "libANGLE/renderer/gl/formatutilsgl.h"
#include <algorithm>
......@@ -511,6 +512,11 @@ void GenerateCaps(const FunctionsGL *functions, gl::Caps *caps, gl::TextureCapsM
functions->isAtLeastGLES(gl::Version(3, 0)) || functions->hasGLESExtension("GL_OES_fbo_render_mipmap");
}
void GenerateWorkarounds(const FunctionsGL *functions, WorkaroundsGL *workarounds)
{
*workarounds = WorkaroundsGL();
}
}
}
......@@ -26,12 +26,15 @@ struct Version;
namespace rx
{
class FunctionsGL;
struct WorkaroundsGL;
namespace nativegl_gl
{
void GenerateCaps(const FunctionsGL *functions, gl::Caps *caps, gl::TextureCapsMap *textureCapsMap,
gl::Extensions *extensions, gl::Version *maxSupportedESVersion);
void GenerateWorkarounds(const FunctionsGL *functions, WorkaroundsGL *workarounds);
}
}
......
......@@ -418,6 +418,7 @@
'libANGLE/renderer/gl/TransformFeedbackGL.h',
'libANGLE/renderer/gl/VertexArrayGL.cpp',
'libANGLE/renderer/gl/VertexArrayGL.h',
'libANGLE/renderer/gl/WorkaroundsGL.h',
'libANGLE/renderer/gl/formatutilsgl.cpp',
'libANGLE/renderer/gl/formatutilsgl.h',
'libANGLE/renderer/gl/functionsgl_enums.h',
......
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