vrend: effectively revert "renderer: remove dead code"

d9a4be4d0a broke a number of tests
when running on a GLES host because tgsitargettogltarget may
return PIPE_BUFFER which is 0. So, instead of simply reverting the commit
make it more explicit that we check for PIPE_BUFFER to make it clearer
that this condition may actually trigger.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Gert Wollny 6 years ago committed by Jakob Bornecrantz
parent dff435479c
commit 8d711a1ec2
  1. 2
      src/vrend_renderer.c

@ -1812,6 +1812,8 @@ int vrend_create_sampler_view(struct vrend_context *ctx,
vrend_resource_reference(&view->texture, res);
view->id = view->texture->id;
if (view->target == PIPE_BUFFER)
view->target = view->texture->target;
view->srgb_decode = GL_DECODE_EXT;
if (view->format != view->texture->base.format) {

Loading…
Cancel
Save