summaryrefslogtreecommitdiffstats
path: root/src/glx/tests
diff options
context:
space:
mode:
authorTomasz Lis <tomasz.lis@intel.com>2013-07-17 13:49:18 +0200
committerIan Romanick <ian.d.romanick@intel.com>2013-07-18 16:03:42 -0700
commit27c8aa5cfbcf6f2ad21564dfcdabbe747c277cab (patch)
tree6a63a21b1770cebeeed83a94438f17083776b719 /src/glx/tests
parent1c748dff6b13ff127c02790fa6078cc68eb42291 (diff)
glx: Store the RENDER_TYPE in indirect rendering
v2 (idr): Open-code the check for GLX_RENDER_TYPE. dri2_convert_glx_attribs can't be called from here because that function only exists in direct-rendering builds. Also add a stub version of indirect_create_context_attribs to tests/fake_glx_screen.cpp to prevent 'make check' regressions. Signed-off-by: Tomasz Lis <tomasz.lis@intel.com> Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glx/tests')
-rw-r--r--src/glx/tests/fake_glx_screen.cpp17
-rw-r--r--src/glx/tests/fake_glx_screen.h15
2 files changed, 16 insertions, 16 deletions
diff --git a/src/glx/tests/fake_glx_screen.cpp b/src/glx/tests/fake_glx_screen.cpp
index 12d003b84f7..845084faa0f 100644
--- a/src/glx/tests/fake_glx_screen.cpp
+++ b/src/glx/tests/fake_glx_screen.cpp
@@ -24,7 +24,7 @@
struct glx_screen_vtable fake_glx_screen::vt = {
indirect_create_context,
- fake_glx_context::create_attribs
+ indirect_create_context_attribs
};
struct glx_screen_vtable fake_glx_screen_direct::vt = {
@@ -55,3 +55,18 @@ indirect_create_context(struct glx_screen *psc, struct glx_config *mode,
return new fake_glx_context(psc, mode);
}
+
+extern "C" struct glx_context *
+indirect_create_context_attribs(struct glx_screen *base,
+ struct glx_config *config_base,
+ struct glx_context *shareList,
+ unsigned num_attribs,
+ const uint32_t *attribs,
+ unsigned *error)
+{
+ (void) num_attribs;
+ (void) attribs;
+ (void) error;
+
+ return indirect_create_context(base, config_base, shareList, 0);
+}
diff --git a/src/glx/tests/fake_glx_screen.h b/src/glx/tests/fake_glx_screen.h
index 6aa6cb68fe9..0249e79bcff 100644
--- a/src/glx/tests/fake_glx_screen.h
+++ b/src/glx/tests/fake_glx_screen.h
@@ -88,21 +88,6 @@ public:
contexts_allocated--;
}
- static glx_context *create_attribs(struct glx_screen *psc,
- struct glx_config *mode,
- struct glx_context *shareList,
- unsigned num_attribs,
- const uint32_t *attribs,
- unsigned *error)
- {
- (void) shareList;
- (void) num_attribs;
- (void) attribs;
-
- *error = 0;
- return new fake_glx_context(psc, mode);
- }
-
/** Number of context that are allocated (and not freed). */
static int contexts_allocated;