gallium: remove trace module injection from various state trackers
authorKeith Whitwell <keithw@vmware.com>
Wed, 10 Mar 2010 10:43:00 +0000 (10:43 +0000)
committerKeith Whitwell <keithw@vmware.com>
Wed, 10 Mar 2010 10:43:00 +0000 (10:43 +0000)
Components such as state trackers, drivers, etc, should be free to be
recombined in arbtrary ways to build driver stacks.  They should not
be reaching out and trying to build the stack themselves - this is now
expected to be handled by the "target" abstraction.

src/gallium/state_trackers/python/st_device.c
src/gallium/state_trackers/wgl/stw_device.c
src/gallium/state_trackers/wgl/stw_device.h
src/gallium/state_trackers/wgl/stw_ext_gallium.c
src/gallium/state_trackers/wgl/stw_framebuffer.c

index 335e8e7f0d854c1d6dc7b8a3443c47d0d6b29ad5..3aeb6226d008d8ebca782fcda5324d85078acb01 100644 (file)
@@ -34,7 +34,6 @@
 #include "util/u_math.h"
 #include "util/u_memory.h"
 #include "util/u_simple_shaders.h"
-#include "trace/tr_public.h"
 
 #include "st_device.h"
 #include "st_winsys.h"
@@ -85,10 +84,6 @@ st_device_create(boolean hardware)
    else
       screen = st_software_screen_create();
 
-   screen = trace_screen_create(screen);
-   if (!screen)
-      goto no_screen;
-
    st_dev = CALLOC_STRUCT(st_device);
    if (!st_dev)
       goto no_device;
index 472a2a5379a6eedf816e001ad3ba77fe4ef22bd0..ea300f27cb56ed912dbba39a2b01a64e34b4ec96 100644 (file)
 #include "pipe/p_screen.h"
 #include "state_tracker/st_public.h"
 
-#ifdef DEBUG
-#include "trace/tr_screen.h"
-#include "trace/tr_texture.h"
-#endif
-
 #include "stw_device.h"
 #include "stw_winsys.h"
 #include "stw_pixelformat.h"
@@ -107,13 +102,10 @@ stw_init(const struct stw_winsys *stw_winsys)
    if(stw_winsys->get_adapter_luid)
       stw_winsys->get_adapter_luid(screen, &stw_dev->AdapterLuid);
 
-#ifdef DEBUG
-   stw_dev->screen = trace_screen_create(screen);
-   stw_dev->trace_running = stw_dev->screen != screen ? TRUE : FALSE;
-#else
    stw_dev->screen = screen;
-#endif
-   
+
+   /* XXX
+    */
    stw_dev->screen->flush_frontbuffer = &stw_flush_frontbuffer;
    
    pipe_mutex_init( stw_dev->ctx_mutex );
index a83841f6b7d5bf5d954955a361ff146517d37e81..2e9ba197dfa408ec6ac495313923630bd6300d10 100644 (file)
@@ -48,10 +48,6 @@ struct stw_device
    
    struct pipe_screen *screen;
    
-#ifdef DEBUG
-   boolean trace_running;
-#endif
-
    LUID AdapterLuid;
 
    struct stw_pixelformat_info pixelformats[STW_MAX_PIXELFORMATS];
index 8dd63f124ad60e670b529f394e3349aa0ebe040e..5ecbd8048de2fe9e4ea4e9094c02e992f5a7cadf 100644 (file)
 #include "stw_winsys.h"
 #include "stw_ext_gallium.h"
 
-#ifdef DEBUG
-#include "trace/tr_screen.h"
-#include "trace/tr_context.h"
-#endif
-
 
 struct pipe_screen * APIENTRY
 wglGetGalliumScreenMESA(void)
index 02de21ccb2b323be513b8b3ae7118e4f5f1c3a58..4f1629de2f2c16ec55ee630bab48ccd4d384b83a 100644 (file)
 #include "state_tracker/st_context.h"
 #include "state_tracker/st_public.h"
 
-#ifdef DEBUG
-#include "trace/tr_screen.h"
-#include "trace/tr_texture.h"
-#endif
-
 #include "stw_icd.h"
 #include "stw_framebuffer.h"
 #include "stw_device.h"
@@ -495,13 +490,6 @@ DrvPresentBuffers(HDC hdc, PGLPRESENTBUFFERSDATA data)
 
    surface = (struct pipe_surface *)data->pPrivateData;
 
-#ifdef DEBUG
-   if(stw_dev->trace_running) {
-      screen = trace_screen(screen)->screen;
-      surface = trace_surface(surface)->surface;
-   }
-#endif
-
    if(data->hSharedSurface != fb->hSharedSurface) {
       if(fb->shared_surface) {
          stw_dev->stw_winsys->shared_surface_close(screen, fb->shared_surface);
@@ -563,13 +551,6 @@ stw_framebuffer_present_locked(HDC hdc,
    else {
       struct pipe_screen *screen = stw_dev->screen;
 
-#ifdef DEBUG
-      if(stw_dev->trace_running) {
-         screen = trace_screen(screen)->screen;
-         surface = trace_surface(surface)->surface;
-      }
-#endif
-
       stw_dev->stw_winsys->present( screen, surface, hdc );
 
       stw_framebuffer_update(fb);