diff options
author | Chia-I Wu <[email protected]> | 2010-04-09 17:27:06 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-04-09 17:52:37 +0800 |
commit | f69b35fa15f43747dde29addaeec845604d7e127 (patch) | |
tree | c3806d31c350a7fa461b29ea47eca7a758d989ca /src/gallium/state_trackers/egl/kms | |
parent | 08100aa44449e9f43d7b3b7b195d68185c109703 (diff) |
st/egl: Remove pbuffer from the native interface.
A pbuffer is an EGL resource. It does not need a native display to
create.
Diffstat (limited to 'src/gallium/state_trackers/egl/kms')
-rw-r--r-- | src/gallium/state_trackers/egl/kms/native_kms.c | 32 | ||||
-rw-r--r-- | src/gallium/state_trackers/egl/kms/native_kms.h | 6 |
2 files changed, 3 insertions, 35 deletions
diff --git a/src/gallium/state_trackers/egl/kms/native_kms.c b/src/gallium/state_trackers/egl/kms/native_kms.c index 31747744907..46d3b1c8b1e 100644 --- a/src/gallium/state_trackers/egl/kms/native_kms.c +++ b/src/gallium/state_trackers/egl/kms/native_kms.c @@ -53,9 +53,8 @@ kms_surface_validate(struct native_surface *nsurf, uint attachment_mask, templ.height0 = ksurf->height; templ.depth0 = 1; templ.format = ksurf->color_format; - templ.tex_usage = PIPE_TEXTURE_USAGE_RENDER_TARGET; - if (ksurf->type == KMS_SURFACE_TYPE_SCANOUT) - templ.tex_usage |= PIPE_TEXTURE_USAGE_SCANOUT; + templ.tex_usage = + PIPE_TEXTURE_USAGE_RENDER_TARGET | PIPE_TEXTURE_USAGE_SCANOUT; } /* create textures */ @@ -155,10 +154,6 @@ kms_surface_flush_frontbuffer(struct native_surface *nsurf) struct kms_surface *ksurf = kms_surface(nsurf); struct kms_display *kdpy = ksurf->kdpy; - /* pbuffer is private */ - if (ksurf->type == KMS_SURFACE_TYPE_PBUFFER) - return TRUE; - if (ksurf->front_fb.is_passive) drmModeDirtyFB(kdpy->fd, ksurf->front_fb.buffer_id, NULL, 0); #endif @@ -176,10 +171,6 @@ kms_surface_swap_buffers(struct native_surface *nsurf) struct pipe_texture *tmp_texture; int err; - /* pbuffer is private */ - if (ksurf->type == KMS_SURFACE_TYPE_PBUFFER) - return TRUE; - if (!ksurf->back_fb.buffer_id) { if (!kms_surface_init_framebuffers(&ksurf->base, TRUE)) return FALSE; @@ -244,7 +235,6 @@ kms_surface_destroy(struct native_surface *nsurf) static struct kms_surface * kms_display_create_surface(struct native_display *ndpy, - enum kms_surface_type type, const struct native_config *nconf, uint width, uint height) { @@ -257,7 +247,6 @@ kms_display_create_surface(struct native_display *ndpy, return NULL; ksurf->kdpy = kdpy; - ksurf->type = type; ksurf->color_format = kconf->base.color_format; ksurf->width = width; ksurf->height = height; @@ -567,24 +556,10 @@ kms_display_create_scanout_surface(struct native_display *ndpy, { struct kms_surface *ksurf; - ksurf = kms_display_create_surface(ndpy, - KMS_SURFACE_TYPE_SCANOUT, nconf, width, height); - return &ksurf->base; -} - -static struct native_surface * -kms_display_create_pbuffer_surface(struct native_display *ndpy, - const struct native_config *nconf, - uint width, uint height) -{ - struct kms_surface *ksurf; - - ksurf = kms_display_create_surface(ndpy, - KMS_SURFACE_TYPE_PBUFFER, nconf, width, height); + ksurf = kms_display_create_surface(ndpy, nconf, width, height); return &ksurf->base; } - static boolean kms_display_is_format_supported(struct native_display *ndpy, enum pipe_format fmt, boolean is_color) @@ -832,7 +807,6 @@ kms_create_display(EGLNativeDisplayType dpy, kdpy->base.destroy = kms_display_destroy; kdpy->base.get_param = kms_display_get_param; kdpy->base.get_configs = kms_display_get_configs; - kdpy->base.create_pbuffer_surface = kms_display_create_pbuffer_surface; kdpy->base.modeset = &kms_display_modeset; diff --git a/src/gallium/state_trackers/egl/kms/native_kms.h b/src/gallium/state_trackers/egl/kms/native_kms.h index f9cbcb158b5..b1d1b915b29 100644 --- a/src/gallium/state_trackers/egl/kms/native_kms.h +++ b/src/gallium/state_trackers/egl/kms/native_kms.h @@ -35,11 +35,6 @@ #include "common/native.h" -enum kms_surface_type { - KMS_SURFACE_TYPE_PBUFFER, - KMS_SURFACE_TYPE_SCANOUT -}; - struct kms_config; struct kms_connector; struct kms_mode; @@ -77,7 +72,6 @@ struct kms_framebuffer { struct kms_surface { struct native_surface base; - enum kms_surface_type type; enum pipe_format color_format; struct kms_display *kdpy; int width, height; |