diff options
-rw-r--r-- | emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp b/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp index fe64f6f..16534c1 100644 --- a/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp +++ b/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp @@ -323,6 +323,9 @@ GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus(GLenum target){ GL_APICALL void GL_APIENTRY glClear(GLbitfield mask){ GET_CTX(); + GLbitfield allowed_bits = GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT; + GLbitfield has_disallowed_bits = (mask & ~allowed_bits); + SET_ERROR_IF(has_disallowed_bits, GL_INVALID_VALUE); ctx->drawValidate(); ctx->dispatcher().glClear(mask); |