summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_fbo.c
AgeCommit message (Collapse)Author
2011-02-24intel: Try using glCopyTexSubImage2D in _mesa_meta_BlitFramebufferNeil Roberts
In the case where glBlitFramebuffer is being used to copy to a texture without scaling it is faster if we can use the hardware to do a blit rather than having to do a texture render. In most of the drivers glCopyTexSubImage2D will use a blit so this patch makes it check for when glBlitFramebuffer is doing a simple copy and then divert to glCopyTexSubImage2D. This was originally proposed as an extension to the common meta-ops. However, it was rejected as using the BLT is only advantageous for Intel hardware. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33934 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-01-14i915: Fix compiler warning from sw fallback removal change.Eric Anholt
2011-01-10i965: Use a new miptree to avoid software fallbacks due to drawing offset.Eric Anholt
When attaching a small mipmap level to an FBO, the original gen4 didn't have the bits to support rendering to it. Instead of falling back, just blit it to a new little miptree just for it, and let it get revalidated into the stack later just like any other new teximage. Bug #30365.
2011-01-09intel: Include mfeatures.h in files that perform feature tests.Vinson Lee
2011-01-07intel: Make renderbuffer tiling choice match texture tiling choice.Eric Anholt
There really shouldn't be any difference between the two for us. Fixes a bug where Z16 renderbuffers would be untiled on gen6, likely leading to hangs.
2011-01-07intel: Use the _BaseFormat from MESA_FORMAT_* in renderbuffer setup.Eric Anholt
2011-01-07intel: Add a vtbl hook for determining if a format is renderable.Eric Anholt
By relying on just intel_span_supports_format, some formats that aren't supported pre-gen4 were not reporting FBO incomplete. And we also complained in stderr when it happened on i915 because draw_region gets called before framebuffer completeness validation.
2011-01-04intel: Merge our choosetexformat fallbacks into core.Eric Anholt
We now share the type/format -> MESA_FORMAT_* mappings with software mesa, and the core supports most of the fallbacks hardware drivers will want.
2011-01-04intel: When validating an FBO's combined depth/stencil, use the given FBO.Eric Anholt
We were looking at the current draw buffer instead to see whether the depth/stencil combination matched. So you'd get told your framebuffer was complete, until you bound it and went to draw and we decided that it was incomplete.
2011-01-04intel: Fix segfaults from trying to use _ColorDrawBuffers in FBO validation.Eric Anholt
The _ColorDrawBuffers is a piece of computed state that gets for the current draw/read buffers at _mesa_update_state time. However, this function actually gets used for non-current draw/read buffers when checking if an FBO is complete from the driver's perspective. So, instead of trying to just look at the attachment points that are currently referenced by glDrawBuffers, look at all attachment points to see if they're driver-supported formats. This appears to actually be more in line with the intent of the spec, too. Fixes a segfault in my upcoming fbo-clear-formats piglit test, and hopefully bug #30278
2010-12-21intel: Check for unsupported texture when finishing using as a render targetChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32541 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-10intel: Just use ChooseTextureFormat for renderbuffer format choice.Eric Anholt
One less place to forget to put your new MESA_FORMAT support in.
2010-12-10intel: Add a couple of helper functions to reduce rb code duplication.Eric Anholt
2010-11-23i915: Disallow alpha, red, RG, and sRGB as render targetsIan Romanick
Fixes bugzilla #31832 NOTE: This is a candidate for the 7.9 branch.
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-10-01i965: Enable GL_ARB_texture_rgIan Romanick
2010-09-30i965: always set tiling for fbo depth buffer on sandybridgeZhenyu Wang
Sandybridge requires depth buffer must be tiling. Fix 'fbo_firecube' demo.
2010-09-24intel: Fix segfault on INTEL_DEBUG=fbo with unsupported framebuffers.Eric Anholt
2010-09-24i965: Add support for rendering to SARGB8 FBOs.Eric Anholt
Tested with fbo-generatemipmap-formats GL_EXT_texture_srgb. The test still fails on SLA8, though.
2010-09-24intel: Corresponding FinishRenderTexture debug to BeginRenderTexture.Eric Anholt
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-08-26intel: Merge identical cases in switch statement.Nick Bowler
Signed-off-by: Nick Bowler <nbowler@draconx.ca> Signed-off-by: Brian Paul <brianp@vmware.com>
2010-08-25intel: Take an intel_screen pointer in intel_alloc_region_* functionsKristian Høgsberg
2010-06-16intel: Remove unnecessary headers.Vinson Lee
2010-06-11i965: Remove caching of surface state objects.Eric Anholt
It turns out that computing a 56 byte key to look up a 20-byte object out of a hash table was some sort of a bad idea. Whoops. before: [ # ] backend test min(s) median(s) stddev. count [ 0] gl firefox-talos-gfx 37.799 38.203 0.39% 6/6 after: [ 0] gl firefox-talos-gfx 34.761 34.784 0.17% 5/6
2010-06-10i965: Add support for GL_ALPHA framebuffer objects.Eric Anholt
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-04i965: When an RB gets a new region, clear the old from the state cache.Eric Anholt
This prevents memory usage explosion in blender due to the state cache hanging on to old fake frontbuffer regions. Sigh at blender still using frontbuffer rendering. Bug #24119.
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-17intel: Rely on allocated region pitch for the miptree pitch.Eric Anholt
Bug #26966: 945 miptree pitch disagreement with libdrm.
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: Set InternalFormat for renderbuffers created from an EGLImageKristian Høgsberg
2010-02-24intel: Implement GL_OES_EGL_image entrypointsKristian Høgsberg
2010-02-20intel: Silence compiler format warnings.Vinson Lee
2010-02-19Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg
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.
2009-12-28intel: Fix false positives in checking for non-packed depth/stencil RB.Eric Anholt
The wine d3d9 visual.c testcase was tripping over this and failing. Presumably it's binding a packed depth/stencil texture to both stencil and depth attachment points, and we make a new renderbuffer wrapper for each in that case.
2009-12-28intel: Allow binding a stencil but not a depth buffer.Eric Anholt
Wine's d3d9 visual.c testcase tries this a lot, so I've added some piglit tests (fbo-nodepth-test, fbo-nostencil-test, fbo-stencil-only) and enabled it.
2009-12-28intel: Improve INTEL_DEBUG=fbo output.Eric Anholt
2009-12-22intel: Remove unused stored values reported by clang.Eric Anholt
2009-12-10intel: Make RGB renderbuffers use XRGB8888 like we do for RGB system buffers.Ian Romanick
2009-12-10intel: name in intel_create_renderbuffer was always 0, removeIan Romanick
2009-12-10intel: Use texformat accessor to get bytes-per-pixelIan Romanick
2009-12-10intel: softwareBuffer in intel_alloc_renderbuffer_storage was always false, ↵Ian Romanick
remove
2009-12-10intel: Axe intel_renderbuffer::texformatIan Romanick
Since the texformat branch merge, the value of intel_renderbuffer::texformat is just a copy of gl_renderbuffer::Format.
2009-12-10intel: Flush the render/texture cache when finishing render to texture.Eric Anholt
Back when we were flushing the entire batch at BindFramebuffer, the kernel would notice the domain transition when someone went to texture from it and flush for us. We no longer do the batch flushing every time, so we get to do aggressive flushing until we move batchbuffer handling to libdrm. Fixes piglit fbo-flushing. Bug #25377. No noticeable performance loss on cairo-gl (so this is better than batch flushing).
2009-12-07Revert "intel: Make RGB renderbuffers use XRGB8888 like we do for RGB system ↵Ian Romanick
buffers." This reverts commit 4598942b1b88a2a7d5af7febae7e79eedf00e385. XRGB8888 doesn't work as intended. Revert this for now, and we'll revisit it for 7.8 or something.
2009-12-02intel: Make RGB renderbuffers use XRGB8888 like we do for RGB system buffers.Eric Anholt
2009-11-06intel: Don't validate in a texture image used as a render target.Eric Anholt
Otherwise, we could lose track of rendering to that image, which could easily happen during mipmap generation.