Commit graph

23424 commits

Author SHA1 Message Date
Maciej Cencora
f8c30793d1 r300: more cleanup
- remove unnecessary r300TranslateFragmentShader call from r300UpdateShaderStates (it is already called in r300UpdateShaders)
- remove unnecessary null ptr checks
2009-05-16 11:42:03 -04:00
Maciej Cencora
1961caeda8 r300: move some code to common path 2009-05-16 11:42:03 -04:00
Maciej Cencora
12ed56f1dd r300: rename functions
Be consistent with function naming: use Setup/Emit names for functions that modify hardware state
2009-05-16 11:42:03 -04:00
Maciej Cencora
6f1a86ca1e r300: move forward declarations to where they belong 2009-05-16 11:42:02 -04:00
Maciej Cencora
2240c0d333 r300: software fallbacking handling rewrite
Until now falling back to software rasterizer worked only for TCL enabled cards.
For non TCL cards we used to plug our rendering functions in r300InitSwtcl, and we had never restored original functions for software rasterizer.
2009-05-16 11:42:02 -04:00
Maciej Cencora
621f65ab86 r300: r300EmitArrays should never fail 2009-05-16 11:42:02 -04:00
Maciej Cencora
d6da805c4e r300: remove unnecessary switch cases 2009-05-16 11:42:02 -04:00
Maciej Cencora
42f16aa4e0 r300: further cleanup
- move extensions init into seperate function
- move options handling into seperate function
- create new structure to hold options values
- use context->options.hw_tcl_enabled field instead of global hw_tcl_on and future_hw_tcl_on variables
2009-05-16 11:42:02 -04:00
Jakob Bornecrantz
3259f52a92 gallium-intel: Enable trace driver 2009-05-16 01:51:30 +01:00
Jakob Bornecrantz
f04c38fa1f trace: Export enabled status 2009-05-16 01:50:53 +01:00
Jakob Bornecrantz
ee05658798 trace: Unwrap buffer in texture_blanket 2009-05-16 01:50:53 +01:00
Jakob Bornecrantz
ab95f389a5 trace: If either shader is disabled don't draw 2009-05-16 01:50:53 +01:00
Jakob Bornecrantz
3b4da4e9da trace: Put shaders on a list in the context 2009-05-16 01:50:53 +01:00
Jakob Bornecrantz
c30f661189 trace: Move state dump functions to tr_dump_state.[c|h] 2009-05-16 01:50:53 +01:00
Eric Anholt
22690482e6 intel: Don't complain on falling back from PBO fastpaths.
Instead, stash the debug info under the handy debug flag.

Bug #20053
2009-05-15 17:32:21 -07:00
Eric Anholt
0307e609aa mesa: Mark FBOs with compressed color attachments as FBO-incomplete.
Both EXT_fbo and ARB_fbo agree on this.  Fixes a segfault in the metaops
mipmap generation in Intel for SGIS_generate_mipmap of S3TC textures in
Regnum Online.

Bug #21654.
2009-05-15 16:47:37 -07:00
Jakob Bornecrantz
97ccdee68a gallium-intel: Build with scons 2009-05-15 22:54:07 +01:00
Jakob Bornecrantz
c4538e326a st/egl: Use proper Makefile 2009-05-15 22:52:30 +01:00
Steinar H. Gunderson
b197a8ade3 i915: Fix 945 cube map layout for the small mipmaps along the bottom.
Bug #21691.
2009-05-15 12:50:11 -07:00
Eric Anholt
4c6f829899 i915: Use Stencil.Enabled instead of Stencil._Enabled in DrawBuffers.
The _Enabled field isn't updated at the point that DrawBuffers is called,
and the Driver.Enable() function does the testing for stencil buffer
presence anyway.

bug #21608 for Radeon
2009-05-15 12:45:33 -07:00
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
Brian Paul
483e247804 mesa: bump version to 7.5-rc2 2009-05-15 08:03:56 -06:00
Brian Paul
65b9cd74e3 docs: updates from the 7.4 branch 2009-05-15 08:02:40 -06: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
Jerome Glisse
76a64958a4 r300: don't send now forbidden register to kernel when with memory manager 2009-05-14 17:25:24 +02:00
Michel Dänzer
09c04db3c9 r300: Make sure to drop current hardware state reference to texture objects.
Fixes potential texture object leaks.
2009-05-14 11:13:06 +02: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
Alex Deucher
7cd57e35b6 R1xx/r2xx: Don't use an alpha texture format for GLX_TEXTURE_FORMAT_RGB_EXT
In r*00SetTexBuffer2(), if the passed in text glx_texture_format
is GLX_TEXTURE_FORMAT_RGB_EXT, then we should use an RGB-only
texture format, even if the DRI buffer has four channels.

https://bugs.freedesktop.org/show_bug.cgi?id=21609
2009-05-13 19:43:04 -04:00
Owen W. Taylor
ca792be42b radeon: Don't crash generating mipmaps when pixels=NULL
When a NULL value of pixels is passed to TexImage2D and
SGIS_generate_mipmap is enabled, don't try to generate the
mipmap tree: we don't have data yet for the texture and will
crash.

https://bugs.freedesktop.org/show_bug.cgi?id=21648
2009-05-13 19:06:24 -04:00
Owen W. Taylor
ea6a74abbe Don't use an alpha texture format for GLX_TEXTURE_FORMAT_RGB_EXT
In r300SetTexBuffer2(), if the passed in text glx_texture_format
is GLX_TEXTURE_FORMAT_RGB_EXT, then we should use an RGB-only
texture format, even if the DRI buffer has four channels.

https://bugs.freedesktop.org/show_bug.cgi?id=21609
2009-05-13 19:04:18 -04:00
Owen W. Taylor
34eab5dd9c Call _mesa_update_stencil() before accessing ctx->Stencil._Enabled
ctx->Stencil._Enabled is derived state and not immediately updated
when the stencil parameters are changed; we need to make sure that
it is up-to-date before accessing it.

https://bugs.freedesktop.org/show_bug.cgi?id=21608
2009-05-13 19:02:51 -04:00
Owen W. Taylor
038f0bf591 Remove subpixel offset from viewport
Remove an eigth-pixel offset of the viewport inherited from
R100 code. This seems not to be necessary and causes blurring
when sampling textures 1:1.

https://bugs.freedesktop.org/show_bug.cgi?id=20340
2009-05-13 18:57:47 -04: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
ac5bf63f74 docs: GL_APPLE_vertex_array_object for Gallium drivers and Intel DRI drivers 2009-05-13 11:24:11 -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