summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_resource.h')
-rw-r--r--src/gallium/drivers/virgl/virgl_resource.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/virgl/virgl_resource.h b/src/gallium/drivers/virgl/virgl_resource.h
index a60987c5b86..f127d45cff1 100644
--- a/src/gallium/drivers/virgl/virgl_resource.h
+++ b/src/gallium/drivers/virgl/virgl_resource.h
@@ -30,6 +30,7 @@
#include "util/u_transfer.h"
#include "virgl_hw.h"
+#include "virgl_screen.h"
#define VR_MAX_TEXTURE_2D_LEVELS 15
struct winsys_handle;
@@ -80,7 +81,7 @@ static inline struct virgl_transfer *virgl_transfer(struct pipe_transfer *trans)
void virgl_buffer_init(struct virgl_resource *res);
-static inline unsigned pipe_to_virgl_bind(unsigned pbind)
+static inline unsigned pipe_to_virgl_bind(const struct virgl_screen *vs, unsigned pbind)
{
unsigned outbind = 0;
if (pbind & PIPE_BIND_DEPTH_STENCIL)
@@ -108,7 +109,10 @@ static inline unsigned pipe_to_virgl_bind(unsigned pbind)
if (pbind & PIPE_BIND_SHADER_BUFFER)
outbind |= VIRGL_BIND_SHADER_BUFFER;
if (pbind & PIPE_BIND_QUERY_BUFFER)
- outbind |= VIRGL_BIND_QUERY_BUFFER;
+ outbind |= VIRGL_BIND_QUERY_BUFFER;
+ if (pbind & PIPE_BIND_COMMAND_ARGS_BUFFER)
+ if (vs->caps.caps.v2.capability_bits & VIRGL_CAP_BIND_COMMAND_ARGS)
+ outbind |= VIRGL_BIND_COMMAND_ARGS;
return outbind;
}