OSDN Git Service

Fix validating glFramebuffer* attachment.
authorNicolas Capens <capn@google.com>
Thu, 25 Oct 2018 01:01:17 +0000 (21:01 -0400)
committerNicolas Capens <nicolascapens@google.com>
Thu, 25 Oct 2018 14:42:33 +0000 (14:42 +0000)
commit4e3441943e60c2fbe24cbe0342baf9112c99ee26
treee0342e4ba80ab050994b3b10525103ce90c595a1
parentca09082724788b8921fb470b82d34a1989e82d36
Fix validating glFramebuffer* attachment.

The OpenGL ES 3.0 spec states:
An INVALID_OPERATION error is generated if attachment is COLOR_-
ATTACHMENTm where m is greater than or equal to the value of MAX_COLOR_-
ATTACHMENTS.
An INVALID_ENUM error is generated if attachment is not one of the attachments
in table 4.6, and attachment is not COLOR_ATTACHMENTm where
m is greater than or equal to the value of MAX_COLOR_ATTACHMENTS.

Bug b/116776063

Change-Id: Iaabbcd3689d08ebdde2046440cf24554e9a160c2
Reviewed-on: https://swiftshader-review.googlesource.com/c/21908
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
src/OpenGL/libGLESv2/libGLESv2.cpp
src/OpenGL/libGLESv2/libGLESv3.cpp