virgl: make sure bind is set for non-buffers

Otherwise, virglrenderer will reject the resource.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
This commit is contained in:
Erik Faye-Lund 2019-03-12 13:57:14 +01:00
parent afbd68378a
commit f31b65f1c1

View file

@ -97,6 +97,9 @@ static void virgl_init_temp_resource_from_box(struct pipe_resource *res,
else
res->target = PIPE_TEXTURE_2D;
if (res->target != PIPE_BUFFER)
res->bind = PIPE_BIND_RENDER_TARGET;
switch (res->target) {
case PIPE_TEXTURE_1D_ARRAY:
case PIPE_TEXTURE_2D_ARRAY: