Commit 00af463e by Lingfeng Yang Committed by Commit Bot

GLES1: Add MatrixType packed enum to entry points

(It's not called MatrixMode because that collides with the MatrixMode entry point name) BUG=angleproject:2306 Change-Id: I9a192701f6248f1e7d4f202c7d1ddfcdbe1b0089 Reviewed-on: https://chromium-review.googlesource.com/990585 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent bab086a7
...@@ -163,6 +163,9 @@ ...@@ -163,6 +163,9 @@
"glMapBufferRangeEXT": { "glMapBufferRangeEXT": {
"target": "BufferBinding" "target": "BufferBinding"
}, },
"glMatrixMode": {
"mode": "MatrixType"
},
"glTexImage2D": { "glTexImage2D": {
"target": "TextureTarget" "target": "TextureTarget"
}, },
......
...@@ -262,7 +262,7 @@ void Context::materialxv(GLenum face, GLenum pname, const GLfixed *param) ...@@ -262,7 +262,7 @@ void Context::materialxv(GLenum face, GLenum pname, const GLfixed *param)
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
void Context::matrixMode(GLenum mode) void Context::matrixMode(MatrixType mode)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
void materialfv(GLenum face, GLenum pname, const GLfloat *params); \ void materialfv(GLenum face, GLenum pname, const GLfloat *params); \
void materialx(GLenum face, GLenum pname, GLfixed param); \ void materialx(GLenum face, GLenum pname, GLfixed param); \
void materialxv(GLenum face, GLenum pname, const GLfixed *param); \ void materialxv(GLenum face, GLenum pname, const GLfixed *param); \
void matrixMode(GLenum mode); \ void matrixMode(MatrixType modePacked); \
void multMatrixf(const GLfloat *m); \ void multMatrixf(const GLfloat *m); \
void multMatrixx(const GLfixed *m); \ void multMatrixx(const GLfixed *m); \
void multiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); \ void multiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); \
......
...@@ -369,7 +369,7 @@ bool ValidateMaterialxv(Context *context, GLenum face, GLenum pname, const GLfix ...@@ -369,7 +369,7 @@ bool ValidateMaterialxv(Context *context, GLenum face, GLenum pname, const GLfix
return true; return true;
} }
bool ValidateMatrixMode(Context *context, GLenum mode) bool ValidateMatrixMode(Context *context, MatrixType mode)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
return true; return true;
......
...@@ -85,7 +85,7 @@ bool ValidateMaterialf(Context *context, GLenum face, GLenum pname, GLfloat para ...@@ -85,7 +85,7 @@ bool ValidateMaterialf(Context *context, GLenum face, GLenum pname, GLfloat para
bool ValidateMaterialfv(Context *context, GLenum face, GLenum pname, const GLfloat *params); bool ValidateMaterialfv(Context *context, GLenum face, GLenum pname, const GLfloat *params);
bool ValidateMaterialx(Context *context, GLenum face, GLenum pname, GLfixed param); bool ValidateMaterialx(Context *context, GLenum face, GLenum pname, GLfixed param);
bool ValidateMaterialxv(Context *context, GLenum face, GLenum pname, const GLfixed *param); bool ValidateMaterialxv(Context *context, GLenum face, GLenum pname, const GLfixed *param);
bool ValidateMatrixMode(Context *context, GLenum mode); bool ValidateMatrixMode(Context *context, MatrixType mode);
bool ValidateMultMatrixf(Context *context, const GLfloat *m); bool ValidateMultMatrixf(Context *context, const GLfloat *m);
bool ValidateMultMatrixx(Context *context, const GLfixed *m); bool ValidateMultMatrixx(Context *context, const GLfixed *m);
bool ValidateMultiTexCoord4f(Context *context, bool ValidateMultiTexCoord4f(Context *context,
......
...@@ -835,11 +835,12 @@ void GL_APIENTRY MatrixMode(GLenum mode) ...@@ -835,11 +835,12 @@ void GL_APIENTRY MatrixMode(GLenum mode)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
context->gatherParams<EntryPoint::MatrixMode>(mode); MatrixType modePacked = FromGLenum<MatrixType>(mode);
context->gatherParams<EntryPoint::MatrixMode>(modePacked);
if (context->skipValidation() || ValidateMatrixMode(context, mode)) if (context->skipValidation() || ValidateMatrixMode(context, modePacked))
{ {
context->matrixMode(mode); context->matrixMode(modePacked);
} }
} }
} }
......
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