OSDN Git Service
Brian Paul [Thu, 21 May 2009 22:57:28 +0000 (16:57 -0600)]
Merge branch 'mesa_7_5_branch'
Brian Paul [Thu, 21 May 2009 22:54:35 +0000 (16:54 -0600)]
vbo: fix incorrect loop limit in bind_array_obj()
The generic_array[] is 16 elements in size, but the loop was doing 32
iterations. The out of bounds array write was clobbering the following
inputs[] array but as luck would have it, that didn't matter.
Brian Paul [Thu, 21 May 2009 22:52:45 +0000 (16:52 -0600)]
mesa: use MAX_ values instead of literals
Brian Paul [Thu, 21 May 2009 22:05:11 +0000 (16:05 -0600)]
mesa: freshen comments for update_array()
Brian Paul [Thu, 21 May 2009 22:03:18 +0000 (16:03 -0600)]
mesa: minor code simplification in _mesa_GetVertexAttrib*NV()
Brian Paul [Thu, 21 May 2009 22:02:50 +0000 (16:02 -0600)]
mesa: comment for _mesa_GetVertexAttribfvARB()
Brian Paul [Thu, 21 May 2009 21:57:29 +0000 (15:57 -0600)]
mesa: minor code simplification in _mesa_GetVertexAttribfvARB()
Brian Paul [Thu, 21 May 2009 21:55:50 +0000 (15:55 -0600)]
mesa: remove const qualifier
Brian Paul [Thu, 21 May 2009 21:55:33 +0000 (15:55 -0600)]
mesa: VertexAttribPointer comments
Brian Paul [Thu, 21 May 2009 21:36:25 +0000 (15:36 -0600)]
mesa: call _mesa_update_array_object_max_element() before printing array info
Brian Paul [Thu, 21 May 2009 16:15:18 +0000 (10:15 -0600)]
mesa: added gl_array_object::Weight array field
We don't really implement vertex weights but in the VBO code this
fixes and odd case for the legacy_array[] setup. Before, the
vbo->draw_prims() call was always indicating that the vertex weight
array was present/enabled when it really wasn't.
Brian Paul [Thu, 21 May 2009 16:11:13 +0000 (10:11 -0600)]
mesa: check FEATURE_point_size_array for PointSize array
Brian Paul [Thu, 21 May 2009 16:05:04 +0000 (10:05 -0600)]
mesa: fix some potential state-restore issues in pop_texture_group()
Call the _mesa_set_enable() functions instead of driver functions, etc.
Also, add missing code for 1D/2D texture arrays.
Brian Paul [Thu, 21 May 2009 15:56:41 +0000 (09:56 -0600)]
mesa: new _mesa_update_array_object_max_element() function
This will replace the code in state.c
Brian Paul [Thu, 21 May 2009 15:52:33 +0000 (09:52 -0600)]
vbo: return VP_NONE from get_program_mode() if running fixed-func vertex program
If we're running a vertex program to emulated fixed-function, we still need
to treat vertex arrays/attributes as if we're in fixed-function mode.
This should probably be back-ported to Mesa 7.5 after a bit more testing.
Brian Paul [Thu, 21 May 2009 15:50:55 +0000 (09:50 -0600)]
vbo: move vp_mode enum to vbo_exec.h, use enum instead of GLuint
Eric Anholt [Thu, 21 May 2009 04:15:46 +0000 (21:15 -0700)]
i965: fix whitespace in brw_tex_layout.c
The broken indentation was driving me crazy, so fix other stuff while
I'm here.
Eric Anholt [Wed, 20 May 2009 22:59:07 +0000 (15:59 -0700)]
i956: Make state dependency of SF on drawbuffer bounds match Mesa's.
Noticed while debugging a weird 1D FBO testcase that left its existing
viewport and projection matrix in place when switching drawbuffers. Didn't
fix the testcase, though.
Eric Anholt [Wed, 20 May 2009 21:16:34 +0000 (14:16 -0700)]
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.
Eric Anholt [Wed, 20 May 2009 21:05:03 +0000 (14:05 -0700)]
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.
Eric Anholt [Wed, 20 May 2009 21:00:32 +0000 (14:00 -0700)]
intel: Don't segfault on glGenerateMipmaps of a cube map with one face defined.
This presumably applies to SGIS_generate_mipmaps as well.
Eric Anholt [Wed, 20 May 2009 20:09:04 +0000 (13:09 -0700)]
intel: Use _mesa_CheckFramebufferStatusEXT insteaad of glCheck...
Fixes a segfault in our oglconform fbo test.
Brian Paul [Thu, 21 May 2009 15:12:35 +0000 (09:12 -0600)]
mesa: added debug functions for dumping color/depth/stencil buffers
Brian Paul [Fri, 15 May 2009 15:14:24 +0000 (09:14 -0600)]
i965: rename var: s/tmp/vs_inputs/
Brian Paul [Thu, 14 May 2009 22:51:10 +0000 (16:51 -0600)]
mesa: remove pointless null ptr check, improved some error messages
Brian Paul [Thu, 14 May 2009 22:25:32 +0000 (16:25 -0600)]
mesa: added _mesa_print_arrays() for debugging
Brian Paul [Thu, 14 May 2009 22:23:34 +0000 (16:23 -0600)]
mesa: updated comment for _MaxElement field
It's the largest array index, plus one.
Brian Paul [Thu, 14 May 2009 19:24:24 +0000 (13:24 -0600)]
mesa: move gl_array_attrib::_MaxElement to gl_array_object::_MaxElement
This value is per array object.
Brian Paul [Thu, 14 May 2009 14:22:29 +0000 (08:22 -0600)]
vbo: s/8/MAX_TEXTURE_COORD_UNITS/
Jonathan Adamczewski [Thu, 21 May 2009 14:19:00 +0000 (08:19 -0600)]
cell: perform triangle cull a little earlier
In spu_tri.c:setup_sort_vertices() triangles are culled after the
vertices are sorted. This patch moves the check a little earlier
and performs the actual check a little faster through intrinsics and
a little trickery.
Reduced code size and less work is done before a triangle is deemed
OK to skip.
Jonathan Adamczewski [Thu, 21 May 2009 14:18:03 +0000 (08:18 -0600)]
cell: unroll inner loop of spu_render.c:cmd_render()
It was taking approximately 50 cycles to extract the vertex indices,
calculate the vertex_header pointers and call tri_draw() for each
three vertices - .
Unrolled, it takes less than 100 cycles to extract, unpack,
calculate pointers and call tri_draw() eight times. It does have a
nasty jump-tabled switch. I'm sure that there's a better way...
Code size of spu_render.o gets larger due to the extra constants and
work in the inner loop, there are extra stack saves and loads
because there are more registers in use, and an assert. spu_tri.o
gets a little smaller.
Brian Paul [Thu, 21 May 2009 14:15:22 +0000 (08:15 -0600)]
st: add support for GL_EXT_vertex_array_bgra
Carl Worth [Thu, 21 May 2009 13:52:13 +0000 (07:52 -0600)]
minstall: Don't copy over an identical file
The rationale here is to avoid updating a timestamp for a file that
hasn't changed. Needless updates of the timestamp can ripple into
other projects, (xserver, etc.), useless recompiling due to a
'make install' in mesa that didn't actually change anything.
Corbin Simpson [Thu, 21 May 2009 06:22:16 +0000 (23:22 -0700)]
r300-gallium: r500-fs: POW.
I feel so unclean.
Corbin Simpson [Thu, 21 May 2009 04:52:11 +0000 (21:52 -0700)]
r300-gallium: r500-fs: LRP.
Goddammit. This cannot be the "easy way." :C
Corbin Simpson [Wed, 20 May 2009 23:53:45 +0000 (16:53 -0700)]
r300-gallium: r500-fs: Combine function.
Corbin Simpson [Wed, 20 May 2009 22:02:45 +0000 (15:02 -0700)]
r300-gallium: Prevent assert when fogcoords are present.
Seems like this file is the source of all bad logic. (Pun intended.)
Corbin Simpson [Wed, 20 May 2009 21:55:03 +0000 (14:55 -0700)]
r300-gallium: Another constantbuf shader recompile test.
Less briefly... Shaders need to be recompiled if their constantbuf
offsets have changed. However, since we only change them from shaders if
immediates need to be emitted, we shouldn't bother if the shader doesn't
use immediates.
Corbin Simpson [Wed, 20 May 2009 21:38:22 +0000 (14:38 -0700)]
r300-gallium: Raise constantbuf limits.
Still not correct, but really I don't care.
Corbin Simpson [Wed, 20 May 2009 21:17:27 +0000 (14:17 -0700)]
r300-gallium: fs: Remove cruft from way back when.
Corbin Simpson [Wed, 20 May 2009 20:21:17 +0000 (13:21 -0700)]
radeon-gallium: Add surface_buffer_create callback.
Corbin Simpson [Wed, 20 May 2009 19:22:24 +0000 (12:22 -0700)]
r300-gallium: Make surface_copy actually load the texture in shader.
Corbin Simpson [Wed, 20 May 2009 19:08:00 +0000 (12:08 -0700)]
r300-gallium: Add missing R481 PCI ID.
Per
74cb2aba on xf86-video-ati.
Corbin Simpson [Wed, 20 May 2009 18:46:26 +0000 (11:46 -0700)]
r300-gallium: Make surface_copy work, and refactor buffer validation.
Corbin Simpson [Wed, 20 May 2009 14:18:08 +0000 (07:18 -0700)]
radeon-gallium: Don't permit reading and writing a BO in one CS.
This fixes some silent problems in current libdrm_radeon.
surface_copy still locks up hard.
Brian Paul [Wed, 13 May 2009 01:51:44 +0000 (19:51 -0600)]
st: reformatting, comments, var renaming
Brian Paul [Tue, 19 May 2009 16:07:45 +0000 (10:07 -0600)]
Merge branch 'mesa_7_5_branch'
Mathias Fröhlich [Tue, 19 May 2009 15:59:01 +0000 (09:59 -0600)]
mesa: allow depth/stencil textures to be attached to GL_STENCIL_ATTACHMENT
See sourceforge bug #
2793846.
Brian Paul [Tue, 19 May 2009 15:57:01 +0000 (09:57 -0600)]
mesa: assign trb->Base.StencilBits in update_wrapper().
When we render to a depth/stencil texture there are stencil bits.
Brian Paul [Tue, 19 May 2009 15:21:27 +0000 (09:21 -0600)]
mesa: print more info when valid_texture_object() fails
Jakob Bornecrantz [Sat, 16 May 2009 02:13:15 +0000 (03:13 +0100)]
trace: Improve shader wrapping
Jakob Bornecrantz [Mon, 18 May 2009 01:50:15 +0000 (02:50 +0100)]
st/dri: Only create new textures if drawable has changed
Corbin Simpson [Mon, 18 May 2009 16:50:30 +0000 (09:50 -0700)]
r300-gallium: Fix (another) wrong value in MSPOS.
Again, thanks to agd5f.
Corbin Simpson [Mon, 18 May 2009 16:47:37 +0000 (09:47 -0700)]
radeon-gallium: Remove BO validation debug.
It appears that that area of code "just works" much like classic Mesa's
version, so might as well not waste scrollback on it.
Corbin Simpson [Mon, 18 May 2009 16:41:21 +0000 (09:41 -0700)]
r300-gallium: Cleanup viewport state setup.
Corbin Simpson [Mon, 18 May 2009 16:40:13 +0000 (09:40 -0700)]
r300-gallium: Always do VTE, never software viewport.
This makes glxgears draw properly with SW TCL.
Brian Paul [Mon, 18 May 2009 16:36:50 +0000 (10:36 -0600)]
Merge branch 'mesa_7_5_branch'
Conflicts:
Makefile
src/mesa/main/version.h
Brian Paul [Mon, 18 May 2009 16:28:04 +0000 (10:28 -0600)]
st/mesa: fix incorrect src/dst stride params to _mesa_generate_mipmap_level()
The stride needs to be in texels, not bytes.
Brian Paul [Mon, 18 May 2009 16:27:31 +0000 (10:27 -0600)]
mesa: comments for _mesa_generate_mipmap_level()
Brian Paul [Mon, 18 May 2009 16:13:44 +0000 (10:13 -0600)]
softpipe: add texture target sanity check assertion
Brian Paul [Mon, 18 May 2009 16:12:36 +0000 (10:12 -0600)]
st: fix incorrect target parameter to screen->is_format_supported()
We were passing a GL texture target instead of a pipe_texture_target enum.
Brian Paul [Mon, 18 May 2009 14:46:17 +0000 (08:46 -0600)]
mesa: added linux-osmesa-static config
Contributed by Nicolas Noble. See SF bug #
2792536
Brian Paul [Mon, 18 May 2009 13:17:46 +0000 (07:17 -0600)]
docs: link to 7.5 relnotes
Brian Paul [Mon, 18 May 2009 13:17:36 +0000 (07:17 -0600)]
docs: emphasize the incomplete status of the nouveau/R300 gallium drivers
Aidan Thornton [Mon, 18 May 2009 10:47:00 +0000 (12:47 +0200)]
Initialize psp->waitX/waitGL for swrast_dri.so.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21053 .
Corbin Simpson [Mon, 18 May 2009 04:41:25 +0000 (21:41 -0700)]
r300-gallium: Enable GLSL for r500.
Before you get all excited, this is *not* to be construed as actual support
for GLSL shaders. The GL version is still 1.3, and stuff still sucks. Just
flicking it on so that it can be tested and developed a bit easier.
Corbin Simpson [Mon, 18 May 2009 04:40:16 +0000 (21:40 -0700)]
r300-gallium: r500-fs: DDX and DDY support.
Oh, look, GLSL instructions. I wonder what I'll do next.
Corbin Simpson [Mon, 18 May 2009 04:39:11 +0000 (21:39 -0700)]
dri-gallium: Add GLSL support.
Oh, look, it's more features. :3
Corbin Simpson [Mon, 18 May 2009 04:10:07 +0000 (21:10 -0700)]
r300-gallium: Add half-right COS and SIN.
HW trig does a premultiply by 2pi, where Mesa does another premultiply by pi.
This is a problem.
Corbin Simpson [Mon, 18 May 2009 03:49:39 +0000 (20:49 -0700)]
r300-gallium: Size mismatch.
Corbin Simpson [Mon, 18 May 2009 00:03:15 +0000 (17:03 -0700)]
r300-gallium, radeon-gallium: Nuke gb_pipes from orbit.
See the previous commit for an explanation. This is just all the support code
for GB_TILE_CONFIG.
Corbin Simpson [Sun, 17 May 2009 23:42:54 +0000 (16:42 -0700)]
r300-gallium: Don't set GB_TILE_CONFIG (in userspace.)
This accompanies kernel patches that make GB_TILE_CONFIG's various members
completely controlled in DRM.
GB_TILE_CONFIG has the following controls:
- The number of GB (pixel) pipes enabled
- The size and style of tiling
- Subpixel precision (either 1/12 or 1/16)
Per airlied and glisse, userspace and kernel will now agree (always) on
a subpixel precision of 1/12, and tiling will always be kernel-controlled.
Corbin Simpson [Sun, 17 May 2009 20:23:39 +0000 (13:23 -0700)]
r300-gallium: Clean up more invariant state.
GA_ENHANCE is now the kernel's problem.
Corbin Simpson [Sun, 17 May 2009 19:51:18 +0000 (12:51 -0700)]
r300-gallium: Update XXX.
Lops work fine as long as HW TCL is off. (I think I know why.)
Corbin Simpson [Sun, 17 May 2009 18:58:53 +0000 (11:58 -0700)]
r300-gallium: Correct default MSPOS.
Per agd5f.
Corbin Simpson [Sun, 17 May 2009 17:33:56 +0000 (10:33 -0700)]
r300-gallium: vs: Fix vert shader init.
Makes the last three commits suck much less. :3
Corbin Simpson [Sun, 17 May 2009 17:30:59 +0000 (10:30 -0700)]
r300-gallium: r500-fs: Enable depth writes, kinda.
Should work, but doesn't. Hm.
Corbin Simpson [Sun, 17 May 2009 16:44:14 +0000 (09:44 -0700)]
r300-gallium: Comment out useless debugging code.
Those parts are nearly solid compared to the shaders.
Corbin Simpson [Sun, 17 May 2009 16:39:06 +0000 (09:39 -0700)]
r300-gallium: vs: Dupe tokens, better debug, count spurious insts.
Corbin Simpson [Sat, 16 May 2009 18:17:05 +0000 (11:17 -0700)]
r300-gallium: Die on bad texture formats.
Odds are good that we'll die later anyway, so we might as well do it before
we start dancing on random memory.
Corbin Simpson [Sat, 16 May 2009 17:56:17 +0000 (10:56 -0700)]
r300-gallium: Update floating-point params too.
Even though we *can* render 10,000-pixel-wide lines, let's not advertise it.
Corbin Simpson [Sat, 16 May 2009 17:46:55 +0000 (10:46 -0700)]
r300-gallium: Update screen caps.
Anisotropic filtering should work, and OQ is broken.
Corbin Simpson [Sat, 16 May 2009 17:03:46 +0000 (10:03 -0700)]
intel-gallium: Fix trace_drm integration.
Compile-tested only, sorry.
Corbin Simpson [Sat, 16 May 2009 16:58:54 +0000 (09:58 -0700)]
Create common trace_drm code, add to radeon_winsys.
Corbin Simpson [Sat, 16 May 2009 15:47:36 +0000 (08:47 -0700)]
r300-gallium: Various cleanups leftover from before.
BEGIN/END_CS pair, a few asserts, and a slightly more correct VTE setup.
Keith Whitwell [Sat, 16 May 2009 16:25:26 +0000 (17:25 +0100)]
gallium: remove occlusion_count flag from depth-stencil state
Drivers can just keep track of whether they are within a query
by monitoring the begin/end query callbacks. The flag adds no
information beyond that.
Only softpipe was examining this flag -- it has been fixed up
and retested with demos/arbocclude.
Jakob Bornecrantz [Sat, 16 May 2009 00:21:02 +0000 (01:21 +0100)]
gallium-intel: Enable trace driver
Jakob Bornecrantz [Sat, 16 May 2009 00:49:11 +0000 (01:49 +0100)]
trace: Export enabled status
Jakob Bornecrantz [Sat, 16 May 2009 00:19:44 +0000 (01:19 +0100)]
trace: Unwrap buffer in texture_blanket
Jakob Bornecrantz [Fri, 15 May 2009 03:59:24 +0000 (05:59 +0200)]
trace: If either shader is disabled don't draw
Jakob Bornecrantz [Fri, 15 May 2009 03:30:43 +0000 (05:30 +0200)]
trace: Put shaders on a list in the context
Jakob Bornecrantz [Fri, 15 May 2009 02:17:00 +0000 (04:17 +0200)]
trace: Move state dump functions to tr_dump_state.[c|h]
Eric Anholt [Sat, 16 May 2009 00:32:21 +0000 (17:32 -0700)]
intel: Don't complain on falling back from PBO fastpaths.
Instead, stash the debug info under the handy debug flag.
Bug #20053
Eric Anholt [Fri, 15 May 2009 23:24:59 +0000 (16:24 -0700)]
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.
Jakob Bornecrantz [Fri, 15 May 2009 21:54:07 +0000 (22:54 +0100)]
gallium-intel: Build with scons
Jakob Bornecrantz [Fri, 15 May 2009 21:47:31 +0000 (22:47 +0100)]
st/egl: Use proper Makefile
Steinar H. Gunderson [Tue, 12 May 2009 18:32:03 +0000 (11:32 -0700)]
i915: Fix 945 cube map layout for the small mipmaps along the bottom.
Bug #21691.
Eric Anholt [Fri, 15 May 2009 19:32:51 +0000 (12:32 -0700)]
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
Eric Anholt [Fri, 15 May 2009 18:41:42 +0000 (11:41 -0700)]
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
Brian Paul [Fri, 15 May 2009 14:03:56 +0000 (08:03 -0600)]
mesa: bump version to 7.5-rc2