summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-07-24 17:03:48 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:07 -0800
commit376c7253f814979cf25f101188af1085a509f642 (patch)
tree650cac1d588d676ce264da63a25faebccfa1ce90 /src/gallium
parent75709d982bdebae9233c52ebe516508c762be133 (diff)
iris: enable SSBOs
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/iris/iris_screen.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c
index 4028a685260..f98b17bb1fb 100644
--- a/src/gallium/drivers/iris/iris_screen.c
+++ b/src/gallium/drivers/iris/iris_screen.c
@@ -205,6 +205,15 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
/* 3DSTATE_CONSTANT_XS requires the start of UBOs to be 32B aligned */
return 32;
+ case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
+ /* Choose a cacheline (64 bytes) so that we can safely have the CPU and
+ * GPU writing the same SSBO on non-coherent systems (Atom CPUs). With
+ * UBOs, the GPU never writes, so there's no problem. For an SSBO, the
+ * GPU and the CPU can be updating disjoint regions of the buffer
+ * simultaneously and that will break if the regions overlap the same
+ * cacheline.
+ */
+ return 64;
case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
return 64; // XXX: ?
case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
@@ -254,7 +263,6 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
case PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL:
case PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL:
- case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
case PIPE_CAP_INVALIDATE_BUFFER:
case PIPE_CAP_STRING_MARKER:
case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS: