Commit Graph

96 Commits

Author SHA1 Message Date
Brian Paul
4e43126a59 intel: added null ptr check
This fixes a segfault seen with piglit's fdo20701 test.
2009-06-29 15:26:28 -06:00
Ian Romanick
2d86503471 intel / DRI2: Additional flush of fake front-buffer to real front-buffer
To maintain correctness, the server will copy the real front-buffer to
a newly allocated fake front-buffer in DRI2GetBuffersWithFormat.
However, if the DRI2GetBuffersWithFormat is triggered by glViewport,
this will copy stale data into the new buffer.  Fix this by flushing
the current fake front-buffer to the real front-buffer in
intel_viewport.

Fixes bug #22288.
2009-06-26 13:32:26 -07:00
Eric Anholt
61a2c9668f intel: Skip the DRI2 renderbuffer update when doing Viewport on an FBO.
(cherry picked from commit d4a42b0ce6)
2009-06-17 10:52:49 -07:00
Brian Paul
99960393ed intel: added null ptr check
Fixes segfault in context tear-down when glClear was never called.
2009-05-13 11:33:16 -06:00
Brian Paul
2e4e346890 intel: create a private gl_array_object for intel_clear_tris(), fix bug 21638
gl_array_object encapsulates a set of vertex arrays (see the
GL_APPLE_vertex_array_object extension).
Create a private gl_array_object for drawing the quad for intel_clear_tris()
so we don't have to worry about the user's vertex array state.
This fixes the no-op glClear bug #21638 and removes the need to call
_mesa_PushClientAttrib() and _mesa_PopClientAttrib().
2009-05-13 10:28:00 -06:00
Brian Paul
43d9020ff1 i965: avoid segfault in intel_update_renderbuffers() if using DRI1 2009-04-28 09:58:44 -06:00
Ian Romanick
022319b92c intel: Fix more issues with the combined depth-stencil attachment 2009-04-24 16:39:00 -07:00
Ian Romanick
302ba83116 intel: Initialize region ptr to prevent assertion in intel_region_reference 2009-04-24 16:30:13 -07:00
Ian Romanick
f2272b5b2f intel / DRI2: When available, use DRI2GetBuffersWithFormat
This interface gives the driver two important features.  First, it can
allocate the (fake) front-buffer only when needed.  Second, it can
tell the buffer allocator the format of buffers being allocated.  This
enables support for back-buffer and depth-buffer with different bits
per pixel.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
2009-04-24 12:48:20 -07:00
Roland Scheidegger
50853be894 intel: fix max anisotropy supported
i915 actually supports up to 4 (according to header file - not tested),
i965 up to 16 (code already handled this but slightly broken), so don't use 2
for all chips, even though angular dependency is very high.
2009-04-22 17:38:06 +02:00
Brian Paul
ded05d32d5 intel: added screen->dri2.loader null pointer check in intel_flush()
Fixes segfaults when rendering to front buffer.
2009-04-10 08:36:19 -06:00
Ian Romanick
6a6e478e55 intel / DRI2: Accept fake front-buffer from loader
Handle the loader returning a fake front-buffer.  Since the driver
never specifically requests a fake front-buffer, the driver assumes
that it will never receive both a fake and a real front-buffer.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
2009-04-09 14:18:14 -07:00
Ian Romanick
43cf0d1eeb intel / DRI2: Track and flush front-buffer rendering
Track two flags:  whether or not front-buffer rendering is currently
enabled and whether or not front-buffer rendering has been enabled
since the last glFlush.  If the second flag is set, the front-buffer
is flushed via a loader call back.  If the first flag is cleared, the
second flag is cleared at this time.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
2009-04-09 14:18:14 -07:00
Eric Anholt
6b187cc8a5 intel: Avoid dri2 GetBuffers round-trips for internal Viewport calls.
This gets us the savings for driver-internal viewport calls that
dd1c68f151 was attempting, without relying
on Xlib internals or clients handling X events.
2009-04-06 11:17:25 -07:00
Eric Anholt
40bc2748c2 intel: Add always_flush_batch driconf option for making small batchbuffers.
This can improve debugging with INTEL_DEBUG=batch,sync by giving smaller
batchbuffers.
2009-03-05 19:42:18 -08:00
Eric Anholt
f3687284c1 intel: Add always_flush_cache driconf option for debugging cache flush failure.
I keep wanting to hack this knob in as a one-time thing, so it seemed useful
to have all the time.
2009-03-05 19:42:17 -08:00
Robert Ellison
3468315087 i965: add software fallback for conformant 3D textures and GL_CLAMP
The i965 hardware cannot do GL_CLAMP behavior on textures; an earlier
commit forced a software fallback if strict conformance was required
(i.e. the INTEL_STRICT_CONFORMANCE environment variable was set) and
2D textures were used, but it was somewhat flawed - it could trigger
the software fallback even if 2D textures weren't enabled, as long
as one texture unit was enabled.

This fixes that, and adds software fallback for GL_CLAMP behavior with
1D and 3D textures.

It also adds support for a particular setting of the INTEL_STRICT_CONFORMANCE
environment variable, which forces software fallbacks to be taken *all*
the time.  This is helpful with debugging.  The value is:
   export INTEL_STRICT_CONFORMANCE=2
2009-03-04 16:59:00 -07:00
Shaohua Li
40290745ea i915: Add support for a new G33-like chipset.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-02-27 11:49:10 -08:00
Eric Anholt
60953059ea intel: Clean up several 965 memory leaks on context destroy. 2009-02-17 10:58:32 -08:00
Eric Anholt
01bc4d441f intel: Don't do the extra MI_FLUSH in flushing except when doing glFlush().
Everything other than "make sure the last rendering ends up visible on the
screen" doesn't need that behavior.
2009-02-10 18:45:18 -08:00
Eric Anholt
f82f1ffba9 intel: don't crash when dri2 tells us about buffers we don't care about. 2009-02-10 18:45:17 -08:00
Brian Paul
d555cdbe3e intel: remove old #includes 2009-01-26 12:39:28 -07:00
Brian Paul
4006c5e452 intel: move intelInitExtensions() and related code into new intel_extensions.c 2009-01-26 12:39:28 -07:00
Brian Paul
4451eb2e75 intel: move glClear-related code into new intel_clear.c file 2009-01-26 12:39:28 -07:00
Brian Paul
6fcebbe719 intel: Move swap-related functions from intel_buffers.c to new intel_swapbuffers.c 2009-01-26 12:39:28 -07:00
Brian Paul
cba5ce1665 Merge branch 'tex_combine4' 2009-01-23 17:39:44 -07:00
Brian Paul
96ee3db6f7 intel: enable GL_NV_texture_env_combine4 extension 2009-01-23 17:32:59 -07:00
Owain G. Ainsworth
39b4061bb9 intel: Prevent an "irq is not working" printf when only pipe B is enabled.
intelMakeCurrent is called before intelWindowMoved (in fact, it calls
it), so calculation of the correct vblank crtc has not happened yet.
Fix this by making a function that fixes up a set of vblank flags and
call if from both functions.
2009-01-23 12:51:19 -08:00
Brian Paul
b8fc605cdb Merge branch 'vertex_array_bgra' 2009-01-23 11:29:05 -07:00
Brian Paul
dab586b075 i965: enable GL_EXT_vertex_array_bgra
Simply a matter of choosing the right surface/vertex format for GLubyte/GL_BGRA arrays.
2009-01-23 11:27:42 -07:00
Ian Romanick
f7265e7a57 965: Enable GL_EXT_stencil_two_side 2009-01-23 09:49:29 -08:00
Brian Paul
a7f98f4c7e i965: enable GL_ARB_framebuffer_object 2009-01-22 15:43:50 -07:00
Brian Paul
6d2e1f6a2c intel: add GL_EXT_framebuffer blit extension
This functionality is required by GL_ARB_framebuffer_object.
For now, implement it in terms of glCopyPixels().  This will need to be
revisted though.
2009-01-22 15:43:40 -07:00
Timo Aaltonen
39e6d0d810 [intel] Go back to using the typedef for the sarea struct
The upstream linux kernel headers and libdrm kernel headers disagree on the
tag name for the sarea struct: _drm_i915_sarea vs drm_i915_sarea.  They
both typedef it to drm_i915_sarea_t though, so just use that.
2009-01-20 11:52:32 -05:00
Xiang, Haihao
c157a5bb91 intel: bump driver date 2009-01-14 09:32:55 +08:00
Xiang, Haihao
0c4346e632 intel: disable ATI_texture_env_combine3 for i830( and related device).
Thanks to Eric for pointing it out.
2008-12-30 11:25:45 +08:00
Xiang, Haihao
0674a23854 intel: enable ATI_texture_env_combine3. Fixes #17707 2008-12-29 09:32:51 +08:00
Dave Airlie
b359350017 Remove third buffer support from Mesa.
This is part of the deprecated pageflipping infrastructure.
2008-12-23 15:01:53 -08:00
Eric Anholt
2adef553f2 i915: Don't overwrite i915's Viewport function from generic code.
Instead, have i965 and i915 both call the generic function from their Viewport.
2008-11-21 13:23:46 +08:00
Eric Anholt
0cade4de4f intel: Don't keep intel->pClipRects, and instead just calculate it when needed.
This avoids issues with dereferencing stale cliprects around intel_draw_buffer
time.  Additionally, take advantage of cliprects staying constant for FBOs and
DRI2, and emit cliprects in the batchbuffer instead of having to flush batch
each time they change.
2008-10-28 13:23:33 -07:00
Ian Romanick
e700269441 intel: GLSL 1.20 is broken in Mesa, so disable it in the i965 driver 2008-10-10 11:47:43 -07:00
Eric Anholt
c157cfc637 i965: Add ARB_occlusion_query support. 2008-10-07 18:52:12 -07:00
Ian Romanick
db9ba91971 intel: Don't advertise unsupported extensions on pre-965 hardware
Move GL_ARB_texture_non_power_of_two and GL_ATI_separate_stencil
from the generic extension list to the 965-specific list.  Neither
extension is supported on i830-class hardware, and
GL_ATI_separate_stencil is not supported on i915-class hardare.
GL_ARB_texture_non_power_of_two is supported on i915-class hardare and
is already in the i915-specific list.
2008-10-03 12:16:04 -07:00
Ian Romanick
4741dbcbbc Unify ARB_depth_texture and SGIX_depth_texture
The ARB extension is a superset of the older SGIX extension.  Any
hardware that can support the SGIX version can also support the ARB
version.  In Mesa, any driver that supports one also supports the
other.  This unification just simplifies some bits of code.
2008-10-01 20:38:10 -07:00
Ian Romanick
08b9e29c1d intel: Clean-up the extension string madness!
- Sort extensions by ARB, then EXT, then vendor by name
- Remove redundant (only one of GL_{ARB,EXT,NV}_texture_rectangle) or
  duplicate extension strings
2008-09-29 18:50:05 -07:00
Eric Anholt
7d99ddcb2b intel: Fix a number of memory leaks on context destroy. 2008-09-26 15:39:20 -07:00
Keith Whitwell
7ce597508e mesa: improved driver query interface
Brought over from gallium-0.2 branch.
2008-09-21 09:44:25 -07:00
Brian Paul
ecadb51bbc mesa: added "main/" prefix to includes, remove some -I paths from Makefile.template 2008-09-18 15:17:05 -06:00
Eric Anholt
904f31a624 intel: Destroy bufmgr in screen destroy, not context.
Caused server crashes on second context creation since
7e0bbdcf03.

Bug #17600.
2008-09-16 17:02:41 -07:00
Eric Anholt
8db761409d intel: Add a width field to regions, and use it for making miptrees in TFP.
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-12 15:48:13 -07:00