diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-07 10:29:40 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-07 15:09:21 +0100 |
commit | ad22003033eb502474ae538a97e3b42cf8f83880 (patch) | |
tree | 7794b7d1981427b141872a259920c3970122bd19 /src/i915_render.c | |
parent | 007c2f86cbb386861a1f711786523657f92e12cb (diff) |
i965: Avoid transform overheads for vertex emit where possible
Minor improvement as the bottlenecks lie elsewhere. But it was annoying me.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/i915_render.c')
-rw-r--r-- | src/i915_render.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/src/i915_render.c b/src/i915_render.c index d04e8e1e..87d2336c 100644 --- a/src/i915_render.c +++ b/src/i915_render.c @@ -387,15 +387,12 @@ static Bool i915_texture_setup(PicturePtr picture, PixmapPtr pixmap, int unit) } static void -i915_emit_composite_primitive_constant(PixmapPtr dest, +i915_emit_composite_primitive_constant(intel_screen_private *intel, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h) { - ScrnInfoPtr scrn = xf86Screens[dest->drawable.pScreen->myNum]; - intel_screen_private *intel = intel_get_screen_private(scrn); - OUT_VERTEX(dstX + w); OUT_VERTEX(dstY + h); @@ -407,15 +404,12 @@ i915_emit_composite_primitive_constant(PixmapPtr dest, } static void -i915_emit_composite_primitive_identity_source(PixmapPtr dest, +i915_emit_composite_primitive_identity_source(intel_screen_private *intel, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h) { - ScrnInfoPtr scrn = xf86Screens[dest->drawable.pScreen->myNum]; - intel_screen_private *intel = intel_get_screen_private(scrn); - OUT_VERTEX(dstX + w); OUT_VERTEX(dstY + h); OUT_VERTEX((srcX + w) * intel->scale_units[0][0]); @@ -433,14 +427,12 @@ i915_emit_composite_primitive_identity_source(PixmapPtr dest, } static void -i915_emit_composite_primitive_affine_source(PixmapPtr dest, +i915_emit_composite_primitive_affine_source(intel_screen_private *intel, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h) { - ScrnInfoPtr scrn = xf86Screens[dest->drawable.pScreen->myNum]; - intel_screen_private *intel = intel_get_screen_private(scrn); float src_x[3], src_y[3]; if (!intel_get_transformed_coordinates(srcX, srcY, @@ -478,15 +470,12 @@ i915_emit_composite_primitive_affine_source(PixmapPtr dest, } static void -i915_emit_composite_primitive_constant_identity_mask(PixmapPtr dest, +i915_emit_composite_primitive_constant_identity_mask(intel_screen_private *intel, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h) { - ScrnInfoPtr scrn = xf86Screens[dest->drawable.pScreen->myNum]; - intel_screen_private *intel = intel_get_screen_private(scrn); - OUT_VERTEX(dstX + w); OUT_VERTEX(dstY + h); OUT_VERTEX((maskX + w) * intel->scale_units[0][0]); @@ -504,15 +493,12 @@ i915_emit_composite_primitive_constant_identity_mask(PixmapPtr dest, } static void -i915_emit_composite_primitive_identity_source_mask(PixmapPtr dest, +i915_emit_composite_primitive_identity_source_mask(intel_screen_private *intel, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h) { - ScrnInfoPtr scrn = xf86Screens[dest->drawable.pScreen->myNum]; - intel_screen_private *intel = intel_get_screen_private(scrn); - OUT_VERTEX(dstX + w); OUT_VERTEX(dstY + h); OUT_VERTEX((srcX + w) * intel->scale_units[0][0]); @@ -536,14 +522,12 @@ i915_emit_composite_primitive_identity_source_mask(PixmapPtr dest, } static void -i915_emit_composite_primitive(PixmapPtr dest, +i915_emit_composite_primitive(intel_screen_private *intel, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h) { - ScrnInfoPtr scrn = xf86Screens[dest->drawable.pScreen->myNum]; - intel_screen_private *intel = intel_get_screen_private(scrn); Bool is_affine_src = TRUE, is_affine_mask = TRUE; int per_vertex; int tex_unit = 0; @@ -1160,7 +1144,7 @@ i915_composite(PixmapPtr dest, int srcX, int srcY, int maskX, int maskY, } intel->vertex_count += 3; - intel->prim_emit(dest, + intel->prim_emit(intel, srcX, srcY, maskX, maskY, dstX, dstY, |