summaryrefslogtreecommitdiff
path: root/src/r600_textured_videofuncs.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-04-01 10:45:52 +1000
committerDave Airlie <airlied@redhat.com>2010-04-01 12:37:04 +1000
commit478319e55d52fce241d040912fea952071e3b742 (patch)
tree7ad27bb6d5fd2993836950f7a04288d9664d8d92 /src/r600_textured_videofuncs.c
parentbc93395b3eb5e3511c1b62af90693269f4fa6e13 (diff)
r600: reduce function call overhead.
Create a small accel object that can be used to reduce the amount of parameters passed to SetAccelState. This can be cleaned up a lot more. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/r600_textured_videofuncs.c')
-rw-r--r--src/r600_textured_videofuncs.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/r600_textured_videofuncs.c b/src/r600_textured_videofuncs.c
index fc7b40d2..204309a4 100644
--- a/src/r600_textured_videofuncs.c
+++ b/src/r600_textured_videofuncs.c
@@ -67,6 +67,7 @@ R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
int dstxoff, dstyoff;
uint32_t src_offset, dst_offset, dst_pitch;
struct radeon_bo *dst_bo = NULL;
+ struct accel_object src_obj, dst_obj;
cb_config_t cb_conf;
tex_resource_t tex_res;
tex_sampler_t tex_samp;
@@ -177,16 +178,26 @@ R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
}
dst_pitch = exaGetPixmapPitch(pPixmap) / (pPixmap->drawable.bitsPerPixel / 8);
+ src_obj.pitch = pPriv->src_pitch;
+ src_obj.width = pPriv->w;
+ src_obj.height = pPriv->h;
+ src_obj.offset = src_offset;
+ src_obj.bpp = 16;
+ src_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT;
+ src_obj.bo = pPriv->src_bo[pPriv->currentBuffer];
+
+ dst_obj.pitch = dst_pitch;
+ dst_obj.width = pPixmap->drawable.width;
+ dst_obj.height = pPixmap->drawable.height;
+ dst_obj.offset = dst_offset;
+ dst_obj.bo = dst_bo;
+ dst_obj.bpp = pPixmap->drawable.bitsPerPixel;
+ dst_obj.domain = RADEON_GEM_DOMAIN_VRAM;
+
if (!R600SetAccelState(pScrn,
- pPriv->src_pitch, pPriv->w, pPriv->h,
- src_offset, pPriv->src_bo[pPriv->currentBuffer], 16,
- RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT,
- 0, 0, 0,
- 0, NULL, 0,
- 0,
- dst_pitch, pPixmap->drawable.width, pPixmap->drawable.height,
- dst_offset, dst_bo, pPixmap->drawable.bitsPerPixel,
- RADEON_GEM_DOMAIN_VRAM,
+ &src_obj,
+ NULL,
+ &dst_obj,
accel_state->xv_vs_offset, accel_state->xv_ps_offset,
3, 0xffffffff))
return;