int op:8;
unsigned rgb_src_factor:5; /**< PIPE_BLENDFACTOR_x */
- unsigned rgb_dst_factor:5; /**< PIPE_BLENDFACTOR_x */
-
unsigned alpha_src_factor:5; /**< PIPE_BLENDFACTOR_x */
+
+ unsigned rgb_dst_factor:5; /**< PIPE_BLENDFACTOR_x */
unsigned alpha_dst_factor:5; /**< PIPE_BLENDFACTOR_x */
};
assert(dst->width[0] != 0);
assert(dst->height[0] != 0);
-#if 0
- debug_printf("copy texture [%f, %f, %f, %f], [%f, %f, %f, %f]\n",
- sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2);
-#endif
-
#if 1
s0 = sx1 / src->width[0];
s1 = sx2 / src->width[0];
t1 = 1;
#endif
+#if 1
+ debug_printf("copy texture src=[%f, %f, %f, %f], dst=[%f, %f, %f, %f], tex=[%f, %f, %f, %f]\n",
+ sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2,
+ s0, t0, s1, t1);
+#endif
+
assert(screen->is_format_supported(screen, dst_surf->format,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_RENDER_TARGET,
fb.cbufs[i] = 0;
}
cso_set_framebuffer(exa->cso, &fb);
+ setup_vs_constant_buffer(exa, fb.width, fb.height);
+ setup_fs_constant_buffer(exa);
/* draw quad */
buf = setup_vertex_data_tex(exa,
renderer_copy_texture(ctx,
src,
src_loc[0],
- src_loc[1] + src_loc[3],
- src_loc[0] + src_loc[2],
src_loc[1],
+ src_loc[0] + src_loc[2],
+ src_loc[1] + src_loc[3],
dst,
dst_loc[0],
- dst_loc[1] + dst_loc[3],
+ dst_loc[1],
dst_loc[0] + dst_loc[2],
- dst_loc[1]);
+ dst_loc[1] + dst_loc[3]);
}
}
#if 1
debug_printf(" ExaPrepareSolid(0x%x)\n", fg);
#endif
+
return xorg_solid_bind_state(exa, priv, fg);
}
#endif
#if DEBUG_SOLID
+ exa->solid_color[0] = 0.f;
+ exa->solid_color[1] = 1.f;
+ exa->solid_color[2] = 0.f;
+ exa->solid_color[3] = 1.f;
+ xorg_solid(exa, priv, 0, 0, 1024, 768);
+ exa->solid_color[0] = 1.f;
+ exa->solid_color[1] = 0.f;
+ exa->solid_color[2] = 0.f;
+ exa->solid_color[3] = 1.f;
xorg_solid(exa, priv, 0, 0, 300, 300);
xorg_solid(exa, priv, 300, 300, 350, 350);
xorg_solid(exa, priv, 350, 350, 500, 500);
priv->tex->height[0] - 10,
priv->tex->width[0],
priv->tex->height[0]);
+
+ ExaPrepareCopy(pPixmap, pPixmap, 0, 0, GXcopy, 0xffffffff);
+ ExaCopy(pPixmap, 350, 350, 510, 350, 150, 150);
+ ExaCopy(pPixmap, 350, 350, 510, 190, 150, 150);
+ xorg_exa_finish(exa);
+ ExaCopy(pPixmap, 0, 0, 0, 0, 1024, 768);
#else
xorg_solid(exa, priv, x0, y0, x1, y1) ;
#endif
struct pipe_surface *dst_surf;
struct pipe_surface *src_surf;
- dst_surf = exa->scrn->get_tex_surface(exa->scrn, texture, 0, 0, 0,
- PIPE_BUFFER_USAGE_GPU_WRITE);
+ dst_surf = exa->scrn->get_tex_surface(
+ exa->scrn, texture, 0, 0, 0, PIPE_BUFFER_USAGE_GPU_WRITE);
src_surf = exa_gpu_surface(exa, priv);
exa->pipe->surface_copy(exa->pipe, dst_surf, 0, 0, src_surf,
0, 0, min(width, texture->width[0]),