drm/radeon: remove softpipe references

This commit is contained in:
Keith Whitwell
2010-02-08 16:35:32 +00:00
parent ebe2f76095
commit 6447b20ce0
2 changed files with 5 additions and 57 deletions
@@ -33,7 +33,6 @@
#include "radeon_buffer.h"
#include "radeon_bo_gem.h"
#include "softpipe/sp_texture.h"
#include "r300_context.h"
#include "util/u_format.h"
#include "util/u_math.h"
@@ -252,55 +251,6 @@ static int radeon_fence_finish(struct pipe_winsys *ws,
return 0;
}
static void radeon_display_surface(struct pipe_winsys *pws,
struct pipe_surface *psurf,
struct radeon_vl_context *rvl_ctx)
{
struct r300_texture *r300tex = (struct r300_texture *)(psurf->texture);
XImage *ximage;
void *data;
ximage = XCreateImage(rvl_ctx->display,
XDefaultVisual(rvl_ctx->display, rvl_ctx->screen),
XDefaultDepth(rvl_ctx->display, rvl_ctx->screen),
ZPixmap, 0, /* format, offset */
NULL, /* data */
0, 0, /* size */
32, /* bitmap_pad */
0); /* bytes_per_line */
assert(ximage->format);
assert(ximage->bitmap_unit);
data = pws->buffer_map(pws, r300tex->buffer, 0);
/* update XImage's fields */
ximage->data = data;
ximage->width = psurf->width;
ximage->height = psurf->height;
ximage->bytes_per_line = psurf->width * (ximage->bits_per_pixel >> 3);
XPutImage(rvl_ctx->display, rvl_ctx->drawable,
XDefaultGC(rvl_ctx->display, rvl_ctx->screen),
ximage, 0, 0, 0, 0, psurf->width, psurf->height);
XSync(rvl_ctx->display, 0);
ximage->data = NULL;
XDestroyImage(ximage);
pws->buffer_unmap(pws, r300tex->buffer);
}
static void radeon_flush_frontbuffer(struct pipe_winsys *pipe_winsys,
struct pipe_surface *pipe_surface,
void *context_private)
{
struct radeon_vl_context *rvl_ctx;
rvl_ctx = (struct radeon_vl_context *) context_private;
radeon_display_surface(pipe_winsys, pipe_surface, rvl_ctx);
}
struct radeon_winsys* radeon_pipe_winsys(int fd)
{
struct radeon_winsys* radeon_ws;
@@ -319,7 +269,7 @@ struct radeon_winsys* radeon_pipe_winsys(int fd)
radeon_ws->priv->fd = fd;
radeon_ws->priv->bom = radeon_bo_manager_gem_ctor(fd);
radeon_ws->base.flush_frontbuffer = radeon_flush_frontbuffer;
radeon_ws->base.flush_frontbuffer = NULL; /* overriden by co-state tracker */
radeon_ws->base.buffer_create = radeon_buffer_create;
radeon_ws->base.user_buffer_create = radeon_buffer_user_create;
@@ -29,8 +29,6 @@
* Joakim Sindholt <opensource@zhasha.com>
*/
#include "softpipe/sp_winsys.h"
#include "radeon_drm.h"
/* Helper function to do the ioctls needed for setup and init. */
@@ -128,10 +126,10 @@ struct pipe_screen* radeon_create_screen(struct drm_api* api,
struct radeon_winsys* rwinsys = radeon_pipe_winsys(drmFB);
do_ioctls(drmFB, rwinsys);
if (!is_r3xx(rwinsys->pci_id) ||
debug_get_bool_option("RADEON_SOFTPIPE", FALSE)) {
return softpipe_create_screen((struct pipe_winsys*)rwinsys);
} else {
/* The state tracker can organize a softpipe fallback if no hw
* driver is found.
*/
if (is_r3xx(rwinsys->pci_id)) {
radeon_setup_winsys(drmFB, rwinsys);
return r300_create_screen(rwinsys);
}