diff options
author | Christian König <[email protected]> | 2010-12-11 13:43:44 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2010-12-11 13:43:44 +0100 |
commit | 772b25e1f366edc857e77b8c1ccdc5297d82cc41 (patch) | |
tree | 88d38b52e80319dbd4a0c5b5e038d92f1105110a /src/gallium/targets | |
parent | ab130400cf91ab471e265e58193c95f04c7aeeda (diff) | |
parent | b3d2ec9942303d1d03e28a25b030eb060415abfb (diff) |
Merge remote branch 'origin/master' into pipe-video
Conflicts:
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_texture.c
Diffstat (limited to 'src/gallium/targets')
-rw-r--r-- | src/gallium/targets/egl/egl.c | 24 | ||||
-rw-r--r-- | src/gallium/targets/libgl-gdi/libgl_gdi.c | 6 | ||||
-rw-r--r-- | src/gallium/targets/xorg-vmwgfx/vmw_video.c | 25 |
3 files changed, 46 insertions, 9 deletions
diff --git a/src/gallium/targets/egl/egl.c b/src/gallium/targets/egl/egl.c index 786d5d1105e..bb182ba9845 100644 --- a/src/gallium/targets/egl/egl.c +++ b/src/gallium/targets/egl/egl.c @@ -100,9 +100,14 @@ load_st_module(struct st_module *stmod, { struct st_api *(*create_api)(void); - _eglLog(_EGL_DEBUG, "searching for st module %s", name); + if (name) { + _eglLog(_EGL_DEBUG, "searching for st module %s", name); + stmod->name = loader_strdup(name); + } + else { + stmod->name = NULL; + } - stmod->name = loader_strdup(name); if (stmod->name) _eglSearchPathForEach(dlopen_st_module_cb, (void *) stmod); else @@ -232,6 +237,21 @@ get_st_api_full(enum st_api_type api, enum st_profile_type profile) break; } + /* try again with libGL.so loaded */ + if (!stmod->stapi && api == ST_API_OPENGL) { + struct util_dl_library *glapi = util_dl_open("libGL" UTIL_DL_EXT); + + if (glapi) { + _eglLog(_EGL_DEBUG, "retry with libGL" UTIL_DL_EXT " loaded"); + /* skip the last name (which is NULL) */ + for (i = 0; i < count - 1; i++) { + if (load_st_module(stmod, names[i], symbol)) + break; + } + util_dl_close(glapi); + } + } + if (!stmod->stapi) { EGLint level = (egl_g3d_loader.profile_masks[api]) ? _EGL_WARNING : _EGL_DEBUG; diff --git a/src/gallium/targets/libgl-gdi/libgl_gdi.c b/src/gallium/targets/libgl-gdi/libgl_gdi.c index 1d6e664eabd..112904ab5fe 100644 --- a/src/gallium/targets/libgl-gdi/libgl_gdi.c +++ b/src/gallium/targets/libgl-gdi/libgl_gdi.c @@ -100,7 +100,7 @@ no_winsys: static void gdi_present(struct pipe_screen *screen, - struct pipe_surface *surface, + struct pipe_resource *res, HDC hDC) { /* This will fail if any interposing layer (trace, debug, etc) has @@ -119,14 +119,14 @@ gdi_present(struct pipe_screen *screen, #ifdef HAVE_LLVMPIPE if (use_llvmpipe) { winsys = llvmpipe_screen(screen)->winsys; - dt = llvmpipe_resource(surface->texture)->dt; + dt = llvmpipe_resource(res)->dt; gdi_sw_display(winsys, dt, hDC); return; } #endif winsys = softpipe_screen(screen)->winsys, - dt = softpipe_resource(surface->texture)->dt, + dt = softpipe_resource(res)->dt, gdi_sw_display(winsys, dt, hDC); } diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_video.c b/src/gallium/targets/xorg-vmwgfx/vmw_video.c index 94465e52043..7979209993d 100644 --- a/src/gallium/targets/xorg-vmwgfx/vmw_video.c +++ b/src/gallium/targets/xorg-vmwgfx/vmw_video.c @@ -362,8 +362,10 @@ vmw_video_close(struct vmw_customizer *vmw) /* make sure the port is stoped as well */ vmw_xv_stop_video(pScrn, &video->port[i], TRUE); vmw_ioctl_unref_stream(vmw, video->port[i].streamId); + REGION_UNINIT(pScreen, &video->port[i].clipBoxes); } + /* XXX: I'm sure this function is missing code for turning off Xv */ free(vmw->video_priv); @@ -448,7 +450,16 @@ vmw_video_init_adaptor(ScrnInfoPtr pScrn, struct vmw_customizer *vmw) vmw->video_priv = video; adaptor->type = XvInputMask | XvImageMask | XvWindowMask; - adaptor->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; + + /** + * Note: CLIP_TO_VIEWPORT was removed from the flags, since with the + * crtc/output based modesetting, the viewport is not updated on + * RandR modeswitches. Hence the video may incorrectly be clipped away. + * The correct approach, (if needed) would be to clip against the + * scanout area union of all active crtcs. Revisit if needed. + */ + + adaptor->flags = VIDEO_OVERLAID_IMAGES; adaptor->name = "VMware Video Engine"; adaptor->nEncodings = VMWARE_VID_NUM_ENCODINGS; adaptor->pEncodings = vmwareVideoEncodings; @@ -463,6 +474,7 @@ vmw_video_init_adaptor(ScrnInfoPtr pScrn, struct vmw_customizer *vmw) video->port[i].flags = SVGA_VIDEO_FLAG_COLORKEY; video->port[i].colorKey = VMWARE_VIDEO_COLORKEY; video->port[i].isAutoPaintColorkey = TRUE; + REGION_NULL(pScrn->pScreen, &video->port[i].clipBoxes); adaptor->pPortPrivates[i].ptr = &video->port[i]; } @@ -554,7 +566,9 @@ vmw_video_port_init(ScrnInfoPtr pScrn, struct vmw_video_port *port, REGION_COPY(pScrn->pScreen, &port->clipBoxes, clipBoxes); if (port->isAutoPaintColorkey) - xf86XVFillKeyHelper(pScrn->pScreen, port->colorKey, clipBoxes); + xf86XVFillKeyHelper(pScrn->pScreen, port->colorKey, clipBoxes); + + xorg_flush(pScrn->pScreen); return port->play(pScrn, port, src_x, src_y, drw_x, drw_y, src_w, src_h, drw_w, drw_h, format, buf, width, height, clipBoxes); @@ -641,11 +655,12 @@ vmw_video_port_play(ScrnInfoPtr pScrn, struct vmw_video_port *port, */ if (!REGION_EQUAL(pScrn->pScreen, &port->clipBoxes, clipBoxes)) { REGION_COPY(pScrn->pScreen, &port->clipBoxes, clipBoxes); - if (port->isAutoPaintColorkey) { + if (port->isAutoPaintColorkey) xf86XVFillKeyHelper(pScrn->pScreen, port->colorKey, clipBoxes); - } } + xorg_flush(pScrn->pScreen); + ret = drmCommandWrite(vmw->fd, DRM_VMW_CONTROL_STREAM, &arg, sizeof(arg)); if (ret) { vmw_video_port_cleanup(pScrn, port); @@ -865,6 +880,8 @@ vmw_xv_stop_video(ScrnInfoPtr pScrn, pointer data, Bool cleanup) if (!vmw->video_priv) return; + REGION_EMPTY(pScrn->pScreen, &port->clipBoxes); + if (!cleanup) return; |