Commit graph

92185 commits

Author SHA1 Message Date
Eric Anholt
e74f54793e intel-gem: Move bit 6 x tiling swizzle to a driconf option, and add new mode.
It turns out that it's not just deviceID dependent, and there's some additional
undefined factor that determines the bit 6 swizzling.  It's now controllable
with swizzle_mode=[012] until we get a response on how to automatically detect.
2008-07-01 16:14:08 -07:00
Brian Paul
44c99ad236 mesa: better function inlining in the presence of 'return' statements
Before, the presence of a 'return' statement always prevented inlining
a function.  This was because we didn't want to accidentally return from
the _calling_ function.  We still need the semantic of 'return' when inlining
but we can't always use unconditional branches/jumps (GPUs don't always
support arbitrary branching).

Now, we allow inlining functions w/ return if the return is the last
statement in the function.  This fixes the common case of a function
that returns a value, such as:

vec4 square(const in vec4 x)
{
   return x * x;
}

which effectively compiles into:

vec4 square(const in vec4 x)
{
   __retVal = x * x;
   return;
}

The 'return' can be no-op'd now and we can inline the function.

cherry-picked from master
2008-07-01 11:48:57 -06:00
Brian Paul
7d4f01413f mesa: add/fix some IrInfo entries for debugging purposes
cherry-picked from master
2008-07-01 11:48:27 -06:00
Brian Paul
32a5c40336 mesa: better function inlining in the presence of 'return' statements
Before, the presence of a 'return' statement always prevented inlining
a function.  This was because we didn't want to accidentally return from
the _calling_ function.  We still need the semantic of 'return' when inlining
but we can't always use unconditional branches/jumps (GPUs don't always
support arbitrary branching).

Now, we allow inlining functions w/ return if the return is the last
statement in the function.  This fixes the common case of a function
that returns a value, such as:

vec4 square(const in vec4 x)
{
   return x * x;
}

which effectively compiles into:

vec4 square(const in vec4 x)
{
   __retVal = x * x;
   return;
}

The 'return' can be no-op'd now and we can inline the function.
2008-07-01 11:41:21 -06:00
Brian Paul
b2247c7d29 mesa: add/fix some IrInfo entries for debugging purposes 2008-07-01 11:41:02 -06:00
Brian Paul
011b0e51e4 link to DRM 2.3.1 2008-07-01 09:02:10 -06:00
Brian Paul
2ce4b985a5 press 'm' to toggle multisample enable/disable 2008-07-01 08:49:12 -06:00
Brian Paul
634d2af2b0 init machine->Samplers (fixes vertex program texture fetches) 2008-07-01 08:49:12 -06:00
Jakob Bornecrantz
e99ce4af8a i915: Last reference to surface -> pitch 2008-07-01 15:52:37 +02:00
José Fonseca
b3da2a9524 gallium: Use the inline keyword on C++. 2008-07-01 22:04:58 +09:00
José Fonseca
846f87d826 scons: Output mapfile on windows ddk profile builds. 2008-07-01 22:04:01 +09:00
Dave Airlie
d3f7b463c3 dri: drop asserts to make build against stable libdrm
These asserts are of questionable use at the moment with things in flux.
2008-07-01 18:22:12 +10:00
Xiang, Haihao
bcc2a3d7e3 dri: Take the base image size into account when computing
first level of the mipmap.  fix #16210
2008-07-01 11:50:50 +08:00
Younes Manton
9833aec6cb g3dvl: Use block and stride instead of cpp and pitch. 2008-06-30 19:26:22 -04:00
Dan Nicholson
5cae1b747b autoconf: Improve the visibility of the swrast DRI driver
Improve the --with-dri-drivers help text so that users are aware that
they should install the swrast DRI driver.
2008-06-30 11:16:09 -07:00
Corbin Simpson
bb1744970d r3xx/r5xx: Enable ARB_point_parameters.
This isn't complete yet. It does cover the two most common usage cases,
though, and at least the third one (POINT_DISTANCE_ATTENUATION) is possible,
so I'll do that later.
2008-06-30 11:12:51 -07:00
Younes Manton
1c893fd513 g3dvl: Simplify shader code. 2008-06-30 10:11:02 -04:00
Younes Manton
3933fec6bd g3dvl: Support for field and frame based MC for progressive pictures.
MC support for frame and field based motion prediction. Also various bug
fixes, clean up.
2008-06-30 10:11:02 -04:00
Younes Manton
0a6aec8c0f g3dvl: Work around SP tex cache bug, specify resource usage flags. 2008-06-30 10:11:02 -04:00
Younes Manton
14d4f9e44e g3dvl: Get rid of some Valgrind errors.
Get rid of some Valgrind memory leak and uninitialized var errors.
2008-06-30 10:11:02 -04:00
Nicolai Haehnle
23e9b43ce4 r300: Fix dumb mistake in LOD bias translation 2008-06-30 08:37:37 +02:00
José Fonseca
810888f656 gles: Don't define GLAPIENTRY here. 2008-06-30 12:49:32 +09:00
Nicolai Haehnle
4002b75e62 r300: Cleanup LodBias support
. There is both a per-texture unit and a per-texture object (at least for
OpenGL 1.4); this should now be supported properly.
. The LOD bias calculation in r300_state has been simplified and corrected
  (need to multiply by 32 instead of 31, and ensure clamping)
