nouveau: Use gl_constants::MinMapBufferAlignment as the alignment in nouveau_bo_new
authorSiavash Eliasi <siavashserver@gmail.com>
Thu, 28 Nov 2013 08:56:39 +0000 (12:26 +0330)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 29 Jan 2014 16:11:39 +0000 (09:11 -0700)
This driver does not support GL_ARB_map_buffer_range, so no special
treatment is needed for unaligned offsets in the mapping.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c

index 717c0b8f11d6804b4eb27a68f972d4fbe82ebafa..dc16585375958738244ffe6470ece476452cd79a 100644 (file)
@@ -95,7 +95,8 @@ nouveau_bufferobj_data(struct gl_context *ctx, GLenum target, GLsizeiptrARB size
        } else {
                /* Get a hardware BO */
                ret = nouveau_bo_new(context_dev(ctx),
-                                    NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0,
+                                    NOUVEAU_BO_GART | NOUVEAU_BO_MAP,
+                                    ctx->Const.MinMapBufferAlignment,
                                     size, NULL, &nbo->bo);
                assert(!ret);
        }