summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2015-07-20 18:47:17 +0200
committerSamuel Pitoiset <[email protected]>2015-07-20 18:48:27 +0200
commitc2cb771354d2d738e0ab3ca7c8008748c5f57953 (patch)
treec62f683ce0b1f9dba80833d4f0005383fb09fa1d /src/gallium/drivers/nouveau
parent19a6214b0ff707ae52e9624c263b7d6c1c20e6d3 (diff)
nouveau: always align buffers to 0x100
Only constbufs must be aligned to 0x100, but since all buffers can be rebinded as constant buffers they must be also aligned. This patch prevents this behaviour by aligning everything to 256-byte increments at buffer creation. This fixes dmesg fails for the following piglit test: ext_transform_feedback-immediate-reuse-uniform-buffer -auto -fbo Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_buffer.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.c b/src/gallium/drivers/nouveau/nouveau_buffer.c
index 23619467231..83d528846fd 100644
--- a/src/gallium/drivers/nouveau/nouveau_buffer.c
+++ b/src/gallium/drivers/nouveau/nouveau_buffer.c
@@ -40,13 +40,7 @@ static INLINE boolean
nouveau_buffer_allocate(struct nouveau_screen *screen,
struct nv04_resource *buf, unsigned domain)
{
- uint32_t size = buf->base.width0;
-
- if (buf->base.bind & (PIPE_BIND_CONSTANT_BUFFER |
- PIPE_BIND_COMPUTE_RESOURCE |
- PIPE_BIND_SHADER_BUFFER |
- PIPE_BIND_SHADER_IMAGE))
- size = align(size, 0x100);
+ uint32_t size = align(buf->base.width0, 0x100);
if (domain == NOUVEAU_BO_VRAM) {
buf->mm = nouveau_mm_allocate(screen->mm_VRAM, size,