Maarten Maathuis
41b52aa336
nouveau: avoid running out of relocs
...
- Added flush notify functions for NV30 and NV40.
- Flushing mid frame will call flush notify, which will resubmit all
relocs.
- We don't try to recover from reloc failure yet.
2009-12-14 19:31:54 +01:00
Christoph Bumiller
2677f199a5
nv50: be more cautious about using reg_instance
...
Trying to free part of nv50_pc->reg_instances[] for an
nv50_reg representing an indirect constant resulted in
a segmentation fault.
2009-12-14 18:39:13 +01:00
Christoph Bumiller
1778ddaf74
nv50: store immediates as uint32
...
Sometimes we want non-float immediates, hacking them into
floats isn't nice.
Sorry, this should have already been committed before.
2009-12-14 11:12:59 +01:00
Patrice Mandin
d4d880199e
nouveau: nv50: Add missing ctor_immd_4u32 function
2009-12-13 20:09:33 +01:00
Christoph Bumiller
079b670111
nv50: add proper zslice offset in miptree_surface
2009-12-13 14:39:19 +01:00
Christoph Bumiller
7b5a6fa0c8
nv50: use m2mf z pos instead of calculating offset manually
2009-12-13 14:39:19 +01:00
Christoph Bumiller
44d8c9add2
nv50: add craziness for non-constant TXB and TXL
...
If lod or bias can be non-constant across a quad of fragments,
we need to execute TEX separately for each value.
Don't ask why.
2009-12-13 14:39:19 +01:00
Patrice Mandin
b91503f457
Revert "nouveau: nv30: Disable swizzled surface usage if any dimension is 1 (Warsow creates a 1x1 front buffer)"
...
This reverts commit ec7844537e .
2009-12-12 23:15:08 +01:00
Patrice Mandin
ec7844537e
nouveau: nv30: Disable swizzled surface usage if any dimension is 1 (Warsow creates a 1x1 front buffer)
2009-12-12 22:31:53 +01:00
Christoph Bumiller
d80778218d
nv50: support TXB and TXL
...
... and don't set the 'live' flag for TEX anymore, we'd
have to know if results affect the inputs for another TEX,
and I'm not going to do that kind of analysis now.
2009-12-12 16:39:00 +01:00
Christoph Bumiller
b0036f391a
nv50: add S8Z24 depth texture format too
2009-12-12 16:38:59 +01:00
Christoph Bumiller
cc0ffaba7d
nv50: fix depth comparison func TSC bits
...
Unfortunately it seems that if depth comparison is
active and we read a 2D texture, i.e. provide only
2 inputs, the second is used for comparison ...
2009-12-12 16:38:59 +01:00
Christoph Bumiller
6a689783b9
nv50: add src_mask case for IF opcode
2009-12-12 16:38:59 +01:00
Christoph Bumiller
9f3644c423
nv50: plug memory leak in miptree creation/destruction
...
Keeping this dynamically allocated for texture arrays.
Since we don't use it to store zslice offsets anymore
it's either 1 or 6 integers (cube) ...
2009-12-12 16:38:59 +01:00
Christoph Bumiller
f7a9734492
nv50: use copies of tgsi src nv50_regs
...
So we can use the 'mod' member without concern
if a source is used multiple times in 1 insn.
2009-12-12 16:38:59 +01:00
Christoph Bumiller
6a15ec9141
nv50: support vertex program textures
2009-12-12 16:38:59 +01:00
Brian Paul
a087eb590d
Merge branch 'mesa_7_7_branch'
...
Conflicts:
src/gallium/state_trackers/xorg/xorg_xv.c
src/mesa/drivers/dri/intel/intel_span.c
2009-12-11 10:04:07 -07:00
José Fonseca
ffae1f938d
svga: Add a missing dependency from the prescale state.
...
Thanks for Keith to finding this.
Fixes Jedi Knight 2 menus.
2009-12-11 14:14:03 +00:00
José Fonseca
8469baf41b
svga: Always pass SVGA3D_SURFACE_HINT_DYNAMIC.
...
Since we're reusing buffers we're effectively transforming all
of them into dynamic buffers.
It would be nice to not cache long lived static buffers. But there
is no way to detect the long lived from short lived ones yet. A
good heuristic would be buffer size.
2009-12-11 13:15:12 +00:00
José Fonseca
16876b8328
svga: Keep tight control of texture handle ownership.
...
The texture owns the surface handle. All derivatives need to keep
a reference to texture.
This fixes several assertions failures starting up Jedi Knight 2.
Should cause no change for DRM surface sharing -- reference count still
done as before there.
2009-12-11 12:29:02 +00:00
José Fonseca
770323e33e
svga: Fix mixed signed comparisons.
2009-12-11 12:28:53 +00:00
Marek Olšák
c6b450033d
r300g: fix routing of vertex streams if TCL is bypassed
...
Generating mipmaps finally works, among other things. Yay!
2009-12-09 13:38:11 -08:00
Marek Olšák
6de7ac73bf
r300g: always disable unused colorbuffers
2009-12-09 13:38:11 -08:00
Marek Olšák
87b822e024
r300g: make pow(0,0) return 1 instead of NaN in the R500 fragment shader
...
Unfortunately we can't fix this easily in the R300 fragment shader,
and it's probably not worth the effort.
2009-12-09 13:38:11 -08:00
Marek Olšák
8cc570a48c
r300g: clean up r300_emit_aos
2009-12-09 13:38:11 -08:00
Roland Scheidegger
47c780180b
nouveau: use boolean instead of bool
2009-12-08 19:58:46 +01:00
Roland Scheidegger
849a0644ad
cell: use boolean instead of bool
2009-12-08 19:58:36 +01:00
Roland Scheidegger
4ebc54795d
Merge branch 'gallium-strict-aliasing'
2009-12-08 19:26:20 +01:00
Roland Scheidegger
ee1720b99d
gallium: fix more potential strict aliasing issues
...
In particular, gcc man page warns that
union a_union {
int i;
double d;
};
int f() {
double d = 3.0;
return ((union a_union *) &d)->i;
}
"might" not be ok (why not?), even though it doesn't seem to generate
any warnings. Hence don't use this and do the extra step to actually use
assignment to get the values in/out of the union.
This changes parts of 3456f9149b .
2009-12-08 19:17:08 +01:00
Alan Hourihane
2aebc5e01f
move assert to avoid crash in debug build.
2009-12-08 13:12:02 +00:00
Andre Maasikas
b5e256c76d
Merge branch 'mesa_7_7_branch'
...
Conflicts:
src/mesa/drivers/dri/r600/r700_assembler.c
src/mesa/main/version.h
2009-12-08 11:57:24 +02:00
Andre Maasikas
0d4a05445c
Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
2009-12-08 10:16:14 +02:00
Vinson Lee
add6dfbba6
llvmpipe: Initialize variables in emit_instruction.
2009-12-07 19:04:07 -08:00
Ian Romanick
8fc433fa0f
Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
...
Conflicts:
progs/demos/projtex.c
progs/xdemos/glxinfo.c
src/mesa/main/version.h
To fix the confilicts in projtex.c and glxinfo.c I just took the code from
mesa_7_6_branch. The conflicts seem to have occured from cherry-picks from
mesa_7_7_branch to mesa_7_6_branch followed by commmits just to
mesa_7_6_branch.
2009-12-07 17:16:10 -08:00
Roland Scheidegger
3456f9149b
gallium/util: fix util_color_[un]pack[-ub] to be strict aliasing safe
...
use pointer to union instead of void pointer.
gcc complained a lot, depending what the pointer originally actually was.
Looks like it's in fact maybe legal to cast for instance uint pointers to
union pointers as long as union contains a uint type, hence use this with some
callers, other just use union util_color in the first place.
2009-12-07 20:35:42 +01:00
Corbin Simpson
d8d8b0d244
softpipe: sp_winsys.h should define/include what it needs.
2009-12-06 23:49:02 -08:00
Corbin Simpson
c99fb991a3
r300g: Clean up previous commit.
...
If *I* can't read it, there's a strong possibility others can't,
either.
2009-12-06 23:34:53 -08:00
Marek Olšák
7091afed78
r300g: enhance ZTOP conditions
2009-12-06 23:34:53 -08:00
Younes Manton
c574f515f0
nouveau: Work around nv04-nv40 miptrees not matching nouveau_miptree.
...
Thanks to Bob Gleitsmann for the patch.
I'll clean this up in a better way later if noone else beats me to it.
2009-12-06 12:34:27 -05:00
Marek Olšák
0748764351
r300g: don't render if everything is culled by scissoring
...
Otherwise a CS is refused by kernel 2.6.31 (and maybe all later
versions, not sure).
2009-12-06 01:13:37 -08:00
Marek Olšák
e1380cae88
r300g: remove redundant code and clean up
2009-12-06 01:13:36 -08:00
Michel Dänzer
56a4342a04
r300g: Need to emit a hardware scissor rectangle even if scissor is disabled.
...
Just make it cover the whole framebuffer in that case. Otherwise the kernel CS
checker may complain, e.g. running progs/demos/gearbox. That runs fast now
here, but doesn't look right yet.
2009-12-05 17:59:49 +01:00
José Fonseca
5b1a7843f8
svga: Dump SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN commands.
2009-12-05 06:34:59 +00:00
José Fonseca
781d8fccba
svga: Use _debug_printf, so that output may be dumped in release builds too.
...
The dump calls should be wrapped in #ifdef DEBUG .. #endif.
2009-12-05 06:05:56 +00:00
José Fonseca
501989bbcd
llvmpipe: Tweak disassembly to match gdb.
...
Helps verifying udis86 output.
2009-12-05 05:43:53 +00:00
José Fonseca
dd51b4f909
llvmpipe: Stop disassembling when an unsupported opcode is found.
...
Otherwise the terminal gets full of garbage.
2009-12-05 05:43:10 +00:00
José Fonseca
c0a13bbae1
llvmpipe: Port vertex sampler support from softpipe.
...
Just enough boilerplate code to avoid segfaulting.
2009-12-04 21:27:03 +00:00
José Fonseca
a312e76468
llvmpipe: Ensure transfers are mapped.
...
This shouldn't happen but it does by some misterious reason. Fail the
assertion but at least do not segfault on release builds.
2009-12-04 21:27:03 +00:00
José Fonseca
b00b06b6e4
llvmpipe: Remove debug printf.
2009-12-04 21:27:03 +00:00
Roland Scheidegger
7d9b2edb97
identity: fix copy&paste error
2009-12-04 18:34:52 +01:00