summaryrefslogtreecommitdiff
path: root/src/gallium/targets
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-12-19 21:46:33 +0100
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-12-19 21:46:33 +0100
commit0f68236a2487dbeb0396b996debcda595b0b54a1 (patch)
tree938ae3b779349b6dba6f5a891550604f9a9ca895 /src/gallium/targets
parentd047168d81cfeb39a98f3ae16416872facc6237c (diff)
parent237880463d5168cad8df0bae6018b5fd76617777 (diff)
Merge remote branch 'origin/master' into nvc0-new
Diffstat (limited to 'src/gallium/targets')
-rw-r--r--src/gallium/targets/dri-noop/Makefile34
-rw-r--r--src/gallium/targets/dri-noop/SConscript31
-rw-r--r--src/gallium/targets/dri-noop/swrast_drm_api.c63
-rw-r--r--src/gallium/targets/egl/egl.c24
-rw-r--r--src/gallium/targets/graw-gdi/SConscript12
-rw-r--r--src/gallium/targets/graw-gdi/graw_gdi.c4
-rw-r--r--src/gallium/targets/graw-xlib/SConscript9
-rw-r--r--src/gallium/targets/graw-xlib/graw_xlib.c4
-rw-r--r--src/gallium/targets/libgl-gdi/SConscript9
-rw-r--r--src/gallium/targets/libgl-gdi/gdi_softpipe_winsys.c124
-rw-r--r--src/gallium/targets/libgl-gdi/libgl_gdi.c (renamed from src/gallium/targets/libgl-gdi/gdi_llvmpipe_winsys.c)77
-rw-r--r--src/gallium/targets/libgl-xlib/Makefile4
-rw-r--r--src/gallium/targets/libgl-xlib/SConscript13
-rw-r--r--src/gallium/targets/libgl-xlib/xlib.c19
-rw-r--r--src/gallium/targets/xorg-vmwgfx/vmw_video.c25
15 files changed, 260 insertions, 192 deletions
diff --git a/src/gallium/targets/dri-noop/Makefile b/src/gallium/targets/dri-noop/Makefile
new file mode 100644
index 0000000000..21c5f4f9f2
--- /dev/null
+++ b/src/gallium/targets/dri-noop/Makefile
@@ -0,0 +1,34 @@
+TOP = ../../../..
+include $(TOP)/configs/current
+
+LIBNAME = noop_dri.so
+
+DRIVER_DEFINES = \
+ -D__NOT_HAVE_DRM_H
+
+PIPE_DRIVERS = \
+ $(TOP)/src/gallium/state_trackers/dri/sw/libdrisw.a \
+ $(TOP)/src/gallium/winsys/sw/dri/libswdri.a \
+ $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
+ $(TOP)/src/gallium/drivers/trace/libtrace.a \
+ $(TOP)/src/gallium/drivers/rbug/librbug.a \
+ $(TOP)/src/gallium/drivers/noop/libnoop.a
+
+SWRAST_COMMON_GALLIUM_SOURCES = \
+ $(TOP)/src/mesa/drivers/dri/common/utils.c \
+ $(TOP)/src/mesa/drivers/dri/common/drisw_util.c \
+ $(TOP)/src/mesa/drivers/dri/common/xmlconfig.c
+
+C_SOURCES = \
+ swrast_drm_api.c \
+ $(SWRAST_COMMON_GALLIUM_SOURCES) \
+ $(DRIVER_SOURCES)
+
+ASM_SOURCES =
+
+include ../Makefile.dri
+
+INCLUDES += \
+ -I$(TOP)/src/gallium/winsys/sw/dri
+
+symlinks:
diff --git a/src/gallium/targets/dri-noop/SConscript b/src/gallium/targets/dri-noop/SConscript
new file mode 100644
index 0000000000..9c04ee6631
--- /dev/null
+++ b/src/gallium/targets/dri-noop/SConscript
@@ -0,0 +1,31 @@
+Import('*')
+
+env = drienv.Clone()
+
+env.Append(CPPPATH = [
+ '#/src/gallium/winsys/sw/dri',
+])
+
+env.Prepend(LIBS = [
+ st_drisw,
+ ws_dri,
+ noop,
+ mesa,
+ glsl,
+ gallium,
+ COMMON_DRI_SW_OBJECTS
+])
+
+env.Prepend(LIBS = [noop])
+
+swrastg_sources = [
+ 'swrast_drm_api.c'
+]
+
+module = env.LoadableModule(
+ target ='noop_dri.so',
+ source = swrastg_sources,
+ SHLIBPREFIX = '',
+)
+
+env.Alias('dri-noop', module)
diff --git a/src/gallium/targets/dri-noop/swrast_drm_api.c b/src/gallium/targets/dri-noop/swrast_drm_api.c
new file mode 100644
index 0000000000..a99779f183
--- /dev/null
+++ b/src/gallium/targets/dri-noop/swrast_drm_api.c
@@ -0,0 +1,63 @@
+/**************************************************************************
+ *
+ * Copyright 2009, VMware, Inc.
+ * All Rights Reserved.
+ * Copyright 2010 George Sapountzis <gsapountzis@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "pipe/p_compiler.h"
+#include "util/u_memory.h"
+#include "dri_sw_winsys.h"
+#include "noop/noop_public.h"
+
+#include "target-helpers/inline_debug_helper.h"
+#include "target-helpers/inline_sw_helper.h"
+
+
+struct pipe_screen *
+drisw_create_screen(struct drisw_loader_funcs *lf)
+{
+ struct sw_winsys *winsys = NULL;
+ struct pipe_screen *screen = NULL;
+
+ winsys = dri_create_sw_winsys(lf);
+ if (winsys == NULL)
+ return NULL;
+
+ screen = noop_screen_create(winsys);
+ if (!screen)
+ goto fail;
+
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+
+fail:
+ if (winsys)
+ winsys->destroy(winsys);
+
+ return NULL;
+}
+
+/* vim: set sw=3 ts=8 sts=3 expandtab: */
diff --git a/src/gallium/targets/egl/egl.c b/src/gallium/targets/egl/egl.c
index 786d5d1105..bb182ba984 100644
--- a/src/gallium/targets/egl/egl.c
+++ b/src/gallium/targets/egl/egl.c
@@ -100,9 +100,14 @@ load_st_module(struct st_module *stmod,
{
struct st_api *(*create_api)(void);
- _eglLog(_EGL_DEBUG, "searching for st module %s", name);
+ if (name) {
+ _eglLog(_EGL_DEBUG, "searching for st module %s", name);
+ stmod->name = loader_strdup(name);
+ }
+ else {
+ stmod->name = NULL;
+ }
- stmod->name = loader_strdup(name);
if (stmod->name)
_eglSearchPathForEach(dlopen_st_module_cb, (void *) stmod);
else
@@ -232,6 +237,21 @@ get_st_api_full(enum st_api_type api, enum st_profile_type profile)
break;
}
+ /* try again with libGL.so loaded */
+ if (!stmod->stapi && api == ST_API_OPENGL) {
+ struct util_dl_library *glapi = util_dl_open("libGL" UTIL_DL_EXT);
+
+ if (glapi) {
+ _eglLog(_EGL_DEBUG, "retry with libGL" UTIL_DL_EXT " loaded");
+ /* skip the last name (which is NULL) */
+ for (i = 0; i < count - 1; i++) {
+ if (load_st_module(stmod, names[i], symbol))
+ break;
+ }
+ util_dl_close(glapi);
+ }
+ }
+
if (!stmod->stapi) {
EGLint level = (egl_g3d_loader.profile_masks[api]) ?
_EGL_WARNING : _EGL_DEBUG;
diff --git a/src/gallium/targets/graw-gdi/SConscript b/src/gallium/targets/graw-gdi/SConscript
index 8ee8915ace..352efe95d0 100644
--- a/src/gallium/targets/graw-gdi/SConscript
+++ b/src/gallium/targets/graw-gdi/SConscript
@@ -12,9 +12,6 @@ env.Append(CPPPATH = [
env.Prepend(LIBS = [
gallium,
'gdi32',
- identity,
- rbug,
- trace,
'user32',
'ws2_32',
])
@@ -24,8 +21,13 @@ sources = [
graw_util,
]
-env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
-env.Prepend(LIBS = [softpipe])
+if True:
+ env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_GALAHAD', 'GALLIUM_SOFTPIPE'])
+ env.Prepend(LIBS = [trace, rbug, galahad, softpipe])
+
+if env['llvm']:
+ env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
+ env.Prepend(LIBS = [llvmpipe])
graw = env.SharedLibrary(
target = 'graw',
diff --git a/src/gallium/targets/graw-gdi/graw_gdi.c b/src/gallium/targets/graw-gdi/graw_gdi.c
index bd6242b077..17ca2a761c 100644
--- a/src/gallium/targets/graw-gdi/graw_gdi.c
+++ b/src/gallium/targets/graw-gdi/graw_gdi.c
@@ -29,7 +29,7 @@
#include "gdi/gdi_sw_winsys.h"
#include "pipe/p_screen.h"
#include "state_tracker/graw.h"
-#include "target-helpers/wrap_screen.h"
+#include "target-helpers/inline_debug_helper.h"
#include "target-helpers/inline_sw_helper.h"
#include <windows.h>
@@ -116,7 +116,7 @@ graw_create_window_and_screen(int x,
*handle = (void *)hDC;
- return gallium_wrap_screen(screen);
+ return debug_screen_wrap(screen);
fail:
if (hWnd)
diff --git a/src/gallium/targets/graw-xlib/SConscript b/src/gallium/targets/graw-xlib/SConscript
index e50eb8a03d..42cb349cc9 100644
--- a/src/gallium/targets/graw-xlib/SConscript
+++ b/src/gallium/targets/graw-xlib/SConscript
@@ -7,9 +7,6 @@ env = env.Clone()
env.Prepend(LIBS = [
ws_xlib,
- trace,
- rbug,
- identity,
gallium,
])
@@ -20,14 +17,16 @@ env.Append(CPPPATH = [
'#src/gallium/include/state_tracker',
])
+env.Append(CPPDEFINES = ['GALLIUM_RBUG', 'GALLIUM_TRACE', 'GALLIUM_GALAHAD'])
+
sources = [
'graw_xlib.c',
graw_util
]
if True:
- env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
- env.Prepend(LIBS = [softpipe])
+ env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_GALAHAD', 'GALLIUM_SOFTPIPE'])
+ env.Prepend(LIBS = [trace, rbug, galahad, softpipe])
if env['llvm']:
env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
diff --git a/src/gallium/targets/graw-xlib/graw_xlib.c b/src/gallium/targets/graw-xlib/graw_xlib.c
index 8658e19e3a..578086f8f9 100644
--- a/src/gallium/targets/graw-xlib/graw_xlib.c
+++ b/src/gallium/targets/graw-xlib/graw_xlib.c
@@ -3,8 +3,8 @@
#include "pipe/p_screen.h"
#include "util/u_debug.h"
#include "util/u_memory.h"
-#include "target-helpers/wrap_screen.h"
#include "target-helpers/inline_sw_helper.h"
+#include "target-helpers/inline_debug_helper.h"
#include "state_tracker/xlib_sw_winsys.h"
#include "state_tracker/graw.h"
@@ -36,7 +36,7 @@ graw_create_screen( void )
/* Inject any wrapping layers we want to here:
*/
- return gallium_wrap_screen( screen );
+ return debug_screen_wrap( screen );
}
diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript
index 339238756a..6fa0851a1a 100644
--- a/src/gallium/targets/libgl-gdi/SConscript
+++ b/src/gallium/targets/libgl-gdi/SConscript
@@ -18,16 +18,15 @@ env.Append(LIBS = [
talloc,
])
-sources = []
+sources = ['libgl_gdi.c']
drivers = []
if True:
- sources = ['gdi_softpipe_winsys.c']
- drivers = [softpipe]
+ drivers += [softpipe]
if env['llvm']:
- sources = ['gdi_llvmpipe_winsys.c']
- drivers = [llvmpipe]
+ env.Append(CPPDEFINES = 'HAVE_LLVMPIPE')
+ drivers += [llvmpipe]
if env['gcc']:
sources += ['#src/gallium/state_trackers/wgl/opengl32.mingw.def']
diff --git a/src/gallium/targets/libgl-gdi/gdi_softpipe_winsys.c b/src/gallium/targets/libgl-gdi/gdi_softpipe_winsys.c
deleted file mode 100644
index 4ac507ff9c..0000000000
--- a/src/gallium/targets/libgl-gdi/gdi_softpipe_winsys.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/**************************************************************************
- *
- * Copyright 2009 VMware, Inc.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- *
- **************************************************************************/
-
-/**
- * @file
- * LLVMpipe support.
- *
- * @author Jose Fonseca <jfonseca@vmware.com>
- */
-
-
-#include <windows.h>
-
-#include "stw_winsys.h"
-#include "gdi/gdi_sw_winsys.h"
-#include "softpipe/sp_texture.h"
-#include "softpipe/sp_screen.h"
-#include "softpipe/sp_public.h"
-
-
-static struct pipe_screen *
-gdi_softpipe_screen_create(void)
-{
- static struct sw_winsys *winsys;
- struct pipe_screen *screen;
-
- winsys = gdi_create_sw_winsys();
- if(!winsys)
- goto no_winsys;
-
- screen = softpipe_create_screen(winsys);
- if(!screen)
- goto no_screen;
-
- return screen;
-
-no_screen:
- winsys->destroy(winsys);
-no_winsys:
- return NULL;
-}
-
-
-
-
-static void
-gdi_softpipe_present(struct pipe_screen *screen,
- struct pipe_surface *surface,
- HDC hDC)
-{
- /* This will fail if any interposing layer (trace, debug, etc) has
- * been introduced between the state-trackers and softpipe.
- *
- * Ideally this would get replaced with a call to
- * pipe_screen::flush_frontbuffer().
- *
- * Failing that, it may be necessary for intervening layers to wrap
- * other structs such as this stw_winsys as well...
- */
- gdi_sw_display(softpipe_screen(screen)->winsys,
- softpipe_resource(surface->texture)->dt,
- hDC);
-}
-
-
-static const struct stw_winsys stw_winsys = {
- &gdi_softpipe_screen_create,
- &gdi_softpipe_present,
- NULL, /* get_adapter_luid */
- NULL, /* shared_surface_open */
- NULL, /* shared_surface_close */
- NULL /* compose */
-};
-
-
-BOOL WINAPI
-DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
-{
- switch (fdwReason) {
- case DLL_PROCESS_ATTACH:
- stw_init(&stw_winsys);
- stw_init_thread();
- break;
-
- case DLL_THREAD_ATTACH:
- stw_init_thread();
- break;
-
- case DLL_THREAD_DETACH:
- stw_cleanup_thread();
- break;
-
- case DLL_PROCESS_DETACH:
- stw_cleanup_thread();
- stw_cleanup();
- break;
- }
- return TRUE;
-}
diff --git a/src/gallium/targets/libgl-gdi/gdi_llvmpipe_winsys.c b/src/gallium/targets/libgl-gdi/libgl_gdi.c
index 58c941a03b..112904ab5f 100644
--- a/src/gallium/targets/libgl-gdi/gdi_llvmpipe_winsys.c
+++ b/src/gallium/targets/libgl-gdi/libgl_gdi.c
@@ -1,6 +1,6 @@
/**************************************************************************
*
- * Copyright 2009 VMware, Inc.
+ * Copyright 2009-2010 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -28,7 +28,7 @@
/**
* @file
- * LLVMpipe support.
+ * Softpipe/LLVMpipe support.
*
* @author Jose Fonseca <jfonseca@vmware.com>
*/
@@ -36,24 +36,56 @@
#include <windows.h>
+#include "util/u_debug.h"
#include "stw_winsys.h"
#include "gdi/gdi_sw_winsys.h"
+
+#include "softpipe/sp_texture.h"
+#include "softpipe/sp_screen.h"
+#include "softpipe/sp_public.h"
+
+#ifdef HAVE_LLVMPIPE
#include "llvmpipe/lp_texture.h"
#include "llvmpipe/lp_screen.h"
#include "llvmpipe/lp_public.h"
+#endif
+
+
+static boolean use_llvmpipe = FALSE;
static struct pipe_screen *
-gdi_llvmpipe_screen_create(void)
+gdi_screen_create(void)
{
- static struct sw_winsys *winsys;
- struct pipe_screen *screen;
+ const char *default_driver;
+ const char *driver;
+ struct pipe_screen *screen = NULL;
+ struct sw_winsys *winsys;
winsys = gdi_create_sw_winsys();
if(!winsys)
goto no_winsys;
- screen = llvmpipe_create_screen(winsys);
+#ifdef HAVE_LLVMPIPE
+ default_driver = "llvmpipe";
+#else
+ default_driver = "softpipe";
+#endif
+
+ driver = debug_get_option("GALLIUM_DRIVER", default_driver);
+
+#ifdef HAVE_LLVMPIPE
+ if (strcmp(driver, "llvmpipe") == 0) {
+ screen = llvmpipe_create_screen( winsys );
+ }
+#endif
+
+ if (screen == NULL) {
+ screen = softpipe_create_screen( winsys );
+ } else {
+ use_llvmpipe = TRUE;
+ }
+
if(!screen)
goto no_screen;
@@ -66,15 +98,13 @@ no_winsys:
}
-
-
static void
-gdi_llvmpipe_present(struct pipe_screen *screen,
- struct pipe_surface *surface,
- HDC hDC)
+gdi_present(struct pipe_screen *screen,
+ struct pipe_resource *res,
+ HDC hDC)
{
/* This will fail if any interposing layer (trace, debug, etc) has
- * been introduced between the state-trackers and llvmpipe.
+ * been introduced between the state-trackers and the pipe driver.
*
* Ideally this would get replaced with a call to
* pipe_screen::flush_frontbuffer().
@@ -82,15 +112,28 @@ gdi_llvmpipe_present(struct pipe_screen *screen,
* Failing that, it may be necessary for intervening layers to wrap
* other structs such as this stw_winsys as well...
*/
- gdi_sw_display(llvmpipe_screen(screen)->winsys,
- llvmpipe_resource(surface->texture)->dt,
- hDC);
+
+ struct sw_winsys *winsys = NULL;
+ struct sw_displaytarget *dt = NULL;
+
+#ifdef HAVE_LLVMPIPE
+ if (use_llvmpipe) {
+ winsys = llvmpipe_screen(screen)->winsys;
+ dt = llvmpipe_resource(res)->dt;
+ gdi_sw_display(winsys, dt, hDC);
+ return;
+ }
+#endif
+
+ winsys = softpipe_screen(screen)->winsys,
+ dt = softpipe_resource(res)->dt,
+ gdi_sw_display(winsys, dt, hDC);
}
static const struct stw_winsys stw_winsys = {
- &gdi_llvmpipe_screen_create,
- &gdi_llvmpipe_present,
+ &gdi_screen_create,
+ &gdi_present,
NULL, /* get_adapter_luid */
NULL, /* shared_surface_open */
NULL, /* shared_surface_close */
diff --git a/src/gallium/targets/libgl-xlib/Makefile b/src/gallium/targets/libgl-xlib/Makefile
index 076a040a5a..fb537c3155 100644
--- a/src/gallium/targets/libgl-xlib/Makefile
+++ b/src/gallium/targets/libgl-xlib/Makefile
@@ -26,6 +26,8 @@ INCLUDE_DIRS = \
DEFINES += \
-DGALLIUM_SOFTPIPE \
+ -DGALLIUM_RBUG \
+ -DGALLIUM_TRACE \
-DGALLIUM_GALAHAD
#-DGALLIUM_CELL will be defined by the config */
@@ -44,7 +46,7 @@ LIBS = \
$(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
- $(TOP)/src/gallium/drivers/identity/libidentity.a \
+ $(TOP)/src/gallium/drivers/galahad/libgalahad.a \
$(TOP)/src/mapi/glapi/libglapi.a \
$(TOP)/src/mesa/libmesagallium.a \
$(GALLIUM_AUXILIARIES) \
diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript
index 582760eac9..d932736be7 100644
--- a/src/gallium/targets/libgl-xlib/SConscript
+++ b/src/gallium/targets/libgl-xlib/SConscript
@@ -19,9 +19,6 @@ env.Prepend(LIBS = env['X11_LIBS'])
env.Prepend(LIBS = [
st_xlib,
ws_xlib,
- trace,
- rbug,
- identity,
glapi,
mesa,
glsl,
@@ -34,15 +31,11 @@ sources = [
]
if True:
- env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
- env.Prepend(LIBS = [softpipe])
-
-if True:
- env.Append(CPPDEFINES = 'GALLIUM_GALAHAD')
- env.Prepend(LIBS = [galahad])
+ env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_GALAHAD', 'GALLIUM_SOFTPIPE'])
+ env.Prepend(LIBS = [trace, rbug, galahad, softpipe])
if env['llvm']:
- env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
+ env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
env.Prepend(LIBS = [llvmpipe])
if False:
diff --git a/src/gallium/targets/libgl-xlib/xlib.c b/src/gallium/targets/libgl-xlib/xlib.c
index b0d1e52910..9a3e0e07b0 100644
--- a/src/gallium/targets/libgl-xlib/xlib.c
+++ b/src/gallium/targets/libgl-xlib/xlib.c
@@ -32,17 +32,15 @@
*/
#include "pipe/p_compiler.h"
#include "util/u_debug.h"
-#include "target-helpers/wrap_screen.h"
-#include "target-helpers/inline_sw_helper.h"
#include "state_tracker/xlib_sw_winsys.h"
#include "xm_public.h"
#include "state_tracker/st_api.h"
#include "state_tracker/st_gl_api.h"
+#include "target-helpers/inline_sw_helper.h"
+#include "target-helpers/inline_debug_helper.h"
+
-#if defined(GALLIUM_GALAHAD)
-#include "galahad/glhd_public.h"
-#endif
/* Helper function to build a subset of a driver stack consisting of
* one of the software rasterizers (cell, llvmpipe, softpipe) and the
@@ -67,18 +65,9 @@ swrast_xlib_create_screen( Display *display )
if (screen == NULL)
goto fail;
- /* XXX will fix soon */
-#if defined(GALLIUM_GALAHAD)
- if (screen) {
- struct pipe_screen *galahad_screen = galahad_screen_create( screen );
- if (galahad_screen)
- screen = galahad_screen;
- }
-#endif
-
/* Inject any wrapping layers we want to here:
*/
- return gallium_wrap_screen( screen );
+ return debug_screen_wrap( screen );
fail:
if (winsys)
diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_video.c b/src/gallium/targets/xorg-vmwgfx/vmw_video.c
index 94465e5204..7979209993 100644
--- a/src/gallium/targets/xorg-vmwgfx/vmw_video.c
+++ b/src/gallium/targets/xorg-vmwgfx/vmw_video.c
@@ -362,8 +362,10 @@ vmw_video_close(struct vmw_customizer *vmw)
/* make sure the port is stoped as well */
vmw_xv_stop_video(pScrn, &video->port[i], TRUE);
vmw_ioctl_unref_stream(vmw, video->port[i].streamId);
+ REGION_UNINIT(pScreen, &video->port[i].clipBoxes);
}
+
/* XXX: I'm sure this function is missing code for turning off Xv */
free(vmw->video_priv);
@@ -448,7 +450,16 @@ vmw_video_init_adaptor(ScrnInfoPtr pScrn, struct vmw_customizer *vmw)
vmw->video_priv = video;
adaptor->type = XvInputMask | XvImageMask | XvWindowMask;
- adaptor->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT;
+
+ /**
+ * Note: CLIP_TO_VIEWPORT was removed from the flags, since with the
+ * crtc/output based modesetting, the viewport is not updated on
+ * RandR modeswitches. Hence the video may incorrectly be clipped away.
+ * The correct approach, (if needed) would be to clip against the
+ * scanout area union of all active crtcs. Revisit if needed.
+ */
+
+ adaptor->flags = VIDEO_OVERLAID_IMAGES;
adaptor->name = "VMware Video Engine";
adaptor->nEncodings = VMWARE_VID_NUM_ENCODINGS;
adaptor->pEncodings = vmwareVideoEncodings;
@@ -463,6 +474,7 @@ vmw_video_init_adaptor(ScrnInfoPtr pScrn, struct vmw_customizer *vmw)
video->port[i].flags = SVGA_VIDEO_FLAG_COLORKEY;
video->port[i].colorKey = VMWARE_VIDEO_COLORKEY;
video->port[i].isAutoPaintColorkey = TRUE;
+ REGION_NULL(pScrn->pScreen, &video->port[i].clipBoxes);
adaptor->pPortPrivates[i].ptr = &video->port[i];
}
@@ -554,7 +566,9 @@ vmw_video_port_init(ScrnInfoPtr pScrn, struct vmw_video_port *port,
REGION_COPY(pScrn->pScreen, &port->clipBoxes, clipBoxes);
if (port->isAutoPaintColorkey)
- xf86XVFillKeyHelper(pScrn->pScreen, port->colorKey, clipBoxes);
+ xf86XVFillKeyHelper(pScrn->pScreen, port->colorKey, clipBoxes);
+
+ xorg_flush(pScrn->pScreen);
return port->play(pScrn, port, src_x, src_y, drw_x, drw_y, src_w, src_h,
drw_w, drw_h, format, buf, width, height, clipBoxes);
@@ -641,11 +655,12 @@ vmw_video_port_play(ScrnInfoPtr pScrn, struct vmw_video_port *port,
*/
if (!REGION_EQUAL(pScrn->pScreen, &port->clipBoxes, clipBoxes)) {
REGION_COPY(pScrn->pScreen, &port->clipBoxes, clipBoxes);
- if (port->isAutoPaintColorkey) {
+ if (port->isAutoPaintColorkey)
xf86XVFillKeyHelper(pScrn->pScreen, port->colorKey, clipBoxes);
- }
}
+ xorg_flush(pScrn->pScreen);
+
ret = drmCommandWrite(vmw->fd, DRM_VMW_CONTROL_STREAM, &arg, sizeof(arg));
if (ret) {
vmw_video_port_cleanup(pScrn, port);
@@ -865,6 +880,8 @@ vmw_xv_stop_video(ScrnInfoPtr pScrn, pointer data, Bool cleanup)
if (!vmw->video_priv)
return;
+ REGION_EMPTY(pScrn->pScreen, &port->clipBoxes);
+
if (!cleanup)
return;