Commit graph

10536 commits

Author SHA1 Message Date
Tilman Sauerbeck
98e277111b Replace reference to tgsi-instruction-set.txt.
That file has been replaced by tgsi.rst.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-09-07 09:48:22 +01:00
Luca Barbieri
09782c727d nvfx: fix return in vp main 2010-09-06 18:08:36 +02:00
Dave Airlie
35e01b79cb r600g: add error print for no literals for r700s as well 2010-09-06 10:38:29 +10:00
Dave Airlie
2caf6f5e84 r600g: fixup r700 assembler for clamp/relative addressing 2010-09-06 10:35:51 +10:00
Dave Airlie
48cdad70d9 r600g: add script to generate header file with offsets into state objects.
This was inherently fragile as any changes to r600_states.h would also
need manual updating of all of the bits in radeon.h. Just add a simple
python script to do the conversion, its not hooked up to make at all.

This also will make adding evergreen a bit easier.
2010-09-06 10:28:08 +10:00
Dave Airlie
5b82777311 r600g: fix up surface references
We end up referencing the new surf and derefing the old surface which
is a copy of the pointer to the new surf. So just bump the ref count directly.
2010-09-06 09:15:42 +10:00
Dave Airlie
3a672785df r600g: search for sampler views in context on removal.
Need to remove from context as well.
2010-09-06 09:15:42 +10:00
Dave Airlie
6ec0fff822 r600g: add missing printf operand 2010-09-06 09:15:41 +10:00
Luca Barbieri
357a7e90df nvfx: support nv30 simulation on nv40 2010-09-05 23:41:33 +02:00
Luca Barbieri
beb3d030a1 nouveau: delete nouveau_class.h, move nv50 regs to nv50_reg.h
nv50 should switch to rules-ng-ng too at some point.

The classic Mesa Nouveau driver also includes a copy of nouveau_class.h,
and should convert to rules-ng-ng too and remove it.
2010-09-05 17:52:26 +02:00
Luca Barbieri
7d53a3b7a4 nvfx: move nv04_2d to rules-ng-ng 2010-09-05 17:52:26 +02:00
Luca Barbieri
d46c5ce7b6 nvfx: switch to rules-ng-ng register headers
This is the new register generation toolkit in use by nouveau.

As far as I know, this is the best register description toolkit in
existence, and you should use it too for your hardware :)

Thanks to Marcin Kościelnicki for inventing it and performing
invaluable reverse engineering work of nVidia chips.
2010-09-05 17:52:26 +02:00
Luca Barbieri
3bca263a92 nvfx: remove remaining BEGIN_RING/eng3d uses 2010-09-05 17:52:26 +02:00
Luca Barbieri
49b493ddd0 nvfx: pause occlusion queries during blitter usage
Thanks for Dave Airlie and Jerome Glisse for their code which made
me realize I need this too.
2010-09-05 17:52:26 +02:00
Luca Barbieri
14d5805235 nvfx: properly return fogcoord.w == 1
Hardware sets it to 0, so we add an ADD to put an 1 there if the
application really wants the alpha channel.
2010-09-05 17:52:25 +02:00
Luca Barbieri
76f696b1f6 nvfx: support saturate in vp
Completely untested, since Mesa apparently never uses this currently.

In particular, it might not work with scalar slot op.
2010-09-05 17:52:25 +02:00
Luca Barbieri
8e2badfc26 nvfx: add rewritten swtnl support
The old swtnl code was broken by the new shader linkage support for
GLSL.

This is a rewrite of swtnl support, which should instead work properly,
be faster and more closer to the much more tested hardware pipeline.
2010-09-05 17:52:25 +02:00
Luca Barbieri
43cfc1ed8e nvfx: use a piglit-ignored format for unknown cap message 2010-09-05 17:52:25 +02:00
José Fonseca
7d45bf8762 llvmpipe: Remove some broken MinGW hacks in the sin/cos reference code. 2010-09-05 10:40:38 +01:00
José Fonseca
d278ddc009 llvmpipe: Fix perspective divide interpolation.
Intuition != mathematics, so this time I actually worked out the right
formula for first order approximation of perspective interpolation.

Ironically, per quad divide actually makes things slower when compared
with per pixel divide -- probably because the divide hardware unit is
rarely used, whereas the multiply unit is typically already saturated
and the first order approximation imply more multiplications.
2010-09-05 10:17:51 +01:00
José Fonseca
b8684b2458 util: Helper function to determined whether two formats can be memcpy'ed.
These are the non-trivial conversions that this function recognizes,
which was produced by u_format_compatible_test.c:

  b8g8r8a8_unorm -> b8g8r8x8_unorm
  a8r8g8b8_unorm -> x8r8g8b8_unorm
  b5g5r5a1_unorm -> b5g5r5x1_unorm
  b4g4r4a4_unorm -> b4g4r4x4_unorm
  l8_unorm -> r8_unorm
  i8_unorm -> l8_unorm
  i8_unorm -> a8_unorm
  i8_unorm -> r8_unorm
  l16_unorm -> r16_unorm
  z24_unorm_s8_uscaled -> z24x8_unorm
  s8_uscaled_z24_unorm -> x8z24_unorm
  r8g8b8a8_unorm -> r8g8b8x8_unorm
  a8b8g8r8_srgb -> x8b8g8r8_srgb
  b8g8r8a8_srgb -> b8g8r8x8_srgb
  a8r8g8b8_srgb -> x8r8g8b8_srgb
  a8b8g8r8_unorm -> x8b8g8r8_unorm
  r10g10b10a2_uscaled -> r10g10b10x2_uscaled
  r10sg10sb10sa2u_norm -> r10g10b10x2_snorm

