Commit graph

32527 commits

Author SHA1 Message Date
Francisco Jerez
d475eae50b dri/nouveau: Some minor vertex submission fixes. 2010-03-18 15:02:35 +01:00
Xavier Chantry
50be9bc6ce dri/nouveau: only reallocate texture when needed
nouveau reallocated the mipmap tree on every MIN_FILTER call to account
for mipmap change. We only need to do this if the texture does not fit
in the existing mipmap tree. This gives a big performance boost for a
game like bzflag which changes MIN_FILTER all the time for its font
rendering.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-03-18 15:02:34 +01:00
José Fonseca
9d48a621d2 llvmpipe: Fix crashes when there is no depth buffer bound. 2010-03-18 10:24:10 +00:00
Kristian Høgsberg
6de8e563ac intel: Call _mesa_make_current() after getting initial buffers
The default viewport is the window rectangle, which is set up by
_mesa_make_current().  To be able to do that we need to get the
window dimension (and buffers) first, so we have to call
intel_prepare_render() before we can call into _mesa_make_current().

Fixes #26676 and #26678.
2010-03-17 22:45:21 -04:00
Brian Paul
0557d0a4b2 progs/trivial: added comments 2010-03-17 16:29:34 -06:00
Brian Paul
fecd4cde50 gallivm/llvmpipe: basic stencil testing works
Most stencil demos look OK (modulo some unrelated rendering glitches).
Only single-sided stencil test works at this point.
There are probably some bugs to be found...
2010-03-17 16:29:34 -06:00
Brian Paul
227824ac69 llvmpipe: remove incorrect depth test check 2010-03-17 16:29:34 -06:00
Brian Paul
2b8db4ce15 gallivm: added lp_build_andc() 2010-03-17 16:29:34 -06:00
Brian Paul
8dc8c3f5b1 llvmpipe: silence some pointer/casting warnings 2010-03-17 16:29:34 -06:00
Brian Paul
d1c9e59883 gallivm/llvmpipe: more asst changes for stencil testing 2010-03-17 16:29:34 -06:00
Brian Paul
67b82fc395 gallivm/llmvpipe: pass stencil refs state into z/stencil build code 2010-03-17 16:29:34 -06:00
Brian Paul
b8b1bb946f llvmpipe: use new LP_JIT_CTX_ enums for jit context field positions
Use the new enum values rather than integers in a few places.
2010-03-17 16:29:34 -06:00
Brian Paul
eee5114797 llvmpipe: added stencil ref values to jit context state 2010-03-17 16:29:34 -06:00
Brian Paul
6379e47ebd llvmpipe: break lines 2010-03-17 16:29:34 -06:00
Eric Anholt
362c1bf75e intel: Replace mt->pitch with mt->region->pitch.
The pitch is not really an inherent part of the miptree, since it's
not part of any of the layout calculations, and it's dictated by the
libdrm-allocated region pitch now.
2010-03-17 11:24:01 -07:00
Eric Anholt
30446f8a70 intel: Return false like other blit failure paths if out of aperture.
The primary consumer of this (miptree relayout) already has this code
for handling failure, and the other paths want to know if failure
actually occurs and do something appropriate, which may not include
memcpy.
2010-03-17 11:24:01 -07:00
Eric Anholt
e1e48ea15c intel: Respect src pitch in _mesa_copy_rect().
If a non-zero src_y was used, this would break piglit
depth-level-clamp.
2010-03-17 11:24:01 -07:00
Eric Anholt
da011faf48 intel: Rely on allocated region pitch for the miptree pitch.
Bug #26966: 945 miptree pitch disagreement with libdrm.
2010-03-17 11:23:43 -07:00
Eric Anholt
1a77f8af9b intel: Assert that the linear blits succeed.
We don't have any fallback code here, and we want to avoid this path
if failure would happen, so just assert.
2010-03-17 11:12:36 -07:00
Eric Anholt
0c51390e4b intel: Remove level_offset now that it's unused.
This is the last pitch-dependent part of miptree setup.
2010-03-17 11:12:36 -07:00
Eric Anholt
32f143b432 intel: Remove extra tiling setting after allocating a tiled region. 2010-03-17 11:12:36 -07:00
Eric Anholt
c479a20fce intel: Rename the z24_x8 depth spans to z24_s8 since they do stencil too. 2010-03-17 11:12:36 -07:00
Brian Paul
b22bb34533 llvmpipe: remove -m32 flag from linux-llvm config 2010-03-17 10:53:55 -06:00
Brian Paul
c11d582411 st/mesa: plug in default for pipe_context::surface_copy() if needed
This lets us avoid conditionals and duplicated code in several places.
2010-03-17 10:31:59 -06:00
Brian Paul
a196a5d330 progs/samples: improve copy.c demo
If the test image was larger than the window, nothing was drawn because
of invalid raster position.  Use glWindowPos instead of glRasterPos.
Also, use integer src/dst coordinates to avoid grabbing black pixels
outside of the src image region.
2010-03-17 10:17:06 -06:00
Brian Paul
ef92fe85de Merge branch '7.8'
Conflicts:

	src/mesa/state_tracker/st_cb_drawpixels.c
2010-03-17 10:13:51 -06:00
Brian Paul
bf1974b37d progs/samples: silence warnings 2010-03-17 10:11:09 -06:00
Brian Paul
1bfc314596 st/mesa: fix glCopyPixels bugs/crashes when src region need clipping
Use the _mesa_clip_readpixels() function to clip the src region against
the buffer's bounds.  Neatly, the resulting pixel unpack object's
SkipPixels/SkipRows fields can be used to determine the position of the
region in the destination texture.

Fixes crash in progs/samples/copy.c and probably other cases.
2010-03-17 10:06:27 -06:00
Brian Paul
c492227683 mesa: rename params in prototype to match implementation 2010-03-17 09:04:26 -06:00
Brian Paul
59e743b8d3 glapi: fix assorted warnings
And replace some instances of GLuint with unsigned int to avoid pulling in
GL/gl.h
2010-03-17 08:44:54 -06:00
Brian Paul
3828910d0e swrast: remove unused compute_coveragei() function 2010-03-17 08:42:59 -06:00
Corbin Simpson
90fe8c39f1 st/mesa: Fix build breakage.
Nearly certain this is what was intended; it compiles, but I'm not sure
this path is ever hit in my tests.
2010-03-17 04:35:14 -07:00
Pauli Nieminen
f0f04cd12d Merge branch '7.8' into master
Conflicts:
	Makefile
	src/mesa/main/version.h
2010-03-17 11:26:48 +02:00
Brian Paul
e1ee3eaf6d cell: build identity driver too 2010-03-16 16:47:02 -06:00
Brian Paul
a9a1b52f95 cell: add missing semicolon 2010-03-16 16:47:02 -06:00
Christoph Bumiller
e548babb1f nv50: support more formats in surface_copy,fill
Fixes corrupted fonts in bzFlag, where we've been silently
failing to copy I8 mipmaps to a new miptree.

Print an error message on unsupported format now, since we
can't return failure.
2010-03-16 22:47:24 +01:00
Eric Anholt
5782b2a968 i965: Fix readpixels from ReadBuffer != DrawBuffer.
Fixes piglit fbo-readdrawpix.
2010-03-16 13:23:35 -07:00
Eric Anholt
a589da14de i965: Fix inversion for glCopyPixels to/from FBOs.
fixes piglit fbo-copypix.
2010-03-16 13:18:54 -07:00
Eric Anholt
800a4b202f intel: Remove more code for x8z24 visuals, since we only do s8z24. 2010-03-16 13:18:54 -07:00
Eric Anholt
25becb8a7a Revert "i965: Do VS SGT, SLT, and friends using CMP, SEL instead of CMP, MOV, MOV."
This reverts commit 8ef3b1834a.  Fixes
piglit glsl-vs-if.
2010-03-16 13:18:54 -07:00
Eric Anholt
ba208604ea Revert "i965: Do FS SLT, SGT, and friends using CMP, SEL instead of CMP, MOV, MOV."
This reverts commit 46450c1f3f.  I was
wrong about null reg behavior -- it reads undefined, not 0.  And
they're not kidding.
2010-03-16 13:18:54 -07:00
Eric Anholt
7cbb7051f4 meta: Fix up restoration of state if _mesa_map_pbo_source() fails. 2010-03-16 13:18:54 -07:00
Eric Anholt
541c9c08e5 meta: Properly refcount our saved programs and texobjs.
Found while debugging bug #24119.
2010-03-16 13:18:53 -07:00
Brian Paul
7c45710859 gallium: add target-helpers/wrap_screen.c to C_SOURCES
Was commented out before.
2010-03-16 13:31:46 -06:00
Eric Anholt
a29c7948d9 i965: Fix ENDLOOP to only patch up this loop's BREAK and CONT.
Corresponds to d225a25e21a24508aea3b877c78beb35502e942d and fixes
piglit glsl-fs-loop-nested.  Bug #25173.
(cherry picked from commit a81836ee2f)
2010-03-16 12:15:18 -07:00
Eric Anholt
42e0e86866 i965: Unalias all GLSL source regs from the destination regs used.
We were doing it ad-hoc before, as instructions with potential
aliasing problems were identified.  But thanks to swizzling basically
anything can have aliasing, so just do it generally at source reg
setup time.  This is somewhat inefficient, because sometimes an
operation doesn't need unaliasing protection if the swizzling is safe,
but the unaliasing before didn't cover those cases either.

Fixes piglit glsl-fs-loop.
(cherry picked from commit 6b194dab6b)
2010-03-16 12:15:12 -07:00
Eric Anholt
d24f59d008 i965: Fix nested loops in the VS.
We were patching up all the break and continues between the start of
our loop and the end of our loop, even if they were breaks/continues
for an inner loop.  Avoiding patching already patched breaks/continues
fixes piglit glsl-vs-loop-nested.
(cherry picked from commit f6f547d87e)
2010-03-16 12:15:02 -07:00
Eric Anholt
009392f50d i965: Fix up VP constbuf leak on program delete.
(cherry picked from commit 7f6d2754d5)
2010-03-16 12:14:57 -07:00
Eric Anholt
1254d3d315 i965: Fix up the handling of point sprite coordinate replacement.
The code was walking over the regs of pairs of attributes and checking
whether the attribute with a given reg index had point sprite enabled.
So the point sprite setup code was rarely even getting executed.
Instead, we need to determine which channels of a reg need point
sprite coordinate replacement.  In addition, it was multiplying the
attribute by 1/w, when it's supposed to cover (0, 1) in each direction
regardless of w, and it wasn't filling in the Z and W components of
the texcoord as specified.

Fixes piglit point-sprite and the spriteblast demo.  Bug #24431, #22245.
(cherry picked from commit bc632d0437)
2010-03-16 12:14:48 -07:00
Eric Anholt
837f003eeb i965: Add support for the CMP opcode in the GLSL path.
This would be triggered by use of sqrt() along with control flow.
Fixes piglit-fs-sqrt-branch and a bug in Yo Frankie!.
(cherry picked from commit 48dca99feb)
2010-03-16 12:14:18 -07:00