Commit acd20b1f by Geoff Lang Committed by Commit Bot

Refactor BlitGL to potentially hold multiple blit shader types.

BUG=angleproject:1932 Change-Id: I4d19892852540797c765916131498c96511b4f55 Reviewed-on: https://chromium-review.googlesource.com/600509Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent d2d0b30e
......@@ -14,6 +14,8 @@
#include "libANGLE/angletypes.h"
#include "libANGLE/Error.h"
#include <map>
namespace gl
{
class Framebuffer;
......@@ -95,13 +97,24 @@ class BlitGL : angle::NonCopyable
const WorkaroundsGL &mWorkarounds;
StateManagerGL *mStateManager;
GLuint mBlitProgram;
GLint mTexCoordAttributeLocation;
GLint mSourceTextureLocation;
GLint mScaleLocation;
GLint mOffsetLocation;
GLint mMultiplyAlphaLocation;
GLint mUnMultiplyAlphaLocation;
struct BlitProgram
{
GLuint program = 0;
GLint sourceTextureLocation = -1;
GLint scaleLocation = -1;
GLint offsetLocation = -1;
GLint multiplyAlphaLocation = -1;
GLint unMultiplyAlphaLocation = -1;
};
enum class BlitProgramType
{
FLOAT_TO_FLOAT,
};
gl::Error getBlitProgram(BlitProgramType type, BlitProgram **program);
std::map<BlitProgramType, BlitProgram> mBlitPrograms;
GLuint mScratchTextures[2];
GLuint mScratchFBO;
......
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