summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_buffer_objects.c
AgeCommit message (Collapse)Author
2011-03-04i965: Align index to type size and flush if the type changesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-24intel: Reset the buffer offset after releasing reference to packed uploadChris Wilson
Fixes oglc/vbo(basic.bufferdata) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34603 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21intel: extend current vertex buffersChris Wilson
If the next vertex arrays are a (discontiguous) continuation of the current arrays, such that the new vertices are simply offset from the start of the current vertex buffer definitions we can reuse those defintions and avoid the overhead of relocations and invalidations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21intel: Use specified alignment for writes into the upload bufferChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21intel: combine short memcpy using a temporary allocated bufferChris Wilson
Using a temporary buffer for large discontiguous uploads into the common buffer and a single buffered upload is faster than performing the discontiguous copies through a mapping into the GTT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21intel: use pwrite for batchChris Wilson
It's faster. Not only is the memcpy more efficiently performed in the kernel (making up for the system call overhead), but by not using mmap we remove the greater overhead of tracking the vma of every batch. And it means we can read back from the batch buffer without incurring the cost of a uncached read through the GTT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21intel: Buffered uploadChris Wilson
Rather than performing lots of little writes to update the common bo upon each update, write those into a static buffer and flush that when full (or at the end of the batch). Doing so gives a dramatic performance improvement over and above using mmaped access. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21intel: Replace the bo for a complete updateChris Wilson
Rather than performing a blit to completely overwrite a busy bo, simply discard it and create a new one with the fresh data. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21i965: Combine vb upload buffer with the general upload bufferChris Wilson
Reuse the new common upload buffer for uploading temporary indices and rebuilt vertex arrays. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21intel: Pack dynamic draws togetherChris Wilson
Dynamic arrays have the tendency to be small and so allocating a bo for each one is overkill and we can exploit many efficiency gains by packing them together. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-21intel: Use system memory for DYNAMIC_DRAW source objectsChris Wilson
Dynamic draw buffers are used by clients for temporary arrays and for uploading normal vertex arrays. By keeping the data in memory, we can avoid reusing active buffer objects and reallocate them as they are changed. This is important for Sandybridge which can not issue blits within a batch and so ends up flushing the batch upon every update, that is each batch only contains a single draw operation (if using dynamic arrays or regular arrays from system memory). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-09intel: Include mfeatures.h in files that perform feature tests.Vinson Lee
2010-10-18i965: Avoid blits in BufferCopySubdata on gen6.Eric Anholt
Fixes glean/bufferObject.
2010-10-18i965: Fix assertion failure on gen6 BufferSubData to busy BO.Eric Anholt
Fixes fbo-blit and probably several other tests.
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-08-20intel: Don't try to do work for BufferSubData with a size of 0.Eric Anholt
If we hit the linear blit path, we'd come up with a pitch of 0, then divide by zero. Fixes vbo-subdata-zero, made for bug #28931 (warsow).
2010-06-08intel: Change dri_bo_* to drm_intel_bo* to consistently use new API.Eric Anholt
The slightly less mechanical change of converting the emit_reloc calls will follow.
2010-05-10intel: Drop intelFlush()Kristian Høgsberg
Now that intel_flush() deosn't use the needs_mi_flush argument, we can finally drop one of the two flush functions.
2010-03-05Merge branch 'object-purgeable'Chris Wilson
Acked-by: Brian Paul <brianp@vmware.com>
2010-03-05APPLE_object_purgeable: intelChris Wilson
Implement support for purgeable objects by using the GEM madvise ioctl. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-04intel: Remove non-kernel-exec-fencing support.Eric Anholt
Shaves 60k off the driver from removing the broken spans code. This means we now require 2.6.29, which seems fair given that it's a year old and we've removed support for non-KMS already in the last release of 2D.
2010-02-19Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg
2009-11-30Merge branch 'mesa_7_6_branch' into mesa_7_7_branchIan Romanick
Conflicts: progs/util/shaderutil.c src/mesa/drivers/dri/r600/r600_context.c src/mesa/main/version.h
2009-11-23i915: Initialize Length and Offset fields when mapping a buffer objectIan Romanick
This fixes an assertion failure in _mesa_MapBufferARB. Fixes bugzilla #25253.
2009-11-13intel: When subdataing a busy buffer, use a temporary and blit in.Eric Anholt
This cuts a massive number of waits in ET:QW, which uses a VBO ringbuffer. Unfortunately it doesn't BufferData when wrapping back to 0, so we can't be clever with tracking what's been initialized.
2009-10-08intel: Use new drm_intel_bo_references() to avoid flushing.Eric Anholt
2009-09-28Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul
2009-09-24i915: Fix GetBufferSubData in the case of a system-memory BO.Eric Anholt
Bug #23760 (crashes in wine)
2009-09-24intel: Flush the batch when we're about to subdata into a VBO.Eric Anholt
This fixes the clears in openarena with the new metaops clear code, and the new piglit vbo-subdata-sync test. Bug #23857.
2009-09-03mesa: change ctx->Driver.BufferData() to return GLboolean for success/failureBrian Paul
Return GL_FALSE if we failed to allocate the buffer. Then raise GL_OUT_OF_MEMORY in core Mesa.
2009-09-02intel: Add support for FlushMappedBufferRange for ARB_map_buffer_range.Eric Anholt
This should help for the usage by the VBO module, where we would upload the whole remaining chunk of the buffer for a series of range maps that should cover just a segment of it.
2009-09-02intel: Sync a synchronized READ_BIT map buffer range with GL drawing to it.Eric Anholt
It's probably uncommon, but would obviously have gone wrong.
2009-09-02intel: Move MapBufferRange mesa state setting up to cover the 915 case.Eric Anholt
2009-09-01intel: fix incorrect parameter type for intel_bufferobj_map_range()Brian Paul
2009-09-01intel: set Length/Offset fields in intel_bufferobj_map()Brian Paul
2009-08-31intel: clear buffer fields in intel_bufferobj_unmap()Brian Paul
2009-08-28intel: Add support for GL_ARB_map_buffer_range.Eric Anholt
Passes glean's bufferObject test, and should provide good performance in the cases applications are expected to use.
2009-08-27intel: Add support for ARB_copy_buffer.Eric Anholt
Passes glean's bufferObject test for this extension.
2009-07-02intel: Flush when mapping buffer objects so writes don't get reordered.Eric Anholt
While GEM covers this for execution it knows about, it doesn't know about the batchbuffer we're preparing. Fixes piglit vbo-map-remap.c testcase.
2009-06-30i915: Fix assertion failure on remapping a non-BO-backed VBO.Eric Anholt
Failure to set the obj->Pointer back to null tripped up the assertion. Bug #22428.
2009-06-30i915: Fix assertion failure on remapping a non-BO-backed VBO.Eric Anholt
Failure to set the obj->Pointer back to null tripped up the assertion. Bug #22428. (cherry picked from commit 57a06d3a48c9af1067ec05e3ad96c58f4b9b99be)
2009-06-17i915: Don't put VBOs in graphics memory unless required for an operation.Eric Anholt
This saves doing swtnl from uncached memory, which is painful. Improves clutter test-text performance by 10% since it started using VBOs. (cherry picked from commit a945e203d4fe254593bc0c5c5d6caca45e65f9f7)
2009-06-17intel: Map write-only buffer objects through the GTT when possible.Eric Anholt
This looks to be a win of a few percent in cairogears with new vbo code, thanks to not polluting caches. (cherry picked from commit aa422b262509bc0763a50f63a51a1730139ea52f)
2009-06-24intel: fix additional merge conflicts missed in previous commitBrian Paul
2009-06-24Merge branch 'mesa_7_5_branch'Brian Paul
Conflicts: src/mesa/drivers/dri/i915/i915_tex_layout.c src/mesa/drivers/dri/i965/brw_wm_glsl.c src/mesa/drivers/dri/intel/intel_buffer_objects.c src/mesa/drivers/dri/intel/intel_pixel_bitmap.c src/mesa/drivers/dri/intel/intel_pixel_draw.c src/mesa/main/enums.c src/mesa/main/texstate.c src/mesa/vbo/vbo_exec_array.c
2009-06-19intel: Fix migration from sys_buffer in intel_bufferobj_buffer.Chia-I Wu
intel_bufferobj_subdata is called to migrate data from sys_buffer, and it expects only one of buffer or sys_buffer is non-NULL. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-06-19intel: Fixups for 'mesa: create/destroy buffer objects via driver functions'.Michel Dänzer
Initialize all driver function hooks before calling _mesa_initialize_context(), and handle all buffer objects in intel_buffer_object(). Fixes assertion failure when running glxinfo.
2009-06-02i915: Don't put VBOs in graphics memory unless required for an operation.Eric Anholt
This saves doing swtnl from uncached memory, which is painful. Improves clutter test-text performance by 10% since it started using VBOs.
2009-05-12intel: Map write-only buffer objects through the GTT when possible.Eric Anholt
This looks to be a win of a few percent in cairogears with new vbo code, thanks to not polluting caches.
2009-05-06intel: Unmap buffers if needed at DeleteBuffer time.Eric Anholt
This fixes a crash in glean's pbo test, which tripped over the assert when a context was destroyed while a buffer was still mapped (Mesa doesn't call UnmapBuffer in that case). Regression in c6bde8873fbda6d8467600b7491d8543c75b0509