Commit Graph

8 Commits

Author SHA1 Message Date
Emil Velikov 40bf7ba023 egl: _eglFilterArray's filter is always non-null
Drop the extra handling and assert() if things change in the future.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-02-16 15:27:20 +00:00
Frank Binns 21b2c6fd5e egl: don't allow eglGetConfigs to set num_configs param to a negative value
When a buffer is provided to eglGetConfigs it's supposed to set the value
of the num_config parameter to the total number of configs that have been
copied into this buffer. For some reason the EGL spec doesn't consider it
to be an error to pass this function a buffer while specifying its size to
be less than 0. Given this, one would expect this combination to result in
the num_config parameter being set to 0 but this wasn't the case. This was
due to the buffer size being copied straight into num_configs without being
clamped to 0.

This was causing the following dEQP EGL test to fail:
dEQP-EGL.functional.query_config.get_configs.get_configs_bounds

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-08-13 17:36:06 +01:00
Chia-I Wu f2001df508 egl: add copyright notices
The list of copyright holders could be incomplete.  Please update
directly or notify me if your name is missing.
2011-07-02 18:21:31 +09:00
Chia-I Wu 5ae4b6693a egl: _eglFilterArray should not allocate.
Otherwise, when it is called from within a driver, the caller cannot
free the returned data (on Windows).
2010-12-06 15:40:37 +08:00
Chia-I Wu d7284b45e2 egl: Return the correct array size in _eglFlattenArray.
The function is used by _eglGetConfigs and _eglGetScreens.  The array
size should not be limited by the buffer size when the buffer is NULL.

This fixes fdo bug #29052.
2010-07-15 10:05:46 +08:00
Chia-I Wu f2aa361f3b egl: Rework driver loading.
Driver loading is now splitted into two stages.  In the first stage, an
_EGLModule is created for each driver: user driver, default drivers, and
all files in the search directories that start with "egl_".  Modules are
not loaded at this stage.

In the second stage, each module is loaded to initialize a display.  The
process stops at the first module that can initialize the display.

If eglGetProcAddress is called before eglInitialize, the same code path
will be taken to find the first module that supports
EGL_DEFAULT_DISPLAY.  Because we do not want to initialize the display,
drv->Probe is used instead in this case.
2010-07-06 16:16:39 +08:00
Chia-I Wu a8815b754d egl: Update MaxSize when a dynamic array is grown. 2010-06-30 18:52:00 +08:00
Chia-I Wu 106466783f egl: Add dynamic array.
Dynamic arrays will be used to store configs and screens of a display.
2010-06-30 18:32:48 +08:00