From 0d547c9ed92c0183f2c727496154baa2849f326e Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 1 May 2008 20:41:55 -0700 Subject: Add alignment to all aperture allocation requests. When pinning buffers, or using execbuffer, allow the application to specify the necessary aperture allocation alignment constraints. --- shared-core/i915_drm.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'shared-core') diff --git a/shared-core/i915_drm.h b/shared-core/i915_drm.h index 91461c41..0c64e866 100644 --- a/shared-core/i915_drm.h +++ b/shared-core/i915_drm.h @@ -451,15 +451,18 @@ struct drm_i915_gem_validate_entry { * operation. */ uint32_t buffer_handle; + + /** List of relocations to be performed on this buffer */ + uint32_t relocation_count; + uint64_t relocs_ptr; /* struct drm_i915_gem_relocation_entry *relocs */ + + /** Required alignment in graphics aperture */ + uint64_t alignment; /** * Returned value of the updated offset of the buffer, for future * presumed_offset writes. */ - uint32_t buffer_offset; - /** List of relocations to be performed on this buffer */ - uint64_t relocs_ptr; /* struct drm_i915_gem_relocation_entry *relocs */ - uint32_t relocation_count; - uint32_t pad; + uint64_t buffer_offset; }; struct drm_i915_gem_execbuffer { @@ -488,6 +491,9 @@ struct drm_i915_gem_pin { /** Handle of the buffer to be pinned. */ uint32_t handle; uint32_t pad; + + /** alignment required within the aperture */ + uint64_t alignment; /** Returned GTT offset of the buffer. */ uint64_t offset; -- cgit v1.2.3