Commit graph

22864 commits

Author SHA1 Message Date
Brian Paul
3acdab82cb mesa: vbo code reformatting, clean-up, comments 2009-05-07 10:12:33 -06:00
Brian Paul
87ba2285fe mesa: add GL_DOUBLE case in _mesa_sizeof_type() 2009-05-07 10:12:32 -06:00
Brian Paul
2369f14245 mesa: in vbo split code, map buffers read-only, not write-only
And use GL_ELEMENT_ARRAY_BUFFER where appropriate.
2009-05-07 10:12:32 -06:00
Brian Paul
74bec42b45 mesa: limit number of error raised by invalid GL_TEXTURE_MAX_ANISOTROPY_EXT 2009-05-07 10:12:32 -06:00
Brian Paul
ad32489987 tnl: added some clip debug/print code (disabled) 2009-05-07 10:12:32 -06:00
Brian Paul
424507953c mesa: reformatting, updated comments, const-correctness 2009-05-07 10:12:32 -06:00
Brian Paul
134ac52dec tnl: replace 0x3f with CILP_FRUSTUM_BITS 2009-05-07 10:12:32 -06:00
Brian Paul
f56893ea17 i965: relAddr local var (to make debug/test a little easier) 2009-05-07 09:59:13 -06:00
Brian Paul
9a4890dac7 Merge branch 'mesa_7_5_branch' 2009-05-07 09:46:53 -06:00
Brian Paul
6a3004b9ae swrast: fix span clipping bug
If a horizontal span of pixels was located at x < 0 we could sometimes
read/write outside of renderbuffer bounds.
2009-05-07 09:43:15 -06:00
Brian Paul
cc71704644 mesa: unmap buffer objects during context tear-down 2009-05-07 09:36:21 -06:00
Eric Anholt
3d048e5750 i965: Remove bad constant buffer constant-reg-already-loaded optimization.
Thanks to branching, the state of c->current_const[i].index at the point
of emitting constant loads for this instruction may not match the actual
constant currently loaded in the reg at runtime.  Fixes a regression in my
GLSL program for idr's class since b58b3a786a.
2009-05-06 21:44:13 -07:00
Eric Anholt
156a79f5bd intel: Unmap buffers if needed at DeleteBuffer time.
This fixes a crash in glean's pbo test, which tripped over the assert when a
context was destroyed while a buffer was still mapped (Mesa doesn't call
UnmapBuffer in that case).  Regression in
c6bde8873f
2009-05-06 20:44:34 -07:00
Brian Paul
58544a28ad mesa: remove unnecessary buffer size check 2009-05-06 12:38:35 -06:00
Brian Paul
bb1fb2a544 mesa: code consolidation in glDraw[Range]Elements() validation 2009-05-06 12:38:35 -06:00
Brian Paul
88af3f8783 mesa: new comments, minor reformatting 2009-05-06 12:38:35 -06:00
Brian Paul
a13df193c2 mesa: use elementBuf local var instead of ctx->Array.ElementArrayBufferObj
Makes no real difference, but more consistant.
2009-05-06 12:38:35 -06:00
Eric Anholt
f831d2d41b i965: Remove the forced lack of caching for renderbuffer surface state.
This snuck in with the multi-draw-buffers commit, and is a major penalty
to performance.  It doesn't appear to be required, as the only dependency
the surface BO has is on the state key (and if there's some other dependency,
it should just be in the key).

This brings openarena performance up to almost 2% faster than Mesa 7.4.
2009-05-06 10:54:32 -07:00
Eric Anholt
4cb87840ff i965: Remove _NEW_PROGRAM from brw_wm_surfaces setup dependencies.
This was a leftover from the brw_wm_constant_buffer change.
2009-05-06 10:54:32 -07:00
Brian Paul
9b678af796 mesa: be smarter about allocating vert/frag program constants
Try to re-use constants/literals more often to make best use of the
constant buffer space.

See bug 21354.
2009-05-06 08:53:41 -06:00
Eric Anholt
71fb9d62ec i965: Split WM constant buffer update from other WM surfaces.
This can avoid re-uploading constant data when it isn't necessary, and is
a step towards not updating other surfaces just because constants change.
It also brings the upload of the constant buffer next to the creation.

This brings openarena performance up another 4%, to 91% of the Mesa 7.4 branch.
2009-05-06 06:44:14 -07:00
Eric Anholt
9490d86808 i965: Disentangle VS constant surface state from WM surface state.
Also, only create VS surface state if there's a VS constant buffer to be
uploaded, and set the contents of the buffer at the same time as creation.
2009-05-06 06:44:14 -07:00
Eric Anholt
d277547dc6 i965: Don't create constant buffers if they won't be used.
Really, the creation and upload of constants should be in the same place,
since they should only happen together, and a state flag should be
triggered by them so that we don't thrash state around so much for just
updating constants.  But this still recovers openarena performance by
another 19%, leaving us 16% behind Mesa 7.4 branch.
2009-05-06 06:44:13 -07:00
Brian Paul
51325f44d1 mesa: only use fallback texture when using shaders, not fixed-function (take two)
The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture.  The fallback texture returning
(0,0,0,1) should only be used with shaders.  For fixed function, the texture
unit is truly disabled/ignored.

Fixes glean fbo test regression.
2009-05-05 16:31:44 -06:00
Brian Paul
823815a485 Revert "mesa: only use fallback texture when using shaders, not fixed-function"
This reverts commit a0edbfb28f.

This patch didn't completely fix the problem.  The next patch will.
2009-05-05 16:30:30 -06:00
Brian Paul
a0edbfb28f mesa: only use fallback texture when using shaders, not fixed-function
The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture.  The fallback texture returning
(0,0,0,1) should only be used with shaders.

Fixes glean fbo test regression.
2009-05-05 16:29:04 -06:00
Brian Paul
01e16befd4 mesa: only use fallback texture when using shaders, not fixed-function
The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture.  The fallback texture returning
(0,0,0,1) should only be used with shaders.

Fixes glean fbo test regression.
2009-05-05 16:21:20 -06:00
Brian Paul
c0d3761c16 mesa: minor simplification in enable_texture(), updated comments 2009-05-05 16:17:55 -06:00
Brian Paul
b3fc832ac7 Merge branch 'mesa_7_5_branch' 2009-05-05 10:13:13 -06:00
Brian Paul
95b7771ea7 gallium: remove redundant cube face #defines 2009-05-05 10:13:11 -06:00
Brian Paul
79ada8c633 gallium: fix texcoords for cubemap mipmap generation
We need to use (s,t,r) cubemap coords when sampling from the cubemap texture
so the rendered quad gets texture samples from the correct cube face.
2009-05-05 10:11:51 -06:00
Keith Whitwell
077c904b76 progs/trivial: add test for vertex program invarient transform 2009-05-05 13:14:54 +01:00
Keith Whitwell
113403ef51 mesa: more complete fix for transform_invarient glitches
Add a new flag mvp_with_dp4 in the context, and use that to switch
both ffvertex.c and programopt.c vertex transformation code to
either DP4 or MUL/MAD implementations.
2009-05-05 13:14:53 +01:00
Keith Whitwell
22b417b75c mesa/main: set PREFER_DP4 to match position_invarient code
This is a quick fix for z fighting in quake4 caused by the mismatch
between vertex transformation here and in the position_invarient code.
Full fix would be to make this driver-tunable and adjust both
position_invarient and ffvertex_prog.c code to respect driver
preferences.
2009-05-05 13:14:52 +01:00
José Fonseca
c6bfb4c559 wgl: Implemente SwapLayerBuffers. 2009-05-05 13:14:51 +01:00
José Fonseca
e9fb90ab88 scons: Don't use deprecated Options. 2009-05-05 13:14:51 +01:00
José Fonseca
3537c3420d util: Limit the stack walk to avoid referencing undefined memory. 2009-05-05 13:14:50 +01:00
Keith Whitwell
b865501bda gallium/tgsi: hack around linker/archiver breakage
Add a dummy function which exists only so that tgsi_text_translate()
doesn't get magic-ed out of the libtgsi.a archive by the build system.
Don't remove unless you know this has been fixed - check on
mingw/scons builds as well.
2009-05-05 13:14:49 +01:00
Keith Whitwell
5f2569a1b9 progs/trivial: add vbo-noninterleaved test 2009-05-05 13:14:48 +01:00
José Fonseca
6b89c35c9f wgl: Include alpha bits in pixel format's cColorBits field. 2009-05-05 13:14:47 +01:00
Keith Whitwell
c6b3c2f34b gallium/draw: cope with unused vertex_elements 2009-05-05 13:14:46 +01:00
Keith Whitwell
4d548bd069 trivial: add line-flat.c 2009-05-05 13:14:45 +01:00
José Fonseca
ccec9f76d5 wgl: UINT_PTR null value is an integral type, so return 0 instead of NULL. 2009-05-05 13:14:44 +01:00
José Fonseca
a47f15ba1d pb: Save the stack backtrace when creating/mapping a debug buffer. 2009-05-05 13:14:42 +01:00
José Fonseca
4fd6f296f8 pb: Dump the fenced buffer sizes. 2009-05-05 13:14:38 +01:00
Stephane Marchesin
8edb50ff1e nv04: small fix again 2009-05-05 12:03:38 +02:00
Stephane Marchesin
39ebeead56 Fix an nv04 bug (thanks Mhopf). 2009-05-05 11:29:58 +02:00
Brian Paul
f95c0c06c0 mesa: also print program params/constants when dumping shaders to disk 2009-05-04 11:14:35 -06:00
Brian Paul
27dbdb1684 mesa: remove some unfinished/devel code 2009-05-04 11:13:35 -06:00
Brian Paul
dd4c142e90 glx: replace Xmalloc() calls with Xcalloc()
Fixes a bug where psp->WaitX was uninitialized.  Reported by Chris Clayton.
2009-05-04 07:52:55 -06:00