r600g: Request DWORD aligned vertex buffers.
authorFabian Bieler <der.fabe@gmx.net>
Mon, 14 Feb 2011 21:44:42 +0000 (22:44 +0100)
committerAlex Deucher <alexdeucher@gmail.com>
Wed, 23 Feb 2011 16:42:32 +0000 (11:42 -0500)
The spec says that the offsets in the vertex-fetch instructions need to be byte-aligned and makes no specification with regard to the required alignment of the offset and stride in the vertex resource constant register.

However, testing indicates that all three values need to be DWORD aligned.

src/gallium/drivers/r600/r600_pipe.c

index 9d6c9bd..79b0d02 100644 (file)
@@ -196,7 +196,7 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
                                           PIPE_BIND_VERTEX_BUFFER |
                                           PIPE_BIND_INDEX_BUFFER |
                                           PIPE_BIND_CONSTANT_BUFFER,
-                                          U_VERTEX_FETCH_BYTE_ALIGNED);
+                                          U_VERTEX_FETCH_DWORD_ALIGNED);
        if (!rctx->vbuf_mgr) {
                r600_destroy_context(&rctx->context);
                return NULL;