. do not clamp LOD bias in TexEnv, as that behaviour conflicts with what
  the spec says
. set Const.MaxTextureLodBias properly
. remove the no_neg_lod_bias property; if somebody can explain what
  it's good for, we can add it back in, but according to Google, nobody
  seems to use it
. removed some dead code and unused variables
2008-06-30 00:49:00 +02:00
Corbin Simpson
a74d22ba71 r300: Change LOD bias emission to more closely follow per-tex rules.
Okay, this time it's for real, and for good. This should be a perma-fix.
2008-06-29 10:32:19 -07:00
Corbin Simpson
543893eefd Revert accidental edit to progs/demos/lodbias.
*puts yet another paper bag over head*
2008-06-29 10:32:19 -07:00
Nicolai Haehnle
0918023c28 demos/shadowtex: Don't set TEXTURE_WRAP_T for 1D texture
The operation doesn't really make sense. It triggered a bug in the r300 DRI
driver (and possibly other drivers that simulate 1D textures via 2D textures).
I've added an isolated test case for this bug to Piglit, so everybody wins.
2008-06-29 17:34:14 +02:00
Nicolai Haehnle
bc775066aa r300: Fix wrap mode for 1D textures 2008-06-29 17:28:13 +02:00
Ben Skeggs
c6ddcc10e3 nouveau: oops, bump the drm patchlevel back down again 2008-06-29 16:02:01 +10:00
Ben Skeggs
bf94027fdd nv50: fixes after rebase + commits note on the code that was just pushed.
OK, seems a lot of people have been getting the idea that nouveau is
dying lately - I decided to commit some of the work I've been doing lately
to prove them wrong :)  Progress on my side is slow due to lack of time
mainly, but I'm still around.

Firstly, don't even bother trying to use gallium on G8x/G9x yet, it won't
work.  I've deliberately left all the necessary winsys changes out of the
commits for a very good reason - I don't know what we're going to need from
the DRM exactly yet and don't want to be continually breaking interfaces
as I discover additional requirements.  On my side, I think I've gone
through about 3 different DRM interface changes, and have just discovered
that I may need more yet.  It'd be very annoying for everyone who uses
nouveau to keep things in sync.  Once I've got it sorted - I'll commit a
lot of cool stuff. Stay tuned.

Also, don't look at the shader code.. it's horribly nasty and full of hacks,
I used it as an opportunity to learn G8x GPU programs at the same time.
New semi-decent code is in works, and will follow at some point. :)
2008-06-29 16:00:42 +10:00
Ben Skeggs
70f0f0ebdf nv50: reverse stencil sides, header is wrong 2008-06-29 15:46:53 +10:00
Ben Skeggs
e52d37d56c nv50: fix line stipple 2008-06-29 15:46:53 +10:00
Ben Skeggs
fea9eb2842 nv50: don't multiply polygon offset units by 2.0 like on nv40 2008-06-29 15:46:53 +10:00
Ben Skeggs
e05f67cbe6 nv50: maybe some scissor fixes.. 2008-06-29 15:46:53 +10:00
Ben Skeggs
95d64ceb5a nv50: vpt translate/scale backwards 2008-06-29 15:46:53 +10:00
Ben Skeggs
e002ad7739 nv50: whoops 2008-06-29 15:46:52 +10:00
Ben Skeggs
2c2cb86461 nv50: rework miptree/texture/texsurf code a bit 2008-06-29 15:46:52 +10:00
Ben Skeggs
5a3362521d nv50: turn on depth test/write again, not 100% but winsys handles it better 2008-06-29 15:46:20 +10:00
Ben Skeggs
47771bcd2f nv50: maintain pipe surface status field 2008-06-29 15:46:19 +10:00
Ben Skeggs
e901302575 nv50: remove some debug 2008-06-29 15:46:19 +10:00
Ben Skeggs
5a3ea9ee59 nv50: simplify emit_interp a bit 2008-06-29 15:46:19 +10:00
Ben Skeggs
714cb4a86c nv50: make sure static buffers (constbuf, tex control etc) get on reloc list 2008-06-29 15:46:19 +10:00
Ben Skeggs
3b88c3f411 nv50: R32_FLOAT vbo format 2008-06-29 15:46:19 +10:00
Ben Skeggs
65ad8176ca nv50: move surface_map/unmap into nv50_surface.c 2008-06-29 15:46:19 +10:00
Ben Skeggs
fd7412a7f1 nv50: some people are just born stupid.. really.. 2008-06-29 15:46:19 +10:00
Ben Skeggs
598b2a5105 nv50: make TEX a halfie 2008-06-29 15:46:19 +10:00
Ben Skeggs
035a04d9c1 nv50: get tri-scissor-tri working 2008-06-29 15:46:19 +10:00
Ben Skeggs
bb9efb5534 nv50: separate state validation and upload, similar to nv40 2008-06-29 15:46:19 +10:00
Ben Skeggs
94999d39d4 nv50: fix blend colour 2008-06-29 15:46:19 +10:00
Ben Skeggs
5d30701492 nv50: use stateobjs for sampler/image_control uploads 2008-06-29 15:46:18 +10:00
Ben Skeggs
431504b99c nv50: hack of a TEX opcode 2008-06-29 15:46:18 +10:00