diff options
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d.c | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/egl/drm/native_drm.c | 33 | ||||
-rw-r--r-- | src/gallium/state_trackers/egl/wayland/native_drm.c | 40 | ||||
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/glx_getproc.c | 3 |
4 files changed, 10 insertions, 70 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c index 4bd865638a3..29dbbefbf48 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d.c @@ -259,6 +259,10 @@ init_config_attributes(_EGLConfig *conf, const struct native_config *nconf, conf->DepthSize = depth_stencil[0]; conf->StencilSize = depth_stencil[1]; + /* st/vega will allocate the mask on demand */ + if (api_mask & EGL_OPENVG_BIT) + conf->AlphaMaskSize = 8; + conf->SurfaceType = surface_type; conf->NativeRenderable = EGL_TRUE; diff --git a/src/gallium/state_trackers/egl/drm/native_drm.c b/src/gallium/state_trackers/egl/drm/native_drm.c index c89a6d4767e..725fe28e4e2 100644 --- a/src/gallium/state_trackers/egl/drm/native_drm.c +++ b/src/gallium/state_trackers/egl/drm/native_drm.c @@ -33,10 +33,6 @@ #include "native_drm.h" -/* see get_drm_screen_name */ -#include <radeon_drm.h> -#include "radeon/drm/radeon_drm_public.h" - #ifdef HAVE_LIBUDEV #include <libudev.h> #endif @@ -140,27 +136,6 @@ drm_display_destroy(struct native_display *ndpy) FREE(drmdpy); } -static const char * -get_drm_screen_name(int fd, drmVersionPtr version) -{ - const char *name = version->name; - - if (name && !strcmp(name, "radeon")) { - int chip_id; - struct drm_radeon_info info; - - memset(&info, 0, sizeof(info)); - info.request = RADEON_INFO_DEVICE_ID; - info.value = pointer_to_intptr(&chip_id); - if (drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info)) != 0) - return NULL; - - name = is_r3xx(chip_id) ? "r300" : "r600"; - } - - return name; -} - /** * Initialize KMS and pipe screen. */ @@ -169,7 +144,6 @@ drm_display_init_screen(struct native_display *ndpy) { struct drm_display *drmdpy = drm_display(ndpy); drmVersionPtr version; - const char *name; version = drmGetVersion(drmdpy->fd); if (!version) { @@ -177,11 +151,8 @@ drm_display_init_screen(struct native_display *ndpy) return FALSE; } - name = get_drm_screen_name(drmdpy->fd, version); - if (name) { - drmdpy->base.screen = - drmdpy->event_handler->new_drm_screen(&drmdpy->base, name, drmdpy->fd); - } + drmdpy->base.screen = + drmdpy->event_handler->new_drm_screen(&drmdpy->base, NULL, drmdpy->fd); drmFreeVersion(version); if (!drmdpy->base.screen) { diff --git a/src/gallium/state_trackers/egl/wayland/native_drm.c b/src/gallium/state_trackers/egl/wayland/native_drm.c index f643c7cbbba..15383e89301 100644 --- a/src/gallium/state_trackers/egl/wayland/native_drm.c +++ b/src/gallium/state_trackers/egl/wayland/native_drm.c @@ -37,10 +37,6 @@ #include "native_wayland.h" -/* see get_drm_screen_name */ -#include <radeon_drm.h> -#include "radeon/drm/radeon_drm_public.h" - #include <wayland-client.h> #include "wayland-drm-client-protocol.h" #include "wayland-egl-priv.h" @@ -143,27 +139,6 @@ wayland_create_drm_buffer(struct wayland_display *display, width, height, wsh.stride, visual); } -static const char * -get_drm_screen_name(int fd, drmVersionPtr version) -{ - const char *name = version->name; - - if (name && !strcmp(name, "radeon")) { - int chip_id; - struct drm_radeon_info info; - - memset(&info, 0, sizeof(info)); - info.request = RADEON_INFO_DEVICE_ID; - info.value = pointer_to_intptr(&chip_id); - if (drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info)) != 0) - return NULL; - - name = is_r3xx(chip_id) ? "r300" : "r600"; - } - - return name; -} - static void drm_handle_device(void *data, struct wl_drm *drm, const char *device) { @@ -202,8 +177,6 @@ static boolean wayland_drm_display_init_screen(struct native_display *ndpy) { struct wayland_drm_display *drmdpy = wayland_drm_display(ndpy); - drmVersionPtr version; - const char *driver_name; uint32_t id; id = wl_display_get_global(drmdpy->base.dpy, "wl_drm", 1); @@ -226,20 +199,9 @@ wayland_drm_display_init_screen(struct native_display *ndpy) if (!drmdpy->authenticated) return FALSE; - version = drmGetVersion(drmdpy->fd); - if (!version) { - _eglLog(_EGL_WARNING, "invalid fd %d", drmdpy->fd); - return FALSE; - } - - /* FIXME: share this with native_drm or egl_dri2 */ - driver_name = get_drm_screen_name(drmdpy->fd, version); - drmdpy->base.base.screen = drmdpy->event_handler->new_drm_screen(&drmdpy->base.base, - driver_name, drmdpy->fd); - drmFreeVersion(version); - + NULL, drmdpy->fd); if (!drmdpy->base.base.screen) { _eglLog(_EGL_WARNING, "failed to create DRM screen"); return FALSE; diff --git a/src/gallium/state_trackers/glx/xlib/glx_getproc.c b/src/gallium/state_trackers/glx/xlib/glx_getproc.c index 26fcae78ece..bc29c31ffa7 100644 --- a/src/gallium/state_trackers/glx/xlib/glx_getproc.c +++ b/src/gallium/state_trackers/glx/xlib/glx_getproc.c @@ -168,6 +168,9 @@ static struct name_address_pair GLX_functions[] = { /*** GLX_ARB_get_proc_address ***/ { "glXGetProcAddressARB", (__GLXextFuncPtr) glXGetProcAddressARB }, + /*** GLX_ARB_create_context ***/ + { "glXCreateContextAttribsARB", (__GLXextFuncPtr) glXCreateContextAttribsARB }, + /*** GLX_EXT_texture_from_pixmap ***/ { "glXBindTexImageEXT", (__GLXextFuncPtr) glXBindTexImageEXT }, { "glXReleaseTexImageEXT", (__GLXextFuncPtr) glXReleaseTexImageEXT }, |