-static void
-setup_fs_constant_buffer(struct exa_context *exa)
-{
- const int param_bytes = 4 * sizeof(float);
- const float fs_consts[8] = {
- 0, 0, 0, 1,
- };
- renderer_set_constants(exa->renderer, PIPE_SHADER_FRAGMENT,
- fs_consts, param_bytes);
-}
-
-static void
-setup_constant_buffers(struct exa_context *exa, struct exa_pixmap_priv *pDst)
-{
- setup_fs_constant_buffer(exa);
-}
-
static INLINE boolean matrix_from_pict_transform(PictTransform *trans, float *matrix)
{
if (!trans)
{
struct pipe_surface *dst_surf = xorg_gpu_surface(exa->scrn, pDst);
- renderer_bind_destination(exa->renderer, dst_surf);
+ renderer_bind_destination(exa->renderer, dst_surf,
+ pDst->width,
+ pDst->height);
bind_blend_state(exa, op, pSrcPicture, pMaskPicture, pDstPicture);
bind_shaders(exa, op, pSrcPicture, pMaskPicture, pDstPicture, pSrc, pMask);
bind_samplers(exa, op, pSrcPicture, pMaskPicture,
pDstPicture, pSrc, pMask, pDst);
- setup_constant_buffers(exa, pDst);
setup_transforms(exa, pSrcPicture, pMaskPicture);
exa->num_bound_samplers);
}
+
+ pipe_surface_reference(&dst_surf, NULL);
return TRUE;
}
vs_traits = VS_SOLID_FILL;
fs_traits = FS_SOLID_FILL;
- renderer_bind_destination(exa->renderer, dst_surf);
+ renderer_bind_destination(exa->renderer, dst_surf,
+ pixmap->width, pixmap->height);
bind_blend_state(exa, PictOpSrc, NULL, NULL, NULL);
cso_set_samplers(exa->renderer->cso, 0, NULL);
cso_set_sampler_textures(exa->renderer->cso, 0, NULL);
- setup_constant_buffers(exa, pixmap);
shader = xorg_shaders_get(exa->renderer->shaders, vs_traits, fs_traits);
cso_set_vertex_shader_handle(exa->renderer->cso, shader.vs);
renderer_begin_solid(exa->renderer);
+ pipe_surface_reference(&dst_surf, NULL);
return TRUE;
}