diff options
author | Emil Velikov <[email protected]> | 2014-02-12 20:13:15 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-04-28 19:13:38 +0100 |
commit | 5f280d0c4416627810de73a6c68c422453d2b7d9 (patch) | |
tree | 219b4f3015f9d9034e4a513e96760dd617e7c84f | |
parent | 5457caa58c048e2df71c7ebc036d5ca010d576b6 (diff) |
egl_dri: rework dri extension handling
Use designated initialisers, and store the extensions pointers as const.
The loader extensions __DRIdri2LoaderExtension and __DRIswrastLoaderExtension
are setup by the platform backends so they should not be constified.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 7 | ||||
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.h | 16 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 81a354236f4..380bd7b095e 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -52,7 +52,7 @@ #include "egl_dri2.h" const __DRIuseInvalidateExtension use_invalidate = { - { __DRI_USE_INVALIDATE, 1 } + .base = { __DRI_USE_INVALIDATE, 1 } }; EGLint dri2_to_egl_attribute_map[] = { @@ -299,8 +299,9 @@ dri2_lookup_egl_image(__DRIscreen *screen, void *image, void *data) } const __DRIimageLookupExtension image_lookup_extension = { - { __DRI_IMAGE_LOOKUP, 1 }, - dri2_lookup_egl_image + .base = { __DRI_IMAGE_LOOKUP, 1 }, + + .lookupEGLImage = dri2_lookup_egl_image }; static const char dri_driver_path[] = DEFAULT_DRIVER_DIR; diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index e62e265b25e..44d6d74b948 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -150,14 +150,14 @@ struct dri2_egl_display int own_dri_screen; const __DRIconfig **driver_configs; void *driver; - __DRIcoreExtension *core; - __DRIdri2Extension *dri2; - __DRIswrastExtension *swrast; - __DRI2flushExtension *flush; - __DRItexBufferExtension *tex_buffer; - __DRIimageExtension *image; - __DRIrobustnessExtension *robustness; - __DRI2configQueryExtension *config; + const __DRIcoreExtension *core; + const __DRIdri2Extension *dri2; + const __DRIswrastExtension *swrast; + const __DRI2flushExtension *flush; + const __DRItexBufferExtension *tex_buffer; + const __DRIimageExtension *image; + const __DRIrobustnessExtension *robustness; + const __DRI2configQueryExtension *config; int fd; int own_device; |