diff options
author | Maciej Cencora <[email protected]> | 2009-11-23 22:14:48 +0100 |
---|---|---|
committer | Maciej Cencora <[email protected]> | 2009-11-23 22:14:48 +0100 |
commit | 5173d14cb5821637f22247d16be1b970f3762d6a (patch) | |
tree | e93826ec799fdbe513592e253278545e2584a7bf /src/gallium/state_trackers | |
parent | 18384af7491c408c4182b72807b02c11b55509f8 (diff) | |
parent | 960464e42dce138fde11c379ce7744bc4be14aa2 (diff) |
Merge commit 'origin/mesa_7_7_branch'
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/egl/egl_tracker.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_composite.c | 8 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_exa.c | 5 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_xv.c | 2 |
4 files changed, 13 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/egl/egl_tracker.c b/src/gallium/state_trackers/egl/egl_tracker.c index 5811c20f03e..745803c7eb0 100644 --- a/src/gallium/state_trackers/egl/egl_tracker.c +++ b/src/gallium/state_trackers/egl/egl_tracker.c @@ -88,11 +88,11 @@ drm_get_device_id(struct drm_device *device) } ret = fgets(path, sizeof( path ), file); + fclose(file); if (!ret) return; sscanf(path, "%x", &device->deviceID); - fclose(file); } static void diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c index 86a52077c3c..4dbb490ca51 100644 --- a/src/gallium/state_trackers/xorg/xorg_composite.c +++ b/src/gallium/state_trackers/xorg/xorg_composite.c @@ -151,11 +151,13 @@ render_filter_to_gallium(int xrender_filter, int *out_filter) case PictFilterBest: *out_filter = PIPE_TEX_FILTER_LINEAR; break; - default: - debug_printf("Unkown xrender filter\n"); case PictFilterConvolution: *out_filter = PIPE_TEX_FILTER_NEAREST; return FALSE; + default: + debug_printf("Unknown xrender filter\n"); + *out_filter = PIPE_TEX_FILTER_NEAREST; + return FALSE; } return TRUE; @@ -565,6 +567,8 @@ boolean xorg_solid_bind_state(struct exa_context *exa, renderer_bind_viewport(exa->renderer, pixmap); renderer_bind_rasterizer(exa->renderer); bind_blend_state(exa, PictOpSrc, NULL, NULL, NULL); + cso_set_samplers(exa->renderer->cso, 0, NULL); + cso_set_sampler_textures(exa->renderer->cso, 0, NULL); setup_constant_buffers(exa, pixmap); shader = xorg_shaders_get(exa->renderer->shaders, vs_traits, fs_traits); diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c index 3a51ad2d598..3d83b5700d5 100644 --- a/src/gallium/state_trackers/xorg/xorg_exa.c +++ b/src/gallium/state_trackers/xorg/xorg_exa.c @@ -230,6 +230,11 @@ ExaUploadToScreen(PixmapPtr pPix, int x, int y, int w, int h, char *src, if (!priv || !priv->tex) return FALSE; + /* make sure that any pending operations are flushed to hardware */ + if (exa->pipe->is_texture_referenced(exa->pipe, priv->tex, 0, 0) & + (PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE)) + xorg_exa_flush(exa, 0, NULL); + transfer = exa->scrn->get_tex_transfer(exa->scrn, priv->tex, 0, 0, 0, PIPE_TRANSFER_WRITE, x, y, w, h); if (!transfer) diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c index 76cd3ac1aa4..4a701e93ecc 100644 --- a/src/gallium/state_trackers/xorg/xorg_xv.c +++ b/src/gallium/state_trackers/xorg/xorg_xv.c @@ -447,7 +447,7 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id, int x, y, w, h; struct exa_pixmap_priv *dst = exaGetPixmapDriverPrivate(pPixmap); - if (!dst->tex) { + if (dst && !dst->tex) { xorg_exa_set_shared_usage(pPixmap); pScrn->pScreen->ModifyPixmapHeader(pPixmap, 0, 0, 0, 0, 0, NULL); } |