[Mesa-dev] [PATCH 06/43] drivers/dri: set the implemented version of __DRItexBufferExtension
Emil Velikov
emil.l.velikov at gmail.com
Tue Feb 18 17:19:45 PST 2014
... over the version number provided by the headers.
Explicitly set extension members to improve clarity.
v2: all drivers 'implement' version 3 of the extension.
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/mesa/drivers/dri/i915/intel_screen.c | 2 +-
src/mesa/drivers/dri/i965/intel_screen.c | 2 +-
src/mesa/drivers/dri/nouveau/nouveau_screen.c | 8 +++++---
src/mesa/drivers/dri/radeon/radeon_screen.c | 16 ++++++++++------
src/mesa/drivers/dri/swrast/swrast.c | 8 +++++---
5 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c
index 296df16..33853e0 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -146,7 +146,7 @@ aub_dump_bmp(struct gl_context *ctx)
}
static const __DRItexBufferExtension intelTexBufferExtension = {
- .base = { __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
+ .base = { __DRI_TEX_BUFFER, 3 },
.setTexBuffer = intelSetTexBuffer,
.setTexBuffer2 = intelSetTexBuffer2,
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index acdb5f3..b013f5d 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -157,7 +157,7 @@ aub_dump_bmp(struct gl_context *ctx)
}
static const __DRItexBufferExtension intelTexBufferExtension = {
- .base = { __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
+ .base = { __DRI_TEX_BUFFER, 3 },
.setTexBuffer = intelSetTexBuffer,
.setTexBuffer2 = intelSetTexBuffer2,
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
index a381064..a925029f 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
@@ -233,9 +233,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[] = {
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 57e866e..70df6de 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
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 071192c..8881381 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -110,9 +110,11 @@ static void swrastSetTexBuffer(__DRIcontext *pDRICtx, GLint target,
}
static const __DRItexBufferExtension swrastTexBufferExtension = {
- { __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
- swrastSetTexBuffer,
- swrastSetTexBuffer2,
+ .base = { __DRI_TEX_BUFFER, 3 },
+
+ .setTexBuffer = swrastSetTexBuffer,
+ .setTexBuffer2 = swrastSetTexBuffer2,
+ .releaseTexBuffer = NULL,
};
static const __DRIextension *dri_screen_extensions[] = {
--
1.9.0
More information about the mesa-dev
mailing list