Commit Graph

85 Commits

Author SHA1 Message Date
Kristian Høgsberg
9087ba1280 intel: Take an intel_screen pointer in intel_alloc_region_* functions 2010-08-25 09:17:48 -04:00
Vinson Lee
84178547df intel: Remove unnecessary headers. 2010-06-16 17:44:26 -07:00
Eric Anholt
178414eba4 i965: Remove caching of surface state objects.
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-11 00:15:59 -07:00
Eric Anholt
6383428588 i965: Add support for GL_ALPHA framebuffer objects. 2010-06-10 00:40:00 -07:00
Kristian Høgsberg
c4775a27e3 intel: Drop intelFlush()
Now that intel_flush() deosn't use the needs_mi_flush argument, we can
finally drop one of the two flush functions.
2010-05-10 17:48:11 -04:00
Eric Anholt
ce914fff08 i965: When an RB gets a new region, clear the old from the state cache.
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-05-04 22:06:12 -07:00
Eric Anholt
362c1bf75e intel: Replace mt->pitch with mt->region->pitch.
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-17 11:24:01 -07:00
Eric Anholt
da011faf48 intel: Rely on allocated region pitch for the miptree pitch.
Bug #26966: 945 miptree pitch disagreement with libdrm.
2010-03-17 11:23:43 -07:00
Eric Anholt
bb35000b4b intel: Remove non-kernel-exec-fencing support.
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-04 16:56:32 -08:00
Kristian Høgsberg
af3f1bb269 intel: Set InternalFormat for renderbuffers created from an EGLImage 2010-03-03 10:47:49 -05:00
Kristian Høgsberg
10e7962741 intel: Implement GL_OES_EGL_image entrypoints 2010-02-24 14:28:42 -05:00
Vinson Lee
b76164dced intel: Silence compiler format warnings. 2010-02-20 01:58:27 -08:00
Kristian Høgsberg
32f2fd1c5d Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions 2010-02-19 12:03:01 -05:00
Kristian Høgsberg
d282128ff6 intel: Remove struct intel_framebuffer
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-04 11:48:02 -05:00
Eric Anholt
a099644755 intel: Fix false positives in checking for non-packed depth/stencil RB.
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-28 19:21:27 -08:00
Eric Anholt
089144e4e5 intel: Allow binding a stencil but not a depth buffer.
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-28 18:52:47 -08:00
Eric Anholt
e4df8d32b5 intel: Improve INTEL_DEBUG=fbo output. 2009-12-28 18:51:18 -08:00
Eric Anholt
5727147f89 intel: Remove unused stored values reported by clang. 2009-12-22 14:20:26 -08:00
Ian Romanick
cbdeb33209 intel: Make RGB renderbuffers use XRGB8888 like we do for RGB system buffers. 2009-12-10 15:12:30 -08:00
Ian Romanick
430876cd3a intel: name in intel_create_renderbuffer was always 0, remove 2009-12-10 15:12:30 -08:00
Ian Romanick
0f01674a58 intel: Use texformat accessor to get bytes-per-pixel 2009-12-10 15:12:30 -08:00
Ian Romanick
4eee46efcb intel: softwareBuffer in intel_alloc_renderbuffer_storage was always false, remove 2009-12-10 15:12:30 -08:00
Ian Romanick
3078bd136d intel: Axe intel_renderbuffer::texformat
Since the texformat branch merge, the value of intel_renderbuffer::texformat
is just a copy of gl_renderbuffer::Format.
2009-12-10 15:12:30 -08:00
Eric Anholt
539a14a1dd intel: Flush the render/texture cache when finishing render to texture.
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-10 14:47:09 -08:00
Ian Romanick
bb64c9bcdf Revert "intel: Make RGB renderbuffers use XRGB8888 like we do for RGB system buffers."
This reverts commit 4598942b1b.

