projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
30f0c0e
)
Revert "glx: Implement GLX_EXT_no_config_context"
author
Adam Jackson
<ajax@redhat.com>
Thu, 26 Sep 2019 15:07:13 +0000
(11:07 -0400)
committer
Adam Jackson
<ajax@redhat.com>
Thu, 26 Sep 2019 15:07:13 +0000
(11:07 -0400)
This reverts commit
0d635ccc912d7122f35f81eec27d8b2c0a2a7a28
.
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1207
12 files changed:
src/glx/applegl_glx.c
patch
|
blob
|
history
src/glx/create_context.c
patch
|
blob
|
history
src/glx/dri2_glx.c
patch
|
blob
|
history
src/glx/dri3_glx.c
patch
|
blob
|
history
src/glx/dri_common.c
patch
|
blob
|
history
src/glx/drisw_glx.c
patch
|
blob
|
history
src/glx/driwindows_glx.c
patch
|
blob
|
history
src/glx/g_glxglvnddispatchfuncs.c
patch
|
blob
|
history
src/glx/glxcmds.c
patch
|
blob
|
history
src/glx/glxextensions.c
patch
|
blob
|
history
src/glx/glxextensions.h
patch
|
blob
|
history
src/glx/tests/create_context_unittest.cpp
patch
|
blob
|
history
diff --git
a/src/glx/applegl_glx.c
b/src/glx/applegl_glx.c
index 85f70058c6467a55d77eed5c9af5d5284eda98fe..c086e5146a84f1f3d2ad77d1ba772c89e19fb11a 100644
(file)
--- a/
src/glx/applegl_glx.c
+++ b/
src/glx/applegl_glx.c
@@
-134,9
+134,6
@@
applegl_create_context(struct glx_screen *psc,
/* TODO: Integrate this with apple_glx_create_context and make
* struct apple_glx_context inherit from struct glx_context. */
/* TODO: Integrate this with apple_glx_create_context and make
* struct apple_glx_context inherit from struct glx_context. */
- if (!config)
- return NULL;
-
gc = calloc(1, sizeof(*gc));
if (gc == NULL)
return NULL;
gc = calloc(1, sizeof(*gc));
if (gc == NULL)
return NULL;
diff --git
a/src/glx/create_context.c
b/src/glx/create_context.c
index fa15d551af07e3a5263ac5a522eafa3a6daaa2c5..38e949ab4cd94e09d4574710fdadac05a4328ce0 100644
(file)
--- a/
src/glx/create_context.c
+++ b/
src/glx/create_context.c
@@
-33,14
+33,6
@@
#error This code requires sizeof(uint32_t) == sizeof(int).
#endif
#error This code requires sizeof(uint32_t) == sizeof(int).
#endif
-/* debian stretch still has ancient headers and we're apparently still
- * using that for gitlab ci. please delete me when that's fixed.
- */
-#ifndef X_GLXCreateContextAttribsARB
-#warning Please update your GLX protocol headers
-#define X_GLXCreateContextAttribsARB 34
-#endif
-
_X_HIDDEN GLXContext
glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config,
GLXContext share_context, Bool direct,
_X_HIDDEN GLXContext
glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config,
GLXContext share_context, Bool direct,
@@
-55,41
+47,28
@@
glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config,
xcb_generic_error_t *err;
xcb_void_cookie_t cookie;
unsigned dummy_err = 0;
xcb_generic_error_t *err;
xcb_void_cookie_t cookie;
unsigned dummy_err = 0;
- int screen = -1;
- if (dpy == NULL)
- return NULL;
-
- /* Count the number of attributes specified by the application. All
- * attributes appear in pairs, except the terminating None.
- */
- if (attrib_list != NULL) {
- for (/* empty */; attrib_list[num_attribs * 2] != 0; num_attribs++)
- /* empty */ ;
- }
- if (cfg) {
- screen = cfg->screen;
- } else {
- for (unsigned int i = 0; i < num_attribs; i++) {
- if (attrib_list[i * 2] == GLX_SCREEN)
- screen = attrib_list[i * 2 + 1];
- }
- if (screen == -1) {
- __glXSendError(dpy, BadValue, 0, X_GLXCreateContextAttribsARB, True);
- return NULL;
- }
- }
+ if (dpy == NULL || cfg == NULL)
+ return NULL;
/* This means that either the caller passed the wrong display pointer or
* one of the internal GLX data structures (probably the fbconfig) has an
* error. There is nothing sensible to do, so return an error.
*/
/* This means that either the caller passed the wrong display pointer or
* one of the internal GLX data structures (probably the fbconfig) has an
* error. There is nothing sensible to do, so return an error.
*/
- psc = GetGLXScreenConfigs(dpy, screen);
+ psc = GetGLXScreenConfigs(dpy,
cfg->
screen);
if (psc == NULL)
return NULL;
if (psc == NULL)
return NULL;
- assert(screen == psc->scr);
+ assert(cfg->screen == psc->scr);
+
+ /* Count the number of attributes specified by the application. All
+ * attributes appear in pairs, except the terminating None.
+ */
+ if (attrib_list != NULL) {
+ for (/* empty */; attrib_list[num_attribs * 2] != 0; num_attribs++)
+ /* empty */ ;
+ }
if (direct && psc->vtable->create_context_attribs) {
/* GLX drops the error returned by the driver. The expectation is that
if (direct && psc->vtable->create_context_attribs) {
/* GLX drops the error returned by the driver. The expectation is that
@@
-125,8
+104,8
@@
glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config,
cookie =
xcb_glx_create_context_attribs_arb_checked(c,
gc->xid,
cookie =
xcb_glx_create_context_attribs_arb_checked(c,
gc->xid,
- cfg
? cfg->fbconfigID : 0
,
- screen,
+ cfg
->fbconfigID
,
+
cfg->
screen,
gc->share_xid,
gc->isDirect,
num_attribs,
gc->share_xid,
gc->isDirect,
num_attribs,
diff --git
a/src/glx/dri2_glx.c
b/src/glx/dri2_glx.c
index f4a4a6ce408f08ef76aff1e488a1a68ffc5e218b..bed25bb38d609b40334234d270c2bf4188a42c15 100644
(file)
--- a/
src/glx/dri2_glx.c
+++ b/
src/glx/dri2_glx.c
@@
-1135,7
+1135,6
@@
dri2BindExtensions(struct dri2_screen *psc, struct glx_display * priv,
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
- __glXEnableDirectExtension(&psc->base, "GLX_EXT_no_config_context");
if ((mask & ((1 << __DRI_API_GLES) |
(1 << __DRI_API_GLES2) |
if ((mask & ((1 << __DRI_API_GLES) |
(1 << __DRI_API_GLES2) |
diff --git
a/src/glx/dri3_glx.c
b/src/glx/dri3_glx.c
index 805172bdd978f9cbfa6cd4349df81adfdf52dd11..a5cf0e3bf32c72b6649f0e72c6e532d7a627c124 100644
(file)
--- a/
src/glx/dri3_glx.c
+++ b/
src/glx/dri3_glx.c
@@
-750,7
+750,6
@@
dri3_bind_extensions(struct dri3_screen *psc, struct glx_display * priv,
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
- __glXEnableDirectExtension(&psc->base, "GLX_EXT_no_config_context");
if ((mask & ((1 << __DRI_API_GLES) |
(1 << __DRI_API_GLES2) |
if ((mask & ((1 << __DRI_API_GLES) |
(1 << __DRI_API_GLES2) |
diff --git
a/src/glx/dri_common.c
b/src/glx/dri_common.c
index d70bff43eb46e8c511ab050097e63c9e41eb15aa..a5fae27fce9dbcfc385b5cf096e48f8fea97eda8 100644
(file)
--- a/
src/glx/dri_common.c
+++ b/
src/glx/dri_common.c
@@
-500,10
+500,6
@@
dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
return false;
}
break;
return false;
}
break;
- case GLX_SCREEN:
- /* Implies GLX_EXT_no_config_context */
- *render_type = GLX_DONT_CARE;
- break;
default:
/* If an unknown attribute is received, fail.
*/
default:
/* If an unknown attribute is received, fail.
*/
diff --git
a/src/glx/drisw_glx.c
b/src/glx/drisw_glx.c
index f5544f8b4f0639318a671f7fb4f36f10b6156432..f38dbbca2dffee18ce327724774f9b62ba1ce65c 100644
(file)
--- a/
src/glx/drisw_glx.c
+++ b/
src/glx/drisw_glx.c
@@
-789,7
+789,6
@@
driswBindExtensions(struct drisw_screen *psc, const __DRIextension **extensions)
if (psc->swrast->base.version >= 3) {
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
if (psc->swrast->base.version >= 3) {
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
- __glXEnableDirectExtension(&psc->base, "GLX_EXT_no_config_context");
/* DRISW version >= 2 implies support for OpenGL ES.
*/
/* DRISW version >= 2 implies support for OpenGL ES.
*/
diff --git
a/src/glx/driwindows_glx.c
b/src/glx/driwindows_glx.c
index b2dc810f8cb10cf3aaae036739d9e0c6a702d9d4..85525431bf9565ae89f9b5aa12c578e951b078f7 100644
(file)
--- a/
src/glx/driwindows_glx.c
+++ b/
src/glx/driwindows_glx.c
@@
-240,7
+240,7
@@
driwindows_create_context_attribs(struct glx_screen *base,
identical values, so far
*/
identical values, so far
*/
- if (!psc->base.driScreen
|| !config_base
)
+ if (!psc->base.driScreen)
return NULL;
/* Check the renderType value */
return NULL;
/* Check the renderType value */
diff --git
a/src/glx/g_glxglvnddispatchfuncs.c
b/src/glx/g_glxglvnddispatchfuncs.c
index 78c097febb65141729fe12097c3e76e854967c39..0f02ed2d321cab0bebb48c963faf07d804bad653 100644
(file)
--- a/
src/glx/g_glxglvnddispatchfuncs.c
+++ b/
src/glx/g_glxglvnddispatchfuncs.c
@@
-160,19
+160,7
@@
static GLXContext dispatch_CreateContextAttribsARB(Display *dpy,
__GLXvendorInfo *dd;
GLXContext ret;
__GLXvendorInfo *dd;
GLXContext ret;
- if (config) {
- dd = GetDispatchFromFBConfig(dpy, config);
- } else if (attrib_list) {
- int i, screen;
-
- for (i = 0; attrib_list[i * 2] != None; i++) {
- if (attrib_list[i * 2] == GLX_SCREEN) {
- screen = attrib_list[i * 2 + 1];
- dd = GetDispatchFromDrawable(dpy, RootWindow(dpy, screen));
- break;
- }
- }
- }
+ dd = GetDispatchFromFBConfig(dpy, config);
if (dd == NULL)
return None;
if (dd == NULL)
return None;
diff --git
a/src/glx/glxcmds.c
b/src/glx/glxcmds.c
index 85041ad5c510fd2ba9e4b5e2298507720dcf25c6..8927976f587bfafd30db115290ce3d2ef0be3a7b 100644
(file)
--- a/
src/glx/glxcmds.c
+++ b/
src/glx/glxcmds.c
@@
-238,7
+238,7
@@
validate_renderType_against_config(const struct glx_config *config,
{
/* GLX_EXT_no_config_context supports any render type */
if (!config)
{
/* GLX_EXT_no_config_context supports any render type */
if (!config)
- return
renderType == GLX_DONT_CARE
;
+ return
True
;
switch (renderType) {
case GLX_RGBA_TYPE:
switch (renderType) {
case GLX_RGBA_TYPE:
@@
-269,9
+269,6
@@
glx_context_init(struct glx_context *gc,
gc->isDirect = GL_TRUE;
gc->currentContextTag = -1;
gc->isDirect = GL_TRUE;
gc->currentContextTag = -1;
- if (!config)
- gc->renderType = GLX_DONT_CARE;
-
return True;
}
return True;
}
diff --git
a/src/glx/glxextensions.c
b/src/glx/glxextensions.c
index ada179391777cd02e60eeddca440c310c79f6ee3..f6a7a31a2195dfdf6a7c920c5c06435061c73598 100644
(file)
--- a/
src/glx/glxextensions.c
+++ b/
src/glx/glxextensions.c
@@
-147,7
+147,6
@@
static const struct extension_info known_glx_extensions[] = {
{ GLX(EXT_fbconfig_packed_float), VER(0,0), Y, Y, N, N },
{ GLX(EXT_framebuffer_sRGB), VER(0,0), Y, Y, N, N },
{ GLX(EXT_import_context), VER(0,0), Y, Y, N, N },
{ GLX(EXT_fbconfig_packed_float), VER(0,0), Y, Y, N, N },
{ GLX(EXT_framebuffer_sRGB), VER(0,0), Y, Y, N, N },
{ GLX(EXT_import_context), VER(0,0), Y, Y, N, N },
- { GLX(EXT_no_config_context), VER(0,0), Y, N, N, N },
{ GLX(EXT_texture_from_pixmap), VER(0,0), Y, N, N, N },
{ GLX(EXT_visual_info), VER(0,0), Y, Y, N, N },
{ GLX(EXT_visual_rating), VER(0,0), Y, Y, N, N },
{ GLX(EXT_texture_from_pixmap), VER(0,0), Y, N, N, N },
{ GLX(EXT_visual_info), VER(0,0), Y, Y, N, N },
{ GLX(EXT_visual_rating), VER(0,0), Y, Y, N, N },
diff --git
a/src/glx/glxextensions.h
b/src/glx/glxextensions.h
index 4406b7c56549f9b34852d94d0c7f7a219e164500..bbdb00dd63173adebae6fa5a61e018820583e4eb 100644
(file)
--- a/
src/glx/glxextensions.h
+++ b/
src/glx/glxextensions.h
@@
-51,7
+51,6
@@
enum
EXT_fbconfig_packed_float_bit,
EXT_framebuffer_sRGB_bit,
EXT_import_context_bit,
EXT_fbconfig_packed_float_bit,
EXT_framebuffer_sRGB_bit,
EXT_import_context_bit,
- EXT_no_config_context_bit,
EXT_texture_from_pixmap_bit,
EXT_visual_info_bit,
EXT_visual_rating_bit,
EXT_texture_from_pixmap_bit,
EXT_visual_info_bit,
EXT_visual_rating_bit,
diff --git
a/src/glx/tests/create_context_unittest.cpp
b/src/glx/tests/create_context_unittest.cpp
index d19271b47ef7b751a816d2ff785856b04b6e8be6..a2590589db2d8087cb584e686daa17a4c45d7f07 100644
(file)
--- a/
src/glx/tests/create_context_unittest.cpp
+++ b/
src/glx/tests/create_context_unittest.cpp
@@
-172,6
+172,15
@@
TEST_F(glXCreateContextAttribARB_test, NULL_display_returns_None)
EXPECT_EQ(0, fake_glx_context::contexts_allocated);
}
EXPECT_EQ(0, fake_glx_context::contexts_allocated);
}
+TEST_F(glXCreateContextAttribARB_test, NULL_fbconfig_returns_None)
+{
+ GLXContext ctx =
+ glXCreateContextAttribsARB(this->dpy, NULL, 0, False, NULL);
+
+ EXPECT_EQ(None, ctx);
+ EXPECT_EQ(0, fake_glx_context::contexts_allocated);
+}
+
TEST_F(glXCreateContextAttribARB_test, NULL_screen_returns_None)
{
delete psc;
TEST_F(glXCreateContextAttribARB_test, NULL_screen_returns_None)
{
delete psc;