summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-08-11 16:07:56 +1000
committerBen Skeggs <skeggsb@gmail.com>2008-08-11 16:07:56 +1000
commitf56eda6a85912dee9eef9099f6023c6bab05a41a (patch)
tree068107b1bcf1aec4847c059e18a3e5f3a0b3c303 /src/gallium/winsys
parentce8e846ffea8e1a11b8ae4ba05a7386e7c34cc9f (diff)
parent5549d35db5323829702099af6e53a8dd7c451524 (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/xlib/SConscript54
-rw-r--r--src/gallium/winsys/xlib/xm_api.c5
-rw-r--r--src/gallium/winsys/xlib/xm_winsys.c20
3 files changed, 53 insertions, 26 deletions
diff --git a/src/gallium/winsys/xlib/SConscript b/src/gallium/winsys/xlib/SConscript
index 14a85ae0f2..8650f595a7 100644
--- a/src/gallium/winsys/xlib/SConscript
+++ b/src/gallium/winsys/xlib/SConscript
@@ -9,31 +9,35 @@ if env['platform'] == 'linux' \
and 'i965simple' in env['drivers'] \
and not env['dri']:
- env = env.Clone()
+ env = env.Clone()
- env.Append(CPPPATH = [
- '#/src/mesa',
- '#/src/mesa/main',
- ])
+ env.Append(CPPPATH = [
+ '#/src/mesa',
+ '#/src/mesa/main',
+ ])
- sources = [
- 'glxapi.c',
- 'fakeglx.c',
- 'xfonts.c',
- 'xm_api.c',
- 'xm_winsys.c',
- 'xm_winsys_aub.c',
- 'brw_aub.c',
- ]
-
- drivers = [
- softpipe,
- i965simple
- ]
+ sources = [
+ 'glxapi.c',
+ 'fakeglx.c',
+ 'xfonts.c',
+ 'xm_api.c',
+ 'xm_winsys.c',
+ 'xm_winsys_aub.c',
+ 'brw_aub.c',
+ ]
+
+ drivers = [
+ softpipe,
+ i965simple,
+ ]
+
+ if 'trace' in env['drivers']:
+ env.Append(CPPDEFINES = 'GALLIUM_TRACE')
+ drivers += [trace]
- # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
- env.SharedLibrary(
- target ='GL',
- source = sources,
- LIBS = glapi + mesa + drivers + auxiliaries + env['LIBS'],
- )
+ # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
+ env.SharedLibrary(
+ target ='GL',
+ source = sources,
+ LIBS = glapi + mesa + drivers + auxiliaries + env['LIBS'],
+ )
diff --git a/src/gallium/winsys/xlib/xm_api.c b/src/gallium/winsys/xlib/xm_api.c
index 8a32c54349..4e5441a13d 100644
--- a/src/gallium/winsys/xlib/xm_api.c
+++ b/src/gallium/winsys/xlib/xm_api.c
@@ -363,7 +363,12 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type,
stencilFormat = PIPE_FORMAT_S8_UNORM;
}
else {
+ /* no stencil */
stencilFormat = PIPE_FORMAT_NONE;
+ if (depthFormat == PIPE_FORMAT_S8Z24_UNORM) {
+ /* use 24-bit Z, undefined stencil channel */
+ depthFormat = PIPE_FORMAT_X8Z24_UNORM;
+ }
}
diff --git a/src/gallium/winsys/xlib/xm_winsys.c b/src/gallium/winsys/xlib/xm_winsys.c
index 9225ee510d..6071a5ad5e 100644
--- a/src/gallium/winsys/xlib/xm_winsys.c
+++ b/src/gallium/winsys/xlib/xm_winsys.c
@@ -54,6 +54,12 @@
#define TILE_SIZE 32 /* avoid compilation errors */
#endif
+#ifdef GALLIUM_TRACE
+#include "trace/tr_winsys.h"
+#include "trace/tr_screen.h"
+#include "trace/tr_context.h"
+#endif
+
#include "xm_winsys_aub.h"
@@ -645,7 +651,11 @@ xmesa_get_pipe_winsys(struct xmesa_visual *xm_vis)
ws->base.get_name = xm_get_name;
}
- return &ws->base;
+#ifdef GALLIUM_TRACE
+ return trace_winsys_create(&ws->base);
+#else
+ return &ws->base;
+#endif
}
@@ -674,7 +684,15 @@ xmesa_create_pipe_context(XMesaContext xmesa, uint pixelformat)
{
struct pipe_screen *screen = softpipe_create_screen(pws);
+#ifdef GALLIUM_TRACE
+ screen = trace_screen_create(screen);
+#endif
+
pipe = softpipe_create(screen, pws, NULL);
+
+#ifdef GALLIUM_TRACE
+ pipe = trace_context_create(pipe);
+#endif
}
if (pipe)