[Mesa-dev] [PATCH 3/3] glx: Enable GLX_EXT_texture_from_pixmap in software
nobled
nobled at dreamwidth.org
Thu May 5 21:35:02 PDT 2011
Now if a software DRI driver advertises it, we can use it
in direct-rendering contexts--without this, only the server
took advantage of it for indirect contexts.
This follows up on these commits:
8d789be03430b80e0ba2fef19d56dd0b8e699ea2
c14b4371ed58859d264b7b2581cfedc9cfd8401f
2b64886c8122227ffa2d86abb9b4a5d79d1e2451
---
Like I commented below, are there any other extensions that it makes
sense to port to software drivers? Would invalidate be generally
useful there?
src/glx/drisw_glx.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index d9f47db..aea853d 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -487,6 +487,20 @@ static const struct glx_screen_vtable
drisw_screen_vtable = {
drisw_create_context
};
+static void
+driswBindExtensions(struct drisw_screen *psc, const __DRIextension
**extensions)
+{
+ int i;
+
+ /* FIXME: Figure out what other extensions can be ported here from dri2. */
+ for (i = 0; extensions[i]; i++) {
+ if ((strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0)) {
+ psc->texBuffer = (__DRItexBufferExtension *) extensions[i];
+ __glXEnableDirectExtension(&psc->base, "GLX_EXT_texture_from_pixmap");
+ }
+ }
+}
+
static struct glx_screen *
driCreateScreen(int screen, struct glx_display *priv)
{
@@ -536,6 +550,9 @@ driCreateScreen(int screen, struct glx_display *priv)
goto handle_error;
}
+ extensions = psc->core->getExtensions(psc->driScreen);
+ driswBindExtensions(psc, extensions);
+
psc->base.configs =
driConvertConfigs(psc->core, psc->base.configs, driver_configs);
psc->base.visuals =
--
1.7.0.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-glx-Enable-GLX_EXT_texture_from_pixmap-in-software.patch
Type: text/x-patch
Size: 1774 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110506/bc46b523/attachment.bin>
More information about the mesa-dev
mailing list