summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_tex_image.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-28mesa: move PBO-related functions into a new fileBrian Paul
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>
2011-01-10intel: When making a new teximage miptree, make a full one.Eric Anholt
If we hit this path, we're level 1+ and the base level got allocated as a single level instead of a full tree (so we don't match intelObj->mt). This tries to recover from that so that we end up with 2 allocations and 1 validation blit (old -> new) instead of allocations equal to number of levels and levels - 1 blits.
2011-01-10Revert "intel: Always allocate miptrees from level 0, not tObj->BaseLevel."Eric Anholt
This reverts commit 7ce6517f3ac41bf770ab39aba4509d4f535ef663. This reverts commit d60145d06d999c5c76000499e6fa9351e11d17fa. I was wrong about which generations supported baselevel adjustment -- it's just gen4, nothing earlier. This meant that i915 would have never used the mag filter when baselevel != 0. Not a severe bug, but not an intentional regression. I think we can fix the performance issue another way.
2011-01-09intel: Include mfeatures.h in files that perform feature tests.Vinson Lee
2011-01-05intel: Always allocate miptrees from level 0, not tObj->BaseLevel.Eric Anholt
BaseLevel/MaxLevel are mostly used for two things: clamping texture access for FBO rendering, and limiting the used mipmap levels when incrementally loading textures. By restricting our mipmap trees to just the current BaseLevel/MaxLevel, we caused reallocation thrashing in the common case, for a theoretical win if someone really did want just levels 2..4 or whatever of their texture object. Bug #30366
2011-01-05intel: Drop unused first/lastlevel args to miptree_create_for_region.Eric Anholt
We're always making a single-level, 0-baselevel miptree.
2010-11-18mesa: pass gl_format to _mesa_init_teximage_fields()Brian Paul
This should prevent the field going unset in the future. See bug http://bugs.freedesktop.org/show_bug.cgi?id=31544 for background. Also remove unneeded calls to clear_teximage_fields(). Finally, call _mesa_set_fetch_functions() from the _mesa_init_teximage_fields() function so callers have one less thing to worry about.
2010-11-03intel: Remove duplicated teximage miptree to object miptree promotion.Eric Anholt
intel_finalize_mipmap_tree() does this optimization too, just more aggressively.
2010-11-03intel: Avoid taking logbase2 of several things that we max.Eric Anholt
logbase2(max(width, height, depth)) == max(logbase2(width), logbase2(height), logbase2(depth)), but in 60 bytes less code.
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-09-30dri/intel: remove duplicated includeNicolas Kaiser
Remove duplicated include. Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-24intel: More reverting of the sw fallback for depth texture border color.Eric Anholt
The rest was done with 9aec1288eeae8e87adc9a99f377be536892941b2
2010-09-23intel: Remove unnecessary minimum pitch alignment to 32 bytes.Eric Anholt
This broke with the cleanup I did in convolution removal. It's unnecessary anyway since region_alloc_tiled adjusts pitches for us (64 byte alignment)
2010-09-23mesa: Remove EXT_convolution.Eric Anholt
More optional code.
2010-09-22dri: Pass the __DRIscreen and the __DRIscreen private back to image lookupKristian Høgsberg
We will typically have a current context when we need to lookup the image, but the lookup implementation don't need it so drop it.
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-13intel: Don't update window system renderbuffers on TexImage.Eric Anholt
While sometimes rendering occurs in the form of blits for TexImage, it doesn't interact with the window system renderbuffers, so skip it.
2010-05-11intel: Don't update renderbuffers in intelSetTexBuffer2 if we have invalidateKristian 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-04intel: Update renderbuffers unconditionally in intelSetTexBuffer2()Kristian Høgsberg
2010-03-17intel: Replace mt->pitch with mt->region->pitch.Eric Anholt
The pitch is not really an inherent part of the miptree, since it's not part of any of the layout calculations, and it's dictated by the libdrm-allocated region pitch now.
2010-03-05intel: Remove support for the DRI1 TFP extension.Eric Anholt
2010-02-24intel: Implement GL_OES_EGL_image entrypointsKristian 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-16dri2: Event driven buffer validation.Francisco Jerez
When a buffer invalidation event is received from the X server, the "invalidate" hook of the DRI2 flush extension is executed: A generic implementation (dri2InvalidateDrawable) is provided that just bumps the "pStamp" sequence number in __DRIdrawableRec. For old servers not supporting buffer invalidation events, the invalidate hook will be called before flushing the fake front/back buffer (that's typically once per frame -- not a lot worse than the situation we were in before). No effort has been made on preserving backwards compatibility with version 2 of the flush extension, but I think it's acceptable because AFAIK no released stack is making use of it. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-02-09dri_interface: Introduce DRI tokens for the texBuffer texture formatsKristian Høgsberg
This used to take GLX tokens, but the DRI interface can't depend on GLX defines. We fix this by introducing DRI tokens that have the same value as the GLX texture format tokens.
2010-02-06intel: Allow L8 PBO blit uploads.Damien Lespiau
Bug #32810
2010-02-06intel: Allow PBO acceleration for GL_RGBA8 MESA_FORMAT_ARGB8888.Eric Anholt
This improves firefox-talos-svg runtimes on cairo-gl by 14%.
2010-01-30intel: Respect texture tiling when doing a PBO blit teximage upload.Eric Anholt
Bug #26008. Fixes piglit pbo-teximage-tiling-2.
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-11Merge branch 'master' of ssh://people.freedesktop.org/~jbarnes/mesaJesse Barnes
Conflicts due to DRI1 removal: src/mesa/drivers/dri/intel/intel_context.c src/mesa/drivers/dri/intel/intel_screen.c
2010-01-08intel/DRI2: add DRI2flushExtension support with invalidate hookKristian Høgsberg
Needed to support the SwapBuffers code properly. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-01-04intel: Remove struct intel_framebufferKristian Høgsberg
With the vsync fields no longer relevant and by refactoring the code to no longer use color_rb[0-1] we can just use struct gl_framebuffer directly.
2010-01-04intel: Drop LOCK/UNLOCK_HARDWARE()Kristian Høgsberg
2009-11-06intel: Use _mesa_get_current_tex_object() to clean up TFP path.Eric Anholt
2009-11-06intel: Remove duplicated arguments from intel_miptree_match_image().Eric Anholt
2009-10-30intel: Set the texture format in the TFP path.Eric Anholt
This fixes a regression in piglit's tfp test as of 11caea687e3f10ae12d33e44edf84635f73047dd. Additionally, set the texture format for the RGB textures to MESA_FORMAT_XRGB8888 and support it in the hw paths so that hopefully sw fallbacks involving TFP get better alpha behavior. The radeon drivers appear to need the same fix. Bug #24803
2009-10-29intel: remove memcpy_get_tex_image() codeBrian Paul
This has been lifted into core Mesa where it can be used for all drivers that use the _mesa_get_teximage() fallback for ctx->Driver.GetTexImage().
2009-10-29intel: check for single memcpy() in memcpy_get_tex_image()Brian Paul
2009-10-29intel: remove debug codeBrian Paul
2009-10-29intel: added fast memcpy path for glGetTexImage()Brian Paul
2009-10-28Merge branch 'texformat-rework'Brian Paul
Conflicts: src/mesa/drivers/dri/radeon/radeon_fbo.c src/mesa/drivers/dri/s3v/s3v_tex.c src/mesa/drivers/dri/s3v/s3v_xmesa.c src/mesa/drivers/dri/trident/trident_context.c src/mesa/main/debug.c src/mesa/main/mipmap.c src/mesa/main/texformat.c src/mesa/main/texgetimage.c
2009-10-25mesa: choose texture format in core mesa, not driversBrian Paul
Call the ctx->Driver.ChooseTextureFormat() function from core Mesa's _mesa_[Copy]TexImage functions instead of in the driver functions. One less thing for drivers to do.
2009-10-25mesa: remove calls to _mesa_compressed_row_stride()Brian Paul
2009-10-24mesa: change compressed texture size callsBrian Paul
Replace calls to ctx->Driver.CompressedTextureSize with calls to _mesa_format_image_size. The former always called the later.
2009-10-23Merge remote branch 'origin/mesa_7_6_branch'Eric Anholt
Conflicts: src/mesa/drivers/dri/intel/intel_fbo.c src/mesa/drivers/dri/intel/intel_mipmap_tree.c src/mesa/drivers/dri/intel/intel_mipmap_tree.h src/mesa/drivers/dri/intel/intel_tex_copy.c src/mesa/drivers/dri/intel/intel_tex_image.c