xf86-video-intel: 2 commits - src/sna/gen3_render.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Mar 4 02:11:41 PST 2013
src/sna/gen3_render.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
New commits:
commit ad05039cc83b40cf45c8221d69506d6c88c27a86
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Mar 4 10:11:22 2013 +0000
sna/gen3: Always prefer BLT for copies
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index 17b114d..3313e3e 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -5774,8 +5774,7 @@ gen3_render_copy(struct sna *sna, uint8_t alu,
#endif
/* Prefer to use the BLT */
- if (sna->kgem.mode != KGEM_RENDER &&
- sna_blt_compare_depth(&src->drawable, &dst->drawable) &&
+ if (sna_blt_compare_depth(&src->drawable, &dst->drawable) &&
sna_blt_copy(sna, alu,
src_bo, dst_bo,
dst->drawable.bitsPerPixel,
commit 59f030dd27eff5fbf9ddcd22faa3087bc9c5ff54
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Mar 4 10:10:39 2013 +0000
sna/gen3: Perform alpha-fixup upon copy sources
This is required for copying from depth-15 surfaces onto other depths.
Reported-by: Reinis Danne
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index 68dcc72..17b114d 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -5554,6 +5554,8 @@ gen3_render_copy_setup_source(struct sna_composite_channel *channel,
PixmapPtr pixmap,
struct kgem_bo *bo)
{
+ int i;
+
channel->u.gen3.type = SHADER_TEXTURE;
channel->filter = gen3_filter(PictFilterNearest);
channel->repeat = gen3_texture_repeat(RepeatNone);
@@ -5563,9 +5565,20 @@ gen3_render_copy_setup_source(struct sna_composite_channel *channel,
channel->scale[1] = 1.f/pixmap->drawable.height;
channel->offset[0] = 0;
channel->offset[1] = 0;
- gen3_composite_channel_set_format(channel,
- sna_format_for_depth(pixmap->drawable.depth));
+
+ channel->pict_format = sna_format_for_depth(pixmap->drawable.depth);
+ if (!gen3_composite_channel_set_format(channel, channel->pict_format)) {
+ for (i = 0; i < ARRAY_SIZE(gen3_tex_formats); i++) {
+ if (gen3_tex_formats[i].xfmt == channel->pict_format) {
+ channel->card_format = gen3_tex_formats[i].card_fmt;
+ channel->rb_reversed = gen3_tex_formats[i].rb_reversed;
+ channel->alpha_fixup = true;
+ break;
+ }
+ }
+ }
assert(channel->card_format);
+
channel->bo = bo;
channel->is_affine = 1;
}
More information about the xorg-commit
mailing list