aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/nouveau
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2010-05-25 18:47:21 +0100
committerJakob Bornecrantz <[email protected]>2010-05-25 19:04:11 +0100
commit395b605e19d5357c97f2d7d45673a80cd2c729ef (patch)
tree2f9d4328077488473eb02b4dd383bc7bf9c183a8 /src/gallium/winsys/nouveau
parentf501230db3a94c9328b8e769d9c17b2c3792e19c (diff)
gallium: Remove dri1_api.h and winsys support for DRI1
Since DRI1 support was dropped from st/dri it makes no sense to keep this code around.
Diffstat (limited to 'src/gallium/winsys/nouveau')
-rw-r--r--src/gallium/winsys/nouveau/drm/nouveau_drm_api.c72
-rw-r--r--src/gallium/winsys/nouveau/drm/nouveau_drm_api.h1
2 files changed, 0 insertions, 73 deletions
diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_api.c b/src/gallium/winsys/nouveau/drm/nouveau_drm_api.c
index c0047859b18..6d3255678f9 100644
--- a/src/gallium/winsys/nouveau/drm/nouveau_drm_api.c
+++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_api.c
@@ -13,52 +13,6 @@
#include "nouveau/nouveau_winsys.h"
#include "nouveau/nouveau_screen.h"
-static struct pipe_surface *
-dri_surface_from_handle(struct drm_api *api, struct pipe_screen *pscreen,
- unsigned handle, enum pipe_format format,
- unsigned width, unsigned height, unsigned pitch)
-{
- struct pipe_surface *ps = NULL;
- struct pipe_resource *pt = NULL;
- struct pipe_resource tmpl;
- struct winsys_handle whandle;
- unsigned bind = (PIPE_BIND_SCANOUT |
- PIPE_BIND_RENDER_TARGET);
-
- memset(&tmpl, 0, sizeof(tmpl));
- tmpl.bind = bind;
- tmpl.target = PIPE_TEXTURE_2D;
- tmpl.last_level = 0;
- tmpl.depth0 = 1;
- tmpl.format = format;
- tmpl.width0 = width;
- tmpl.height0 = height;
-
- memset(&whandle, 0, sizeof(whandle));
- whandle.stride = pitch;
- whandle.handle = handle;
-
- pt = pscreen->resource_from_handle(pscreen, &tmpl, &whandle);
- if (!pt)
- return NULL;
-
- ps = pscreen->get_tex_surface(pscreen, pt, 0, 0, 0, bind);
-
- /* we don't need the texture from this point on */
- pipe_resource_reference(&pt, NULL);
- return ps;
-}
-
-static struct pipe_surface *
-nouveau_dri1_front_surface(struct pipe_context *pipe)
-{
- return nouveau_winsys_screen(pipe->screen)->front;
-}
-
-static struct dri1_api nouveau_dri1_api = {
- nouveau_dri1_front_surface,
-};
-
static void
nouveau_drm_destroy_winsys(struct pipe_winsys *s)
{
@@ -72,7 +26,6 @@ static struct pipe_screen *
nouveau_drm_create_screen(struct drm_api *api, int fd,
struct drm_create_screen_arg *arg)
{
- struct dri1_create_screen_arg *dri1 = (void *)arg;
struct nouveau_winsys *nvws;
struct pipe_winsys *ws;
struct nouveau_device *dev = NULL;
@@ -116,31 +69,6 @@ nouveau_drm_create_screen(struct drm_api *api, int fd,
return NULL;
}
- if (arg && arg->mode == DRM_CREATE_DRI1) {
- struct nouveau_dri *nvdri = dri1->ddx_info;
- enum pipe_format format;
-
- if (nvdri->bpp == 16)
- format = PIPE_FORMAT_B5G6R5_UNORM;
- else
- format = PIPE_FORMAT_B8G8R8A8_UNORM;
-
- nvws->front = dri_surface_from_handle(api, nvws->pscreen,
- nvdri->front_offset,
- format, nvdri->width,
- nvdri->height,
- nvdri->front_pitch *
- (nvdri->bpp / 8));
- if (!nvws->front) {
- debug_printf("%s: error referencing front buffer\n",
- __func__);
- ws->destroy(ws);
- return NULL;
- }
-
- dri1->api = &nouveau_dri1_api;
- }
-
return nvws->pscreen;
}
diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_api.h b/src/gallium/winsys/nouveau/drm/nouveau_drm_api.h
index a91aad7df8e..ba6305c17e7 100644
--- a/src/gallium/winsys/nouveau/drm/nouveau_drm_api.h
+++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_api.h
@@ -2,7 +2,6 @@
#define __NOUVEAU_DRM_API_H__
#include "state_tracker/drm_api.h"
-#include "state_tracker/dri1_api.h"
#include "util/u_simple_screen.h"