/* XXX: move to renderer_init_state? */
memset(&raster, 0, sizeof(struct pipe_rasterizer_state));
raster.gl_rasterization_rules = 1;
+ raster.depth_clip = 1;
cso_set_rasterizer(r->cso, &raster);
/* vertex elements state */
if (*cbuf) {
pipe_buffer_write(r->pipe, *cbuf, 0, param_bytes, params);
}
- r->pipe->set_constant_buffer(r->pipe, shader_type, 0, *cbuf);
+ pipe_set_constant_buffer(r->pipe, shader_type, 0, *cbuf);
}
void
renderer_copy_prepare(struct xa_context *r,
struct pipe_surface *dst_surface,
- struct pipe_resource *src_texture)
+ struct pipe_resource *src_texture,
+ const enum xa_formats src_xa_format,
+ const enum xa_formats dst_xa_format)
{
struct pipe_context *pipe = r->pipe;
struct pipe_screen *screen = pipe->screen;
fs_traits |= FS_SRC_LUMINANCE;
if (dst_surface->format == PIPE_FORMAT_L8_UNORM)
fs_traits |= FS_DST_LUMINANCE;
+ if (xa_format_a(dst_xa_format) != 0 &&
+ xa_format_a(src_xa_format) == 0)
+ fs_traits |= FS_SRC_SET_ALPHA;
shader = xa_shaders_get(r->shaders, VS_COMPOSITE, fs_traits);
cso_set_vertex_shader_handle(r->cso, shader.vs);