vrend: allocate texture, always use texture storage when available

For multisample textures glTexStorage*DMultisample was only used on GLES
and not when the GL host provided it. Texture views need the texture to be
immutable and this is achieved by allocating them using glTexStorage.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
macos/master
Gert Wollny 6 years ago committed by Dave Airlie
parent febede1955
commit 8d09648e0a
  1. 2
      src/vrend_renderer.c

@ -4931,7 +4931,7 @@ static int vrend_renderer_resource_allocate_texture(struct vrend_resource *gr,
return EINVAL; return EINVAL;
} }
} else if (pr->nr_samples > 1) { } else if (pr->nr_samples > 1) {
if (vrend_state.use_gles) { if (vrend_state.use_gles || vrend_state.have_texture_storage) {
if (gr->target == GL_TEXTURE_2D_MULTISAMPLE) { if (gr->target == GL_TEXTURE_2D_MULTISAMPLE) {
glTexStorage2DMultisample(gr->target, pr->nr_samples, glTexStorage2DMultisample(gr->target, pr->nr_samples,
internalformat, pr->width0, pr->height0, internalformat, pr->width0, pr->height0,

Loading…
Cancel
Save