Commit Graph

2953 Commits

Author SHA1 Message Date
Keith Whitwell c727fa6dbf Merge commit 'origin/gallium-draw-retval'
Conflicts:
	src/gallium/drivers/identity/id_context.c
2010-01-05 14:13:40 +00:00
Michal Krol 2c046034dc Remove TGSI_OPCODE_SHR, map existing usage to TGSI_OPCODE_ISHR.
This is to differentiate it from its unsigned version, TGSI_OPCODE_USHR.
2010-01-05 09:26:48 +01:00
Brian Paul 5ac16495a2 Merge branch 'mesa_7_7_branch'
Conflicts:
	docs/relnotes.html
	src/gallium/drivers/llvmpipe/lp_tex_sample_c.c
	src/gallium/drivers/r300/r300_cs.h
	src/mesa/drivers/dri/i965/brw_wm_surface_state.c
	src/mesa/main/enums.c
2010-01-04 19:16:24 -07:00
Vinson Lee bfc34c8804 i965g: Fix assert. 2010-01-04 11:28:37 -08:00
Brian Paul 0fb1eaddfb Merge branch 'gallium-conditional-rendering' 2010-01-04 11:47:39 -07:00
Alan Hourihane a3abb9d1cc silence compiler warning 2010-01-04 12:42:51 +00:00
Michel Dänzer acd1451393 svga: Fix debug build crash when rendering to depth/stencil renderbuffer only. 2010-01-04 13:05:43 +01:00
Vinson Lee 3e196f433d r300g: Silence 'mixed declarations and code' warning. 2010-01-03 18:05:12 -08:00
Vinson Lee fe3ea299bf r300g: Remove comma at end of enumerator list. 2010-01-03 15:07:35 -08:00
Vinson Lee 0bfc579bd4 llvmpipe: Remove comma at end of enumerator list. 2010-01-03 14:42:36 -08:00
Vinson Lee 1d95544446 trace: Remove comma at end of enumerator list. 2010-01-03 03:08:40 -08:00
Vinson Lee be6fb5c083 r300g: Use C-style comments. 2010-01-02 20:17:43 -08:00
José Fonseca cdb445f3a9 svga: Use a shader id as low as possible. 2010-01-03 00:50:13 +00:00
José Fonseca da6a80301b svga: Rename error labels.
Make it easier to insert/remove error branches.
2010-01-03 00:50:12 +00:00
Vinson Lee 3ae37da611 llvmpipe: Silence uninitialized variable warning. 2010-01-01 16:03:53 -08:00
José Fonseca 6f19ec64fc i965: Add missing include. 2010-01-02 00:01:43 +00:00
Vinson Lee fd237a879f llvmpipe: Use C-style comment. 2010-01-01 15:38:19 -08:00
José Fonseca 486ccb55a8 r300: Fix scons build. 2010-01-01 12:16:20 +00:00
José Fonseca cf9be46c01 llvmpipe: Add missing include path.
The abscense was being masked previously.
2010-01-01 12:16:20 +00:00
José Fonseca f8f4757d46 scons: Aggregate all tiny libraries in a single library.
Makes integration of gallium into out of tree components much easier. No
pratical change for components in this tree,
2010-01-01 12:16:19 +00:00
Brian Paul 41450b03a8 softpipe: implement conditional rendering 2009-12-31 14:46:15 -07:00
Christoph Bumiller 45a01bc5bd nv50: small fix for handling "dangerous" swizzles 2009-12-31 22:29:39 +01:00
Brian Paul 25024d9482 Merge branch 'mesa_7_7_branch'
Conflicts:
	configs/darwin
	src/gallium/auxiliary/util/u_clear.h
	src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
	src/mesa/drivers/dri/i965/brw_draw_upload.c
2009-12-31 09:02:27 -07:00
Christoph Bumiller 4e4244b910 nv50: fix TEXLOD sequence and use it only in FPs 2009-12-31 14:34:46 +01:00
Christoph Bumiller 616ddc8dfa nv50: cannot kill branch if immediate is used
The immediate's bits eat the condition bits.
2009-12-31 14:34:42 +01:00
Christoph Bumiller b3425bc360 nv50: make assimilate_temp safe
Cannot change hw reg assigned to a TGSI TEMP on the fly if
we are in a loop, conditional, or can jump around wildly.
2009-12-31 14:34:38 +01:00
Christoph Bumiller d9ae8f31d5 nv50: handle TGSI_OPCODE_EXP,LOG
Not that they make much sense on nv50, but we also do LIT ...
2009-12-31 14:34:34 +01:00
Christoph Bumiller f2cca04bd8 nv50: add support for subroutines 2009-12-31 14:34:30 +01:00
Christoph Bumiller 170cdb4507 nv50: alloc_reg on reg_instance
If we create multiple instances of an nv50_reg referencing
them same resource, register allocation from alloc_reg has
to be done with the original nv50_reg.
2009-12-31 14:34:26 +01:00
Christoph Bumiller 0ba518e327 nv50: multiply polygon offset units by 2 2009-12-31 14:34:22 +01:00
Christoph Bumiller 4d2551beb7 nv50: neg and abs modifiers for flops
Also fixes RSQ of negative sources.
2009-12-31 14:34:17 +01:00
Christoph Bumiller 3019afdbd8 nv50: don't negate immediates in set_immd
This negation would only be triggered in situations
where it's incorrect.
The caller of set_immd should negate the immediate value
in the instruction itself if desired, and will also know
if it's a float or an int.

