summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2014-02-12 17:47:53 +0000
committerEmil Velikov <[email protected]>2014-04-28 19:11:27 +0100
commit38f20f79da4212c86d0869951f533d66a5ef907e (patch)
treee78b6a45763a4c922b8457bd95dbcec807f52779 /src/mesa/drivers/dri/nouveau
parent9b42fd1772b13b10f397d80d11aa8351e6313085 (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/nouveau')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_driver.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_screen.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
index 809b5ffb336..1a8afa2af12 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
@@ -65,7 +65,7 @@ nouveau_flush(struct gl_context *ctx)
if (_mesa_is_winsys_fbo(ctx->DrawBuffer) &&
ctx->DrawBuffer->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT) {
__DRIscreen *screen = nctx->screen->dri_screen;
- __DRIdri2LoaderExtension *dri2 = screen->dri2.loader;
+ const __DRIdri2LoaderExtension *dri2 = screen->dri2.loader;
__DRIdrawable *drawable = nctx->dri_context->driDrawablePriv;
if (drawable && drawable->loaderPrivate)
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
index 99290561e37..aec2f729d69 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
@@ -234,9 +234,11 @@ static const struct __DRI2flushExtensionRec nouveau_flush_extension = {
};
static const struct __DRItexBufferExtensionRec nouveau_texbuffer_extension = {
- { __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
- NULL,
- nouveau_set_texbuffer,
+ .base = { __DRI_TEX_BUFFER, 3 },
+
+ .setTexBuffer = NULL,
+ .setTexBuffer2 = nouveau_set_texbuffer,
+ .releaseTexBuffer = NULL,
};
static const __DRIextension *nouveau_screen_extensions[] = {