summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_protocol.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2018-07-17 17:24:29 +1000
committerDave Airlie <[email protected]>2018-07-24 05:54:21 +1000
commit958b57ac82549a662631ac2d2e2f1654178a8a42 (patch)
tree9b42836ddf8786577bd9958e9630cd534410d1d2 /src/gallium/drivers/virgl/virgl_protocol.h
parente4d346c86db0ae332fcdf55eac0e075cfb99a7eb (diff)
virgl: add initial shader_storage_buffer_object support. (v2)
This adds the guest side support for ARB_shader_storage_buffer_object. Co-authors: Gurchetan Singh <[email protected]> v2: move to using separate maximums (fixup macros) Reviewed-By: Gert Wollny <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_protocol.h')
-rw-r--r--src/gallium/drivers/virgl/virgl_protocol.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_protocol.h b/src/gallium/drivers/virgl/virgl_protocol.h
index 53493d5c156..51c350112ad 100644
--- a/src/gallium/drivers/virgl/virgl_protocol.h
+++ b/src/gallium/drivers/virgl/virgl_protocol.h
@@ -86,6 +86,7 @@ enum virgl_context_cmd {
VIRGL_CCMD_SET_TESS_STATE,
VIRGL_CCMD_SET_MIN_SAMPLES,
+ VIRGL_CCMD_SET_SHADER_BUFFERS,
};
/*
@@ -491,4 +492,13 @@ enum virgl_context_cmd {
#define VIRGL_SET_MIN_SAMPLES_SIZE 1
#define VIRGL_SET_MIN_SAMPLES_MASK 1
+/* set shader buffers */
+#define VIRGL_SET_SHADER_BUFFER_ELEMENT_SIZE 3
+#define VIRGL_SET_SHADER_BUFFER_SIZE(x) (VIRGL_SET_SHADER_BUFFER_ELEMENT_SIZE * (x)) + 2
+#define VIRGL_SET_SHADER_BUFFER_SHADER_TYPE 1
+#define VIRGL_SET_SHADER_BUFFER_START_SLOT 2
+#define VIRGL_SET_SHADER_BUFFER_OFFSET(x) ((x) * VIRGL_SET_SHADER_BUFFER_ELEMENT_SIZE + 3)
+#define VIRGL_SET_SHADER_BUFFER_LENGTH(x) ((x) * VIRGL_SET_SHADER_BUFFER_ELEMENT_SIZE + 4)
+#define VIRGL_SET_SHADER_BUFFER_RES_HANDLE(x) ((x) * VIRGL_SET_SHADER_BUFFER_ELEMENT_SIZE + 5)
+
#endif