#include "state_tracker/st_public.h"
#include "state_tracker/st_context.h"
#include "pipe/p_defines.h"
+#include "pipe/p_screen.h"
#include "pipe/p_context.h"
#include "xm_winsys_aub.h"
fail:
if (c->st)
st_destroy_context(c->st);
- if (pipe)
+ else if (pipe)
pipe->destroy(pipe);
FREE(c);
return NULL;
PUBLIC
void XMesaDestroyContext( XMesaContext c )
{
+ struct pipe_screen *screen = c->st->pipe->screen;
st_destroy_context(c->st);
+ screen->destroy(screen);
_mesa_free(c);
}
#endif
#ifdef GALLIUM_TRACE
-#include "trace/tr_winsys.h"
#include "trace/tr_screen.h"
#include "trace/tr_context.h"
#endif
ws->base.get_name = xm_get_name;
}
-#ifdef GALLIUM_TRACE
- return trace_winsys_create(&ws->base);
-#else
- return &ws->base;
-#endif
+ return &ws->base;
}
{
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);
+ screen = trace_screen_create(screen);
+
+ pipe = trace_context_create(screen, pipe);
#endif
}