diff options
author | Keith Whitwell <[email protected]> | 2009-11-25 18:41:11 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-11-26 11:23:36 +0000 |
commit | 7fbdbad5c02e3d5bfbf0e641e2aec224e39fa974 (patch) | |
tree | d074d29b2eb11c60e46523dc2d02d5a253bc2f1b /src/gallium/state_trackers/xorg/xorg_xv.c | |
parent | 808f0376607b0e2d31dfebc888fd8f1e737fed09 (diff) |
st/xorg: consolidate some dest surface state setting
Diffstat (limited to 'src/gallium/state_trackers/xorg/xorg_xv.c')
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_xv.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c index a8f74ceea29..7a43da89887 100644 --- a/src/gallium/state_trackers/xorg/xorg_xv.c +++ b/src/gallium/state_trackers/xorg/xorg_xv.c @@ -318,21 +318,6 @@ copy_packed_data(ScrnInfoPtr pScrn, static void -setup_vs_video_constants(struct xorg_renderer *r, struct exa_pixmap_priv *dst) -{ - int width = dst->tex->width[0]; - int height = dst->tex->height[0]; - const int param_bytes = 8 * sizeof(float); - float vs_consts[8] = { - 2.f/width, 2.f/height, 1, 1, - -1, -1, 0, 0 - }; - - renderer_set_constants(r, PIPE_SHADER_VERTEX, - vs_consts, param_bytes); -} - -static void setup_fs_video_constants(struct xorg_renderer *r, boolean hdtv) { const int param_bytes = 12 * sizeof(float); @@ -445,6 +430,7 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id, Bool hdtv; int x, y, w, h; struct exa_pixmap_priv *dst = exaGetPixmapDriverPrivate(pPixmap); + struct pipe_surface *dst_surf = xorg_gpu_surface(pPriv->r->pipe->screen, dst); if (dst && !dst->tex) { xorg_exa_set_shared_usage(pPixmap); @@ -465,13 +451,11 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id, pbox = REGION_RECTS(dstRegion); nbox = REGION_NUM_RECTS(dstRegion); - renderer_bind_framebuffer(pPriv->r, dst); - renderer_bind_viewport(pPriv->r, dst); + renderer_bind_destination(pPriv->r, dst_surf); bind_blend_state(pPriv); renderer_bind_rasterizer(pPriv->r); bind_shaders(pPriv); bind_samplers(pPriv); - setup_vs_video_constants(pPriv->r, dst); setup_fs_video_constants(pPriv->r, hdtv); exaMoveInPixmap(pPixmap); |