summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_regions.c
AgeCommit message (Collapse)Author
2011-03-07intel: Add some defense against bo allocation failureChris Wilson
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>
2010-08-25intel: Support EGL_MESA_image_drmKristian Høgsberg
2010-08-25intel: Take an intel_screen pointer in intel_alloc_region_* functionsKristian Høgsberg
2010-08-05intel: Check for region allocation failure.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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-17intel: Respect src pitch in _mesa_copy_rect().Eric Anholt
If a non-zero src_y was used, this would break piglit depth-level-clamp.
2010-03-17intel: Rely on allocated region pitch for the miptree pitch.Eric Anholt
Bug #26966: 945 miptree pitch disagreement with libdrm.
2010-03-17intel: Remove extra tiling setting after allocating a tiled region.Eric Anholt
2010-03-16i965: Fix inversion for glCopyPixels to/from FBOs.Eric Anholt
fixes piglit fbo-copypix.
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-03-03intel: Use drm_intel_bo_alloc_tiled for region allocs.Eric Anholt
This moves the logic for how to align pitches, heights, and sizes of objects to one central location. Fixes rendering with texture tiling on i915. Note that current libdrm is required for the change for I915_TILING_NONE pitch alignment.
2010-02-18intel: Include main/hash.h using "" instead of <>Kristian Høgsberg
2010-02-17intel: Implement the DRI2 invalidate function properlyKristian Høgsberg
This uses a stamp mechanisms to mark the DRI drawable as invalid. Instead of immediately updating the buffers we just bump the drawable stamp and call out to DRI2GetBuffers "later". "Later" used to be at LOCK_HARDWARE time, and this patch brings back callouts at the points where we used to call LOCK_HARDWARE. A new function, intel_prepare_render(), is called where we used to call LOCK_HARDWARE, and if the buffers are invalid, we call out to DRI2GetBuffers there. This lets us invalidate buffers only when notified instead of on every glViewport() call. If the loader calls the DRI invalidate entrypoint, we disable viewport triggered buffer invalidation. Additionally, we can clean up the old viewport mechanism a bit, since we can just invalidate the buffers and not worry about reentrancy and whatnot.
2010-02-12intel: Track named regions and make sure we only have one region per named boKristian Høgsberg
2010-02-11i915: Remove left-over drmUnmap()Kristian Høgsberg
2010-01-28intel: Set the region's tiling to none when attaching a PBO to a region.Eric Anholt
Note that when detaching the PBO from the region and making a new BO for the region, we don't make it tiled even if the region originally was. Fixes piglit pbo-teximage-tiling.
2010-01-25Merge branch 'mesa_7_7_branch'Brian Paul
Conflicts: src/mesa/drivers/dri/intel/intel_screen.c src/mesa/drivers/dri/intel/intel_swapbuffers.c src/mesa/drivers/dri/r300/r300_emit.c src/mesa/drivers/dri/r300/r300_ioctl.c src/mesa/drivers/dri/r300/r300_tex.c src/mesa/drivers/dri/r300/r300_texstate.c
2010-01-23intel: Remove unnecessary headers.Vinson Lee
2010-01-04intel: Drop DRI1 static regionsKristian Høgsberg
2010-01-04intel: Drop LOCK/UNLOCK_HARDWARE()Kristian Høgsberg
2009-11-19intel: Remove non-GEM support.Eric Anholt
This really isn't supported at this point. GEM's been in the kernel for a year, and the fake bufmgr never really worked.
2009-11-06Make a convenient int for what chipset generation we're on.Eric Anholt
gen2/3/4 are easier to say than "8xx, 915-945/g33/pineview, 965/g45/misc", and compares on generation are often easier than stringing together a bunch of chipset checks.
2009-09-09Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul
Conflicts: Makefile configs/default progs/glsl/Makefile src/gallium/auxiliary/util/u_simple_shaders.c src/gallium/state_trackers/glx/xlib/xm_api.c src/mesa/drivers/dri/i965/brw_draw_upload.c src/mesa/drivers/dri/i965/brw_vs_emit.c src/mesa/drivers/dri/intel/intel_context.h src/mesa/drivers/dri/intel/intel_pixel.c src/mesa/drivers/dri/intel/intel_pixel_read.c src/mesa/main/texenvprogram.c src/mesa/main/version.h
2009-09-04intel: Align untiled region height to 2 according to 965 docs.Eric Anholt
This may or may not be required pre-965, but it doesn't seem unlikely, and I'd rather be safe. (cherry picked from commit b053474378633249be0e9f24010650ffb816229a)
2009-08-19intel: Align untiled region height to 2 according to 965 docs.Eric Anholt
This may or may not be required pre-965, but it doesn't seem unlikely, and I'd rather be safe.
2009-08-07intel: Align region height as required for tiled regions.Eric Anholt
Otherwise, we would address beyond the end of our buffers. Fixes reliable GPU segfault with texture_tiling=true and oglconform shadow.c. Bug #22406.
2009-08-07intel: move blit call out of assert()Brian Paul
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-29intel: Make LOCK_HARDWARE recursive to avoid hand-rolling recursiveness.Eric Anholt
2009-06-23intel: Avoid trying to do blits to Y tiled regions.Eric Anholt
This is somewhat nasty, but we need to do Y-tiled depth for FBO support. May help with corruption and hangs since enabling texture tiling, and since switching depth textures to Y tiled. Fixes piglit depthtex.c on 965.
2009-06-23intel: Fix some potential writes to zero-copy PBOs when used as regions.Eric Anholt
I was in the midst of fixing some blitting-with-Y-tiled issues when I noticed this. Hopefully PBO usage will be a little more robust, as a result.
2009-06-23intel: Remove long-unused intel_region_fill and intelEmitFillBlit.Eric Anholt
2009-06-19intel: Don't map regions with drm_intel_gem_bo_map_gtt() unless they're tiled.Eric Anholt
This fixes a regression in region read performance that came in with the texture tiling changes. Ideally we'd have an access flag coming in so we could also use bo_map_gtt for writing, like we do for buffer objects. Bug #22190
2009-06-19intel: Do not access pbo's buffer directly when attaching.Chia-I Wu
pbo might be system buffer based or attached to another region. Call intel_bufferobj_buffer to make sure pbo has a buffer of its own. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-06-19intel: Data are copied in the wrong direction when breaking COW tie.Chia-I Wu
Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-06-17i965: Fix tiling for FBO depth attachments by making DEPTH_COMPONENT Y tiled.Eric Anholt
This may hurt if miptree relayout occurs, since we can't blit Y tiled objects. But it corrects depth tests on FBOs using textures.
2009-06-09intel: Fix intel_region_unmap to do unmap, not map.Eric Anholt
Thanks to Shuang He for catching this.
2009-06-04intel: Add support for tiled textures.Eric Anholt
This is about a 30% performance win in OA with high settings on my GM45, and experiments with 915GM indicate that it'll be around a 20% win there. Currently, 915-class hardware is seriously hurt by the fact that we use fence regs to control the tiling even for 3D instructions that could live without them, so we spend a bunch of time waiting on previous rendering in order to pull fences off. Thus, the texture_tiling driconf option defaults off there for now.
2009-05-08i965: improve debug loggingRobert Ellison
Looking for memory leaks that were causing crashes in my environment in a situation where valgrind would not work, I ended up improving the i965 debug traces so I could better see where the memory was being allocated and where it was going, in the regions and miptrees code, and in the state caches. These traces were specific enough that external scripts could determine what elements were not being released, and where the memory leaks were. I also ended up creating my own backtrace code in intel_regions.c, to determine exactly where regions were being allocated and for what, since valgrind wasn't working. Because it was useful, I left it in, but disabled and compiled out. It can be activated by changing a flag at the top of the file.
2009-02-26i965: add missing init for region->widthBrian Paul
This doesn't seem to really effect anything but seeing width=0 in drawing regions was confusing.
2009-02-21intel: tell libdrm whether we want a cpu-ready or gpu-ready BO for regions.Eric Anholt
This lets us avoid allocing new buffers for renderbuffers, finalized miptrees, and PBO-uploaded textures when there's an unreferenced but still active one cached, while also avoiding CPU waits for batchbuffers and CPU-uploaded textures. The size of BOs allocated for a desktop running current GL cairogears on i915 is cut in half with this. Note that this means we require libdrm 2.4.5.
2009-01-30intel: more debug infoBrian Paul
2008-12-23Remove third buffer support from Mesa.Dave Airlie
This is part of the deprecated pageflipping infrastructure.
2008-10-27intel: Use dri_bo_get_tiling to get tiling mode of buffers we get from names.Eric Anholt
Previously, we were trying to pass a name to the GEM GET_TILING_IOCTL, which needs a handle, and failing. None of our buffers were tiled yet, but they will be at some point with DRI2 and UXA.
2008-09-26intel: Fix a number of memory leaks on context destroy.Eric Anholt
2008-09-12intel: Add a width field to regions, and use it for making miptrees in TFP.Eric Anholt
Otherwise, we would use the pitch as width of the texture, and compiz would render the pitch padding on the right hand side.
2008-09-10intel: track bufmgr move to libdrm_intel and bufmgr_fake irq emit/wait change.Eric Anholt
2008-08-29DRI2: Drop sarea, implement swap buffers in the X server.Kristian Høgsberg