vrend: don't emulate formats for external images for now

virglrenderer doesn't know with which parameters the external
image was created, so it doesn't make sense to emulate it.

This fixes Portal, HL2 etc. not going past the loading screen
in Crostini.

Reviewed-by: David Riley <davidriley@chromium.org>
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Gurchetan Singh 5 years ago
parent af23ed8c77
commit 5baaab6f3b
  1. 7
      src/vrend_renderer.c

@ -6111,13 +6111,18 @@ static int vrend_renderer_resource_allocate_texture(struct vrend_resource *gr,
{
uint level;
GLenum internalformat, glformat, gltype;
enum virgl_formats format = gr->base.format;
struct vrend_texture *gt = (struct vrend_texture *)gr;
struct pipe_resource *pr = &gr->base;
if (pr->width0 == 0)
return EINVAL;
enum virgl_formats format = vrend_format_replace_emulated(gr->base.bind, gr->base.format);
if (image_oes)
gr->base.bind &= ~VIRGL_BIND_PREFER_EMULATED_BGRA;
else
format = vrend_format_replace_emulated(gr->base.bind, gr->base.format);
bool format_can_texture_storage = has_feature(feat_texture_storage) &&
(tex_conv_table[format].flags & VIRGL_TEXTURE_CAN_TEXTURE_STORAGE);

Loading…
Cancel
Save