aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/svga
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/svga
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/svga')
-rw-r--r--src/gallium/winsys/svga/drm/vmw_screen_dri.c108
1 files changed, 7 insertions, 101 deletions
diff --git a/src/gallium/winsys/svga/drm/vmw_screen_dri.c b/src/gallium/winsys/svga/drm/vmw_screen_dri.c
index f4c1642f2d4..4a710564b43 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen_dri.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen_dri.c
@@ -37,13 +37,18 @@
#include "vmw_fence.h"
#include "vmw_context.h"
-#include <state_tracker/dri1_api.h>
#include <state_tracker/drm_api.h>
#include "vmwgfx_drm.h"
#include <xf86drm.h>
#include <stdio.h>
+struct dri1_api_version {
+ int major;
+ int minor;
+ int patch_level;
+};
+
static struct svga_winsys_surface *
vmw_drm_surface_from_handle(struct svga_winsys_screen *sws,
struct winsys_handle *whandle,
@@ -54,11 +59,6 @@ vmw_drm_surface_get_handle(struct svga_winsys_screen *sws,
unsigned stride,
struct winsys_handle *whandle);
-static struct dri1_api dri1_api_hooks;
-static struct dri1_api_version ddx_required = { 0, 1, 0 };
-static struct dri1_api_version ddx_compat = { 0, 0, 0 };
-static struct dri1_api_version dri_required = { 4, 0, 0 };
-static struct dri1_api_version dri_compat = { 4, 0, 0 };
static struct dri1_api_version drm_required = { 1, 0, 0 };
static struct dri1_api_version drm_compat = { 1, 0, 0 };
static struct dri1_api_version drm_scanout = { 0, 9, 0 };
@@ -95,7 +95,6 @@ vmw_drm_create_screen(struct drm_api *drm_api,
{
struct vmw_winsys_screen *vws;
struct pipe_screen *screen;
- struct dri1_create_screen_arg *dri1;
boolean use_old_scanout_flag = FALSE;
if (!arg || arg->mode == DRM_CREATE_NORMAL) {
@@ -124,27 +123,6 @@ vmw_drm_create_screen(struct drm_api *drm_api,
switch (arg->mode) {
case DRM_CREATE_NORMAL:
break;
- case DRM_CREATE_DRI1:
- dri1 = (struct dri1_create_screen_arg *)arg;
- if (!vmw_dri1_check_version(&dri1->ddx_version, &ddx_required,
- &ddx_compat, "ddx - driver api"))
- return NULL;
- if (!vmw_dri1_check_version(&dri1->dri_version, &dri_required,
- &dri_compat, "dri info"))
- return NULL;
- if (!vmw_dri1_check_version(&dri1->drm_version, &drm_required,
- &drm_compat, "vmwgfx drm driver"))
- return NULL;
- if (!vmw_dri1_check_version(&dri1->drm_version, &drm_scanout,
- &drm_compat, "use old scanout field (not a error)"))
- use_old_scanout_flag = TRUE;
- dri1->api = &dri1_api_hooks;
-#if 0
- break;
-#else
- assert(!"No dri 1 support for now\n");
- return NULL;
-#endif
default:
return NULL;
}
@@ -205,72 +183,6 @@ vmw_dri1_intersect_src_bbox(struct drm_clip_rect *dst,
return TRUE;
}
-/**
- * No fancy get-surface-from-sarea stuff here.
- * Just use the present blit.
- */
-
-static void
-vmw_dri1_present_locked(struct pipe_context *locked_pipe,
- struct pipe_surface *surf,
- const struct drm_clip_rect *rect,
- unsigned int num_clip,
- int x_draw, int y_draw,
- const struct drm_clip_rect *bbox,
- struct pipe_fence_handle **p_fence)
-{
-#if 0
- struct svga_winsys_surface *srf =
- svga_screen_texture_get_winsys_surface(surf->texture);
- struct vmw_svga_winsys_surface *vsrf = vmw_svga_winsys_surface(srf);
- struct vmw_winsys_screen *vws =
- vmw_winsys_screen(svga_winsys_screen(locked_pipe->screen));
- struct drm_clip_rect clip;
- int i;
- struct
- {
- SVGA3dCmdHeader header;
- SVGA3dCmdPresent body;
- SVGA3dCopyRect rect;
- } cmd;
- boolean visible = FALSE;
- uint32_t fence_seq = 0;
-
- VMW_FUNC;
- cmd.header.id = SVGA_3D_CMD_PRESENT;
- cmd.header.size = sizeof cmd.body + sizeof cmd.rect;
- cmd.body.sid = vsrf->sid;
-
- for (i = 0; i < num_clip; ++i) {
- if (!vmw_dri1_intersect_src_bbox(&clip, x_draw, y_draw, rect++, bbox))
- continue;
-
- cmd.rect.x = clip.x1;
- cmd.rect.y = clip.y1;
- cmd.rect.w = clip.x2 - clip.x1;
- cmd.rect.h = clip.y2 - clip.y1;
- cmd.rect.srcx = (int)clip.x1 - x_draw;
- cmd.rect.srcy = (int)clip.y1 - y_draw;
-
- vmw_printf("%s: Clip %d x %d y %d w %d h %d srcx %d srcy %d\n",
- __FUNCTION__,
- i,
- cmd.rect.x,
- cmd.rect.y,
- cmd.rect.w, cmd.rect.h, cmd.rect.srcx, cmd.rect.srcy);
-
- vmw_ioctl_command(vws, &cmd, sizeof cmd.header + cmd.header.size,
- &fence_seq);
- visible = TRUE;
- }
-
- *p_fence = (visible) ? vmw_pipe_fence(fence_seq) : NULL;
- vmw_svga_winsys_surface_reference(&vsrf, NULL);
-#else
- assert(!"No dri 1 support for now\n");
-#endif
-}
-
static struct svga_winsys_surface *
vmw_drm_surface_from_handle(struct svga_winsys_screen *sws,
struct winsys_handle *whandle,
@@ -317,7 +229,7 @@ vmw_drm_surface_from_handle(struct svga_winsys_screen *sws,
whandle->handle, i);
goto out_mip;
}
- }
+ }
vsrf = CALLOC_STRUCT(vmw_svga_winsys_surface);
if (!vsrf)
@@ -355,12 +267,6 @@ vmw_drm_surface_get_handle(struct svga_winsys_screen *sws,
return TRUE;
}
-
-static struct dri1_api dri1_api_hooks = {
- .front_srf_locked = NULL,
- .present_locked = vmw_dri1_present_locked
-};
-
static struct drm_api vmw_drm_api_hooks = {
.name = "vmwgfx",
.driver_name = "vmwgfx",