XRGB8888 doesn't work as intended.  Revert this for now, and we'll revisit it
for 7.8 or something.
2009-12-07 17:06:07 -08:00
Eric Anholt
4598942b1b intel: Make RGB renderbuffers use XRGB8888 like we do for RGB system buffers. 2009-12-02 16:19:37 -08:00
Eric Anholt
75bdbdd90b intel: Don't validate in a texture image used as a render target.
Otherwise, we could lose track of rendering to that image, which could
easily happen during mipmap generation.
2009-11-06 11:37:32 -08:00
Brian Paul
409469fb70 intel: fix up some XRGB breakage
We weren't choosing the right XRGB span functions for reading the
framebuffer.  XRGB formats still aren't turned on yet though.
2009-10-30 09:13:04 -06:00
Brian Paul
4a253431ab intel: update intel_create_renderbuffer(format), add XRGB support
Pass a gl_format to intel_create_renderbuffer() instead of GLenum.
Add cases for MESA_FORMAT_XRGB8888 textures and renderbuffers.
However, we don't yet create any renderbuffers or textures with that
format.  It seems the default alpha value is zero instead of one.
Need to investigate that first.
2009-10-29 19:12:50 -06:00
Brian Paul
1f196b786d Merge branch 'texformat-rework'
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-28 21:24:11 -06:00
Brian Paul
0ea575d721 Merge branch 'mesa_7_6_branch' 2009-10-28 18:27:25 -06:00
Vinson Lee
c0a61c8442 intel: Fix memory leak in case of renderbuffer bad format
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-10-28 13:09:44 -06:00
Eric Anholt
49d402e275 Merge remote branch 'origin/mesa_7_6_branch'
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
2009-10-23 15:21:05 -07:00
Eric Anholt
2d17dbfb53 intel: Keep track of x,y offsets in miptrees and use them for blitting.
By just using offsets, we confused the hardware's tiling calculations,
resulting in failures in miptree validation and blit clears.

Fixes piglit fbo-clearmipmap.

Bug #23552. (automatic mipmap generation)
2009-10-23 14:12:24 -07:00
Brian Paul
68d94a608a intel: use MESA_FORMAT_S8_Z24 format and avoid z24s8/s8z24 conversions 2009-10-21 20:02:33 -06:00
Brian Paul
e6594a22f2 intel: pass zslice to intel_miptree_image_offset()
This lets us get rid of intel_miptree_depth_offsets() and simplify all
of the calling code.
2009-10-12 18:12:00 -06:00
Brian Paul
45e76d2665 mesa: remove a bunch of gl_renderbuffer fields
_ActualFormat is replaced by Format (MESA_FORMAT_x).
ColorEncoding, ComponentType, RedBits, GreenBits, BlueBits, etc. are
all replaced by MESA_FORMAT_x queries.
2009-10-08 20:27:27 -06:00
Brian Paul
3e34a2a2b9 drivers: don't include texformat.h
And remove other unneeded #includes while we're at it.
2009-10-05 18:11:37 -06:00
Brian Paul
1f7c914ad0 mesa: replace gl_texture_format with gl_format
Now gl_texture_image::TexFormat is a simple MESA_FORMAT_x enum.
ctx->Driver.ChooseTexture format also returns a MESA_FORMAT_x.
gl_texture_format will go away next.
2009-09-30 20:28:45 -06:00
Brian Paul
ddffe4546a drivers: use more mesa format functions 2009-09-27 20:40:35 -06:00
Brian Paul
4de8e2123e mesa: rename functions to be more consistant with rest of mesa 2009-09-19 17:06:15 -06:00
Brian Paul
8cb389ce35 intel: use new _mesa_meta_blit_framebuffer() function
The previous version of framebuffer blit was a quick hack.  The new meta
version works pretty well.
2009-08-10 13:55:32 -06:00
Jakob Bornecrantz
862488075c Merge branch 'mesa_7_5_branch'
Conflicts:
	src/mesa/main/dlist.c
	src/mesa/vbo/vbo_save_api.c
2009-07-03 18:53:58 +02:00
Michel Dänzer
94e1117c9b intel: Also update stencil bits in intel_update_wrapper().
Fixes assertion failure when binding depth/stencil texture to FBO stencil
attachment.
2009-07-03 17:54:34 +02:00
Eric Anholt
1ba96651e1 intel: Add support for tiled textures.
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-06-04 14:00:43 +00:00
Eric Anholt
e78a6aa2b9 intel: Fall back on any rendering to texture with no miptree.
Fixes segfault on an fbo.c negative test for FBO with texture width/height
of 0.  Previously we just tested for border != 0 to work around this
segfault.
2009-05-21 10:40:11 -07:00
Eric Anholt
8bba183b9e intel: Mark the FBO as incomplete if there's no intel_renderbuffer for it.
This happens to rendering with textures with a border, which had resulted
in a segfault on dereferencing the irb.
2009-05-21 10:40:11 -07:00
Eric Anholt
2c30fd84df intel: Add support for argb1555, argb4444 FBOs and fix rgb565 fbo readpixels.
Also enable them all regardless of screen bpp, as 32 bpp what I've been
testing against, and haven't been able to detect any screen bpp-specific
troubles with them.
2009-04-16 12:04:30 -07:00
Brian Paul
ee41bb2ed0 i965: fix screen depth test in intel_validate_framebuffer)_
front_region may be null.
2009-03-05 17:25:25 -07:00
Brian Paul
4f8ed56d16 intel: no-op the intel_finish_render_texture() function
It doesn't have to do anything.  See comments for more details.
2009-02-26 18:48:36 -07:00