[virglrenderer-devel] [PATCH v2 1/2] vrend: If available use glCopyImageSubData to execute memcopy like blits

Gert Wollny gert.wollny at collabora.com
Wed Jul 11 09:58:32 UTC 2018


Am Mittwoch, den 11.07.2018, 09:37 +0200 schrieb Gert Wollny:
> [...]
> > Thanks for the clarifications.  gert.wollny@, would it be possible
> > to
> > get rid of vrend_canonical_formats_of_same_size /
> > vrend_is_canonical_format, and do the following instead in
> > vrend_renderer_blit?
> > 
> > const struct util_format_description *src_desc =
> > util_format_description(info->src.format);
> > const struct util_format_description *dst_desc =
> > util_format_description(info->dest.format);
> > if (util_is_format_compatible(src_desc, dst_desc) && ...)
> >       vrend_copy_sub_image(..)
> 
> Good point, I actually used that already in *resource_copy_region,
> makes sense to use it in blit too.
util_is_format_compatible is actually to restrictive, e.g. the
canonical formats for e.g. RG16 and RGBA8 are different, but
glCopyImageSubData can (and should) copy this, so I'll implement a
short version that can also take the compressed formats etc. 

> 
> Best, 
> Gert
> 


More information about the virglrenderer-devel mailing list