summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_pixel_read.c
AgeCommit message (Collapse)Author
2011-02-21intel: Skip the flush before read-pixels via blitChris Wilson
As we will flush when reading the return values of the blit, we can forgo the earlier flush. 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: 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>
2010-11-03intel: Annotate debug printout checks with unlikely().Eric Anholt
This provides the optimizer with hints about code hotness, which we're quite certain about for debug printouts (or, rather, while we developers often hit the checks for debug printouts, we don't care about performance while doing so).
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
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-05-10intel: Don't mark front buffer dirty if we're only readingKristian Høgsberg
When we call intel_prepare_render() from intelReadPixels(), we'll mark the front buffer dirty. That's silly, since we're only reading from it and marking it dirty will cause us to copy from fake front to front eventually. Just clear the dirty flag after doing the read.
2010-02-19Replace the _mesa_*printf() wrappers with the plain libc versionsKristian 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-01-28intel: Remove long-disabled meta readpixels, and associated meta support.Eric Anholt
2010-01-26intel: Use a handy helper in glReadPixels source clipping.Eric Anholt
2010-01-26intel: Fix PBO blit ReadPixels from an FBO.Eric Anholt
Bug #25921 -- clutter PBO usage gave unreliable results.
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 LOCK/UNLOCK_HARDWARE()Kristian Høgsberg
2010-01-04Remove leftover __DRI{screen,drawable,context}Private referencesKristian Høgsberg
As part of the DRI driver interface rewrite I merged __DRIscreenPrivate and __DRIscreen, and likewise for __DRIdrawablePrivate and __DRIcontextPrivate. I left typedefs in place though, to avoid renaming all the *Private use internal to the driver. That was probably a mistake, and it turns out a one-line find+sed combo can do the mass rename. Better late than never.
2009-12-08i965: Enable the accelerated ReadPixels path on gen4 along with pre-gen4.Eric Anholt
Passes piglit pbo-read-argb8888, and doesn't otherwise regress quick.tests.
2009-10-05Merge branch 'mesa_7_6_branch'Brian Paul
Conflicts: src/gallium/auxiliary/util/u_cpu_detect.c
2009-10-05intel: use driReadDrawable, not driDrawable in do_blit_readpixels()Brian Paul
2009-10-03intel: Suppress a compiler warning for an pointer->int castChris Wilson
intel_pixel_read.c: In function ‘do_blit_readpixels’: intel_pixel_read.c:221: warning: cast from pointer to integer of different size Cast via an intermediate (GLintptr) instead and hope the result fits within GLuint... [It should as we simply do not support textures *that* large!] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-10Fix merge failIan Romanick
One of the conflicst from this merge was missed: commit 0c309bb494b6ee1c403442d1207743f749f95b6e Merge: c6c44bf d27d659 Author: Brian Paul <brianp@vmware.com> Date: Wed Sep 9 08:33:39 2009 -0600
2009-09-09i965: fix an overlooked merge conflictBrian Paul
2009-09-09Merge branch 'mesa_7_6_branch'Brian Paul
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-08i965: use _mesa_is_bufferobj()Brian Paul
Also, remove unneeded call to _mesa_validate_pbo_access(). It's done by core Mesa as the comment suggested.
2009-09-04i965: Fix warnings in intel_pixel_read.c.Eric Anholt
(cherry picked from commit c80ce5ac90b1e0ac7a72cd41c314aa2000bfecf5)
2009-09-04intel: Update Mesa state before span setup in glReadPixels.Eric Anholt
We could have mapped the wrong set of draw buffers. Noticed while looking into a DRI2 glean ReadPixels issue. (cherry picked from commit afc981ee46791838f3cb83e11eb33938aa3efc83)
2009-09-04intel: Move intel_pixel_read.c to shared for use with i965.Eric Anholt
(cherry picked from commit dcfe0d66bfff9a55741aee298b7ffb051a48f0d3)
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-22i965: Fix warnings in intel_pixel_read.c.Eric Anholt
2009-06-22intel: Fix glReadPixels regression since changing context init order.Michel Dänzer
Fixes regression in dd26899ca39111e0866afed9df94bfb1618dd363 that also affected some PBO operations.
2009-06-19intel: Update Mesa state before span setup in glReadPixels.Eric Anholt
We could have mapped the wrong set of draw buffers. Noticed while looking into a DRI2 glean ReadPixels issue.
2009-06-19intel: Move intel_pixel_read.c to shared for use with i965.Eric Anholt