Commit graph

19852 commits

Author SHA1 Message Date
Eric Anholt
5c5a468848 i915: Only use the new 945 cube layout for compressed textures.
The docs actually explain this, but not in a terribly clear manner.
This nearly fixes the piglit cubemap testcase, except that something's
going wrong with the nearest filtering at 2x2 sizes in the testcase.
Looks good by visual inspection, though.

Bug #21692
2009-05-15 11:43:39 -07:00
Eric Anholt
dc657f3929 i965: Fix varying payload reg assignment for the non-GLSL-instructions path.
I don't have a testcase for this, but it seems clearly wrong.
2009-05-14 11:41:04 -07:00
Eric Anholt
0f5113deed i965: Fix register allocation of GLSL fp inputs.
Before, if the VP output something that is in the attributes coming into
the WM but which isn't used by the WM, then WM would end up reading subsequent
varyings from the wrong places.  This was visible with a GLSL demo
using gl_PointSize in the VS and a varying in the WM, as point size is in
the VUE but not used by the WM.  There is now a regression test in piglit,
glsl-unused-varying.
2009-05-14 11:41:04 -07:00
Eric Anholt
64980125c7 intel: Use FRONT_AND_BACK for StencilOp as well. 2009-05-14 11:41:04 -07:00
Eric Anholt
d866abeffc intel: Use GL_FRONT_AND_BACK for stencil clearing.
This comes from a radeon-rewrite fallback fix, but may also fix stencil
clear failure when the polygon winding mode is flipped.
2009-05-14 11:41:03 -07:00
Corbin Simpson
96922d1b71 r300-gallium: Correct VTE setup for surface_fill, make surface_copy emit right. 2009-05-14 09:47:07 -07:00
Robert Ellison
ab6c4fa582 i965: fix 1D texture borders with GL_CLAMP_TO_BORDER
With 1D textures, GL_TEXTURE_WRAP_T should be ignored (only
GL_TEXTURE_WRAP_S should be respected).  But the i965 hardware
seems to follow the value of GL_TEXTURE_WRAP_T even when sampling
1D textures.

This fix forces GL_TEXTURE_WRAP_T to be GL_REPEAT whenever 1D
textures are used; this allows the texture to be sampled
correctly, avoiding "imaginary" border elements in the T direction.

This bug was demonstrated in the Piglit tex1d-2dborder test.
With this fix, that test passes.
2009-05-14 10:36:33 -06:00
Robert Ellison
bc3270e99f i965: send all warnings through _mesa_warning()
One warning message:
   drm_i915_getparam: -22

was still being sent to fprintf().  This causes all Piglit tests to fail,
even with MESA_DEBUG=0.

Using _mesa_warning() to emit the message allows the general Mesa controls
for messages like this to be applied.
2009-05-14 10:36:33 -06:00
Corbin Simpson
d3912e301f r300-gallium: Clean up outdated comments. 2009-05-13 17:24:47 -07:00
Corbin Simpson
15601e9702 r300-gallium: Space accounting for textures. 2009-05-13 17:01:03 -07:00
Brian Paul
ca327b1688 Merge branch 'mesa_7_5_branch' 2009-05-13 11:33:52 -06: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
a566b6d8ff intel: enable GL_APPLE_vertex_array_object
No special driver changes are needed for this extension.
2009-05-13 11:19:33 -06:00
Brian Paul
a892acef98 st/mesa: enable GL_APPLE_vertex_array_object for gallium drivers 2009-05-13 11:22:21 -06:00
Brian Paul
3039acfc5d Merge branch 'mesa_7_5_branch'
Conflicts:

	src/mesa/main/arrayobj.c
	src/mesa/main/arrayobj.h
	src/mesa/main/context.c
2009-05-13 10:33:21 -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
3e74faa029 mesa: delete array objects before buffer objects during context tear-down
The former may point to the later.
2009-05-13 09:47:13 -06:00
Brian Paul
7ae4ce9e22 mesa: clean-up vertex array object VBO unbinding and delete/refcounting
Don't really delete vertex array objects until the refcount hits zero.
At that time, unbind any pointers to VBOs.
(cherry picked from commit 32b851c807)
2009-05-13 09:32:53 -06:00
Brian Paul
5568f2f601 mesa: reference counting for gl_array_object
Every kind of object that can be shared by multiple contexts should be
refcounted.
(cherry picked from commit 1030bf0ded)
2009-05-13 09:27:31 -06:00
Brian Paul
10c4a10b97 i965: enable additional code in emit_fb_write()
Not 100% sure this is right, but the invalid assertion is fixed...
2009-05-12 15:14:34 -06:00
Brian Paul
5590798f6d i965: increase BRW_EU_MAX_INSN 2009-05-12 15:14:34 -06:00
Brian Paul
4d244fb899 i965: comment 2009-05-12 15:14:34 -06:00
Joakim Sindholt
167a6b0804 r300-gallium: add missing semicolon
Yeah, that was stupid
2009-05-12 22:01:59 +02:00
Joakim Sindholt
62c0c7d81a r300-gallium: duplicate tokens in create_fs_state
This was all phoenix64's idea. Credit goes to him
2009-05-12 21:41:48 +02:00
Eric Anholt
d4a42b0ce6 intel: Skip the DRI2 renderbuffer update when doing Viewport on an FBO. 2009-05-12 10:21:00 -07:00
Eric Anholt
aa422b2625 intel: Map write-only buffer objects through the GTT when possible.
This looks to be a win of a few percent in cairogears with new vbo code,
thanks to not polluting caches.
2009-05-12 10:08:19 -07:00
Eric Anholt
0fc5fa85bf i915: Fix driver after HW glGenerateMipmap commit. 2009-05-12 10:08:19 -07:00
Brian Paul
6d63dec41f swrast: update/restore the opt_sample_rgb/rgba_2d() functions 2009-05-12 09:05:31 -06:00
Michel Dänzer
46b81b0cc8 glXChooseVisual: Only consider fbconfig if we can get the corresponding visual.
This can fail, e.g. when XLIB_SKIP_ARGB_VISUALS=1 is set.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524794 and
http://bugs.freedesktop.org/show_bug.cgi?id=21600 .
2009-05-12 09:34:13 +02:00
Ian Romanick
64f36ff9fb Test either GL_FRONT_LEFT or GL_FRONT for front-buffer rendering
For non-stereo visuals, which is all we support, we treat
GL_FRONT_LEFT as GL_FRONT.  However, they are technically different,
and they have different enum values.  Test for either one to determine
if we're in front-buffer rendering mode.

This fix was suggested by Pierre Willenbrock.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 2085cf2462)
2009-05-11 17:16:11 -07:00
Brian Paul
e7cb125b2d Merge branch 'mesa_7_5_branch'
Conflicts:

	Makefile
	src/mesa/main/version.h
2009-05-11 16:27:50 -06:00
Brian Paul
f104e4d666 st: do proper refcounting for framebuffer surfaces 2009-05-11 16:09:39 -06:00
Joakim Sindholt
783e43064b r300-gallium: unbreak build 2009-05-11 21:44:49 +02:00
Corbin Simpson
64f60bc046 r300-gallium: Setup surface in r300_surface_copy.
I haven't tested, but this may unbreak surface copies.
2009-05-11 10:09:59 -07:00
Corbin Simpson
b315ec43ee r300-gallium: Cleanup some compile warnings. 2009-05-11 10:07:40 -07:00
Corbin Simpson
e9f8b7f1b9 r300-gallium: Cleanup PSC for HW TCL.
Still dies in assert, but at least it's not my assert anymore. :3
2009-05-11 09:57:57 -07:00
Corbin Simpson
f38a02212f radeon-gallium: Forgot a typedef. 2009-05-11 09:55:28 -07:00
Corbin Simpson
2e22bd8460 radeon-gallium: Support new info ioctls in addition to classic getparams.
This makes non-hybrid kernels like newttm from drm-next-radeon work
while avoiding breakage with Fedora/Ubuntu/etc.
2009-05-11 09:05:33 -07:00
Brian Paul
7c3d7353d7 mesa: updated comments for _mesa_generate_mipmap() 2009-05-11 10:02:27 -06:00
Brian Paul
6697311b21 i965: handle extended swizzle terms (0,1) in get_src_reg()
Fixes failed assertion in progs/glsl/twoside.c (but still wrong rendering).
2009-05-11 09:47:32 -06:00
Brian Paul
7c2fe42ded mesa: better handling/printing of driver-specific opcodes, register files
Drivers such as i965 define extra instruction opcodes and register files.
Improve the program printing code to handle those opcodes/files better.
2009-05-11 09:47:32 -06:00
Brian Paul
2223615e0a mesa: Fixed a texture memory leak
The current texture for any particular texture unit is given an additional
reference in update_texture_state(); but if the context is closed before
that texture can be released (which is quite frequent in normal use, unless
a program unbinds and deletes the texture and renders without it to force
a call to update_texture_state(), the memory is lost.

This affects general Mesa; but the i965 is particularly affected because
it allocates a considerable amount of additional memory for each allocated
texture.

(cherry picked from master, commit c230767d69)
2009-05-11 09:46:56 -06:00
Hanno Böck
c8c0953294 gallium: replace lib with $(LIB_DIR) 2009-05-09 16:17:37 -06:00
Corbin Simpson
53c2cc8fef radeon-gallium: Clean up some of the BO counting logic. 2009-05-09 00:45:48 -07:00
Corbin Simpson
a738d2b4c2 r300-gallium: vs: Make imms work, cleanup some of the switches. 2009-05-09 00:45:48 -07:00
Corbin Simpson
c4c5bf31a7 r300-gallium: Start VS dumper. 2009-05-09 00:45:48 -07:00
Corbin Simpson
7e347a0f49 r300-gallium: vs: Add SLT, clean up MAX.
This should be all the opcodes for basic TCL.
2009-05-09 00:45:48 -07:00
Corbin Simpson
9b10777148 r300-gallium: vs: Add MAX. 2009-05-09 00:45:48 -07:00
Corbin Simpson
e669ce01d4 r300-gallium: vs: Add scalar setup, RSQ.
Icky icky icky icky. Icky icky, icky icky. Icky.
2009-05-09 00:45:48 -07:00
Corbin Simpson
c6d2b4a495 r300-gallium: vs: Add writemasks. 2009-05-09 00:45:47 -07:00