diff options
author | Emil Velikov <[email protected]> | 2014-02-12 17:47:53 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-04-28 19:11:27 +0100 |
commit | 38f20f79da4212c86d0869951f533d66a5ef907e (patch) | |
tree | e78b6a45763a4c922b8457bd95dbcec807f52779 /src/mesa/drivers/dri/radeon | |
parent | 9b42fd1772b13b10f397d80d11aa8351e6313085 (diff) |
drivers/dri: cleanup dri extension instantiation
Uniformly use the typecasted extension name, constify extension instances
and use designated initialisers. Set the implemented version of the
extension, over the one defined in dri_infertace.h. Patch covers the
following extensions:
__DRItexBufferExtension
__DRIimageExtension
__DRIrobustnessExtension
__DRI2rendererQueryExtension
__DRIdri2LoaderExtension
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_screen.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index 90251db3e64..dd940382be0 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -170,15 +170,19 @@ radeonGetParam(__DRIscreen *sPriv, int param, void *value) #if defined(RADEON_R100) static const __DRItexBufferExtension radeonTexBufferExtension = { - { __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION }, - radeonSetTexBuffer, - radeonSetTexBuffer2, + .base = { __DRI_TEX_BUFFER, 3 }, + + .setTexBuffer = radeonSetTexBuffer, + .setTexBuffer2 = radeonSetTexBuffer2, + .releaseTexBuffer = NULL, }; #elif defined(RADEON_R200) static const __DRItexBufferExtension r200TexBufferExtension = { - { __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION }, - r200SetTexBuffer, - r200SetTexBuffer2, + .base = { __DRI_TEX_BUFFER, 3 }, + + .setTexBuffer = r200SetTexBuffer, + .setTexBuffer2 = r200SetTexBuffer2, + .releaseTexBuffer = NULL, }; #endif @@ -373,13 +377,14 @@ radeon_query_image(__DRIimage *image, int attrib, int *value) } } -static struct __DRIimageExtensionRec radeonImageExtension = { - { __DRI_IMAGE, 1 }, - radeon_create_image_from_name, - radeon_create_image_from_renderbuffer, - radeon_destroy_image, - radeon_create_image, - radeon_query_image +static const __DRIimageExtension radeonImageExtension = { + .base = { __DRI_IMAGE, 1 }, + + .createImageFromName = radeon_create_image_from_name, + .createImageFromRenderbuffer = radeon_create_image_from_renderbuffer, + .destroyImage = radeon_destroy_image, + .createImage = radeon_create_image, + .queryImage = radeon_query_image }; static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id) |