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 76542c1..cebd5a9 100644 --- a/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp +++ b/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp @@ -324,6 +324,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); |