State trackers and pipe drivers should be updated to take advantage of
this knowledge, e.g., in surface_copy.
2010-09-05 10:17:51 +01:00
José Fonseca
00989d5bfc llvmpipe: Relax the colormask constraint on opaque.
Also, include the color buffer in the key. Not having it there
causes a tight knots in the logic to determine when it is OK or not
to discard previous color buffer contents.
2010-09-05 10:17:51 +01:00
José Fonseca
f25b6e546e util: Utility function to determine the channels that can be written in a color format. 2010-09-05 10:17:51 +01:00
José Fonseca
6ed726b8fc gallivm: Pass condition masks as an unsigned bitmask.
Much more convenient than boolean arrays.
2010-09-05 10:17:51 +01:00
José Fonseca
079763f746 gallivm: Cope with tgsi instruction reallocation failure. 2010-09-05 10:17:51 +01:00
Marek Olšák
ece8490bb5 r300g,r300c: memset the compiler struct to zeros
This should fix bogus reports "Too many temporaries." and maybe some others.
2010-09-05 05:09:25 +02:00
Luca Barbieri
c50b7e04eb nvfx: support unlimited constants and immediates in fp 2010-09-05 02:01:02 +02:00
Luca Barbieri
9fc50968ad nvfx: support using blitter to copy depth/stencil resources, fix Heaven
We might want to copy them as color ones though.

Also works around crash in Unigine Heaven due to failing to allocate
a 64 MB temporary in GART for a CPU copy.

Unigine Heaven now works on nv40, albeit with very heavy glitches (with
the floating branch with render_hdr 0).
2010-09-05 02:01:02 +02:00
Luca Barbieri
20bf5037d6 nvfx: support rendering to more formats 2010-09-04 22:45:21 +02:00
Luca Barbieri
25ecc9521d nvfx: move 2D format selection logic to 2D code 2010-09-04 22:45:21 +02:00
Luca Barbieri
5bd0e0adb1 nvfx: fix swizzling of high bpp surfaces 2010-09-04 22:45:21 +02:00
Luca Barbieri
2e6c65722a nvfx: fix some subrectangle copies
Actually, we may want to get rid of the x/y coordinates for linear
surfaces, and realign the origin from scratch if necessary, instead
of doing this "on-demand realignment".
2010-09-04 22:45:21 +02:00
Luca Barbieri
90d3291595 nvfx: fix inlinining in nv04_2d.c 2010-09-04 22:45:21 +02:00
Luca Barbieri
11d29739e1 nvfx: fix the temporary copying logic and add asserts 2010-09-04 22:45:21 +02:00
Luca Barbieri
f7392eb23a nvfx: prevent swizzled rendering into formats where it's not supported 2010-09-04 22:45:21 +02:00
Marek Olšák
cbf7e82786 Revert "r300g: refuse to create a texture with size 0"
This reverts commit 5cdedaaf29.

https://bugs.freedesktop.org/show_bug.cgi?id=30002

Conflicts:

	src/gallium/drivers/r300/r300_texture.c
2010-09-04 19:06:47 +02:00
Marek Olšák
6e64096190 r300g: remove unnecessary assignments 2010-09-04 19:06:47 +02:00
Marek Olšák
d3ca8a4edd r300g: skip draw calls with no vertex elements, fixing hardlocks 2010-09-04 18:56:22 +02:00
Marek Olšák
cfc461fca6 r300g: add a new debug option which disables compiler optimizations
Those are:
- dead-code elimination
- constant folding
- peephole (mainly copy propagation)
- register allocation

There are some bugs which I need to track down.

Also fix up the descriptions of all the debug options.
2010-09-04 18:56:22 +02:00
Marek Olšák
f46fd04136 r300/compiler: make optimizations not use 0.5 swizzles in vertex shaders 2010-09-04 18:56:21 +02:00
Marek Olšák
3ba562e62a r300/compiler: add new compiler parameter max_constants 2010-09-04 18:56:21 +02:00
Marek Olšák
56de72c78a r300g: only check for an empty shader if there are no compile errors 2010-09-04 18:56:20 +02:00
Marek Olšák
313e95f0c7 r300/compiler: add new compiler parameter max_alu_insts 2010-09-04 18:56:20 +02:00
Luca Barbieri
7a830ac49f nvfx: consolidate tiny files
We probably want to reorganize the remaining files too, but that's
for later, maybe.
2010-09-04 05:31:52 +02:00
Luca Barbieri
f1d50606ba nvfx: fix vp DP2 2010-09-04 04:43:02 +02:00
Luca Barbieri
72648ca51f nvfx: implement fp SSG properly 2010-09-04 04:38:43 +02:00
Luca Barbieri
527a4f11a7 nvfx: don't claim we support preds since the driver doesn't 2010-09-04 04:05:37 +02:00
Luca Barbieri
f1507806ca nv40: support all 10 texcoords 2010-09-04 04:05:37 +02:00
Luca Barbieri
c98b29ec92 nvfx: add missing context init 2010-09-04 03:05:28 +02:00
Luca Barbieri
e887a9fcad nvfx: tidy up state_emit 2010-09-04 03:05:22 +02:00