summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2017-03-01 11:09:30 -0500
committerEmil Velikov <emil.l.velikov@gmail.com>2017-03-15 18:02:31 +0000
commit5e5c720c6a7dcb0fa016ffcae0a4bbcaa30ded13 (patch)
tree905830eaa91a976c4383d9228613f9dc9d938a8a /src/gallium
parentf42e8a76e5a45c23ea3de392138257a346be14c9 (diff)
nvc0: increase alignment to 256 for texture buffers on fermi
When binding as textures, the alignment can be 16. However when binding as an image, the address has to be aligned to 256. (Also when binding as an RT, but that can't happen with GL or current gallium APIs.) Reported-by: Roy Spliet <nouveau@spliet.org> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> (cherry picked from commit 32dd8d59b6d1b6828e16e854d589d0f04536da14)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_screen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index 2cac3c79e25..2ef09dc5d45 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -147,7 +147,9 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
return 256;
case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
- return 16; /* 256 for binding as RT, but that's not possible in GL */
+ if (class_3d < NVE4_3D_CLASS)
+ return 256; /* IMAGE bindings require alignment to 256 */
+ return 16;
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
return 16;
case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT: