OSDN Git Service

Handle NULL 'value' to eglGetSyncAttribKHR()
authorAlistair Strachan <astrachan@google.com>
Wed, 27 Mar 2019 08:54:12 +0000 (17:54 +0900)
committerAlistair Strachan <astrachan@google.com>
Wed, 27 Mar 2019 20:58:50 +0000 (20:58 +0000)
commit179c932426b33e759fab2b659883341f043ee38c
tree73e19b787242b94cc3cc8a5df45ae4013b730e3a
parent4c9f4a97ffe38cecfb7b9b9694f777e99fd004c5
Handle NULL 'value' to eglGetSyncAttribKHR()

The EGL spec does not specifically call out how to handle the case
where 'value' passed to eglGetSyncAttribKHR is NULL, however many
implementations will set the context error to EGL_BAD_PARAMETER
and return without crashing. dEQP has a test which specifically
checks for this behavior. Align SwiftShader's implementation with
other EGL implementations.

Bug: b/74572503
Test: dEQP-EQL GetSyncInvalidValueTest
Change-Id: Ic893cd7073c12c463ded78042031df1bf85f6ce2
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/28028
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Alistair Strachan <astrachan@google.com>
src/OpenGL/libEGL/libEGL.cpp