diff options
author | Erik Faye-Lund <[email protected]> | 2019-03-12 13:57:14 +0100 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-04-17 07:27:08 +0000 |
commit | f31b65f1c1444e36baffb414aa11de2d70a14c19 (patch) | |
tree | 4f687c6cc63033e1df732f7d14e06251c91c99e9 /src | |
parent | afbd68378a4d052c4ff02cac3cd4739d7fd13336 (diff) |
virgl: make sure bind is set for non-buffers
Otherwise, virglrenderer will reject the resource.
Signed-off-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Gurchetan Singh <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_texture.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_texture.c b/src/gallium/drivers/virgl/virgl_texture.c index e0c152dd562..5cb01cb18a0 100644 --- a/src/gallium/drivers/virgl/virgl_texture.c +++ b/src/gallium/drivers/virgl/virgl_texture.c @@ -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: |