From 8d711a1ec2457525b9eb1be2a13db6a483dc075b Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 13 Feb 2019 09:53:20 +0100 Subject: [PATCH] vrend: effectively revert "renderer: remove dead code" d9a4be4d0a5b2239734638750c23233c7146fb7e 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 Signed-off-by: Gert Wollny Signed-off-by: Jakob Bornecrantz --- src/vrend_renderer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 56422b9..8ef366f 100644 --- a/src/vrend_renderer.c +++ b/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) {