ADD TEMP[0], CONST[0], -IMMD[0] would load the immediate
into extra TEMP, negated, and set the negate flag in add
as well - double negation.
2009-12-31 14:34:10 +01:00
Luca Barbieri 9656177bc0 nouveau: Fix glTexSubImage on swizzled surfaces on <=NV40
Currently in nvXX_transfer_new a temporary as large as the surface is created.
If the subrectangle is not the whole texture we would need to read
back the whole texture, but we aren't.
Thus, everything but the subrectangle specified is loaded as garbage.
This can be seen in progs/demos/ray.

This patch fixes the problem by creating a temporary that covers only
the desired subrectangle.

That makes us hit an alignment assert in nv04_surface_2d.c. Fix it
using the point registers instead of manipulating the swizzled surface
offset to account for the destination coordinates (which do not seem
to have a 1024 limit).

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2009-12-30 14:37:19 +01:00
Vinson Lee 46c2196de3 llvmpipe: Fix assert. 2009-12-28 18:07:09 -08:00
Vinson Lee e049ddb754 llvmpipe: Silence compiler warnings. 2009-12-28 18:05:30 -08:00
Younes Manton 85dcc07071 nouveau: Unreference state/buffer objects on context/screen destruction.
- unreference state objects so that buffer objects are unreferenced and
eventually destroyed
- free channel at screen's destruction

Based on Krzysztof Smiechowicz's patch.
2009-12-28 17:59:01 -05:00
Luca Barbieri cb9214f330 nouveau: Fix swizzling for copies to rectangular textures
nVidia hardware seems to swizzle rectangular texture (with width !=
height) coordinates by swizzling the lower bits and then adding the
higher bits from the larger dimension.
However, nv04_swizzle_bits ignores width and height and just
interleaves everything.
This causes problems with rectangular POT textures with height or
width 2048 or 4096 (but not 2048x1024 where it works by chance) since
the driver swizzles them in 1024x1024 chunks and gets the start
position for the non-first chunks wrong.
The following patch seems to fix those problems.
2009-12-28 17:59:01 -05:00
Luca Barbieri 3a0c527bd0 nouveau: Fix nv20-40 swizzled miptree RTs
I just coded a patch that does this and seems to work fine. It must be
fixed since it breaks OpenGL (or the state tracker can be changed, but
it seems better to do it in the driver).

The patch also fixes NV20 and NV30 in the same way. They compile but
are untested.

I would guess that using the 3D engine is faster for the larger
levels, but the 2D engine is faster for the smaller ones (and lacks
this issue).
2009-12-28 17:59:01 -05:00
Luca Barbieri a55e50b082 NV30/NV40 CMP and SCS src == dst handling
CMP and SCS can produce incorrect results if the source and
destination are the same.
This patch should fix the issues.
CMP is fixed by predicating both moves.
SCS by changing the order if the source component is X.
2009-12-28 17:59:00 -05:00
José Fonseca 926562fe27 llvmpipe: Unmapping vertex/index buffers does NOT flush draw module anymore.
Not since 6094e79f4e.

Drivers now need to flush draw module explicitely (which explains why
all those previous commits adding draw_flushes calls were necessary).

This is a good thing, but it's tricky to get this right in face of user buffers
(it's not even clear who has the responsibility to flush when a user buffer
is seen -- statetracker or pipe driver), so just force flush (temporarily)
since it's not a bottleneck now.
2009-12-28 22:53:41 +00:00
José Fonseca 67171ed85f xlib: Integrate the trace driver with all pipe drivers.
And not just softpipe.

It is particularly convenient to use llvmpipe instead, since it is much
faster. It also allows to use rbug with all xlib drivers.
2009-12-28 22:53:40 +00:00
Francisco Jerez 49a0f291ae nv04: Fix build after the latest nouveau_class.h changes. 2009-12-28 18:11:06 +01:00
Marcin Kościelnicki c84cc09d41 nv50: Dehexify and bring up to date with new method defines.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2009-12-28 18:09:26 +01:00
Vinson Lee 31d1822473 llvmpipe: Silence compiler warnings. 2009-12-28 00:44:30 -08:00
Vinson Lee d1f64fa72f trace: Silence unused variable warnings. 2009-12-27 18:12:58 -08:00
Vinson Lee f31f9cf485 i915g: Silence unused variable warning. 2009-12-27 18:09:58 -08:00
Vinson Lee 3a2f96f18a softpipe: Silence unintialized variable warnings. 2009-12-27 18:06:02 -08:00
Vinson Lee 180ccffe55 softpipe: Silence unused variable warning. 2009-12-27 17:52:47 -08:00
Brian Paul d0b7ff551a Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
Conflicts:
	src/gallium/auxiliary/util/u_network.c
	src/gallium/auxiliary/util/u_network.h
	src/gallium/drivers/i915/i915_state.c
	src/gallium/drivers/trace/tr_rbug.c
	src/gallium/state_trackers/vega/bezier.c
	src/gallium/state_trackers/vega/vg_context.c
	src/gallium/state_trackers/xorg/xorg_crtc.c
	src/gallium/state_trackers/xorg/xorg_driver.c
	src/gallium/winsys/xlib/xlib_brw_context.c
	src/mesa/main/mtypes.h
2009-12-27 15:31:08 -07:00
José Fonseca 4ccf0bb74e softpipe: Flush draw module when fragment pipeline state changes. 2009-12-26 21:06:46 +00:00