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 ...@@ -87,6 +87,7 @@ RendererGL::RendererGL(const FunctionsGL *functions, const egl::AttributeMap &at
{ {
ASSERT(mFunctions); ASSERT(mFunctions);
mStateManager = new StateManagerGL(mFunctions, getRendererCaps()); mStateManager = new StateManagerGL(mFunctions, getRendererCaps());
nativegl_gl::GenerateWorkarounds(mFunctions, &mWorkarounds);
#ifndef NDEBUG #ifndef NDEBUG
if (mFunctions->debugMessageControl && mFunctions->debugMessageCallback) if (mFunctions->debugMessageControl && mFunctions->debugMessageCallback)
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "libANGLE/Version.h" #include "libANGLE/Version.h"
#include "libANGLE/renderer/Renderer.h" #include "libANGLE/renderer/Renderer.h"
#include "libANGLE/renderer/gl/WorkaroundsGL.h"
namespace rx namespace rx
{ {
...@@ -88,6 +89,8 @@ class RendererGL : public Renderer ...@@ -88,6 +89,8 @@ class RendererGL : public Renderer
const FunctionsGL *mFunctions; const FunctionsGL *mFunctions;
StateManagerGL *mStateManager; StateManagerGL *mStateManager;
WorkaroundsGL mWorkarounds;
// For performance debugging // For performance debugging
bool mSkipDrawCalls; 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 @@ ...@@ -14,6 +14,7 @@
#include "libANGLE/Caps.h" #include "libANGLE/Caps.h"
#include "libANGLE/formatutils.h" #include "libANGLE/formatutils.h"
#include "libANGLE/renderer/gl/FunctionsGL.h" #include "libANGLE/renderer/gl/FunctionsGL.h"
#include "libANGLE/renderer/gl/WorkaroundsGL.h"
#include "libANGLE/renderer/gl/formatutilsgl.h" #include "libANGLE/renderer/gl/formatutilsgl.h"
#include <algorithm> #include <algorithm>
...@@ -511,6 +512,11 @@ void GenerateCaps(const FunctionsGL *functions, gl::Caps *caps, gl::TextureCapsM ...@@ -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"); 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; ...@@ -26,12 +26,15 @@ struct Version;
namespace rx namespace rx
{ {
class FunctionsGL; class FunctionsGL;
struct WorkaroundsGL;
namespace nativegl_gl namespace nativegl_gl
{ {
void GenerateCaps(const FunctionsGL *functions, gl::Caps *caps, gl::TextureCapsMap *textureCapsMap, void GenerateCaps(const FunctionsGL *functions, gl::Caps *caps, gl::TextureCapsMap *textureCapsMap,
gl::Extensions *extensions, gl::Version *maxSupportedESVersion); gl::Extensions *extensions, gl::Version *maxSupportedESVersion);
void GenerateWorkarounds(const FunctionsGL *functions, WorkaroundsGL *workarounds);
} }
} }
......
...@@ -418,6 +418,7 @@ ...@@ -418,6 +418,7 @@
'libANGLE/renderer/gl/TransformFeedbackGL.h', 'libANGLE/renderer/gl/TransformFeedbackGL.h',
'libANGLE/renderer/gl/VertexArrayGL.cpp', 'libANGLE/renderer/gl/VertexArrayGL.cpp',
'libANGLE/renderer/gl/VertexArrayGL.h', 'libANGLE/renderer/gl/VertexArrayGL.h',
'libANGLE/renderer/gl/WorkaroundsGL.h',
'libANGLE/renderer/gl/formatutilsgl.cpp', 'libANGLE/renderer/gl/formatutilsgl.cpp',
'libANGLE/renderer/gl/formatutilsgl.h', 'libANGLE/renderer/gl/formatutilsgl.h',
'libANGLE/renderer/gl/functionsgl_enums.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