mesa.git
16 years agonv04: use BEGIN_RING_NI
Stephane Marchesin [Mon, 7 Jul 2008 23:30:48 +0000 (01:30 +0200)]
nv04: use BEGIN_RING_NI

16 years agonv04.
Stephane Marchesin [Mon, 7 Jul 2008 23:06:18 +0000 (01:06 +0200)]
nv04.

16 years agog3dvl: IDCT part 1.
Younes Manton [Mon, 7 Jul 2008 02:04:29 +0000 (22:04 -0400)]
g3dvl: IDCT part 1.

Very basic IDCT support is in, performed CPU-side for now.

16 years agog3dvl: Round surfaces up to POT, use src rect when outputting surfaces.
Younes Manton [Fri, 4 Jul 2008 00:05:32 +0000 (20:05 -0400)]
g3dvl: Round surfaces up to POT, use src rect when outputting surfaces.

16 years agonv30: Emit sampler state using state objects
Patrice Mandin [Fri, 4 Jul 2008 16:53:44 +0000 (18:53 +0200)]
nv30: Emit sampler state using state objects

16 years agoMerge remote branch 'upstream/gallium-0.1' into gallium-0.1
Ben Skeggs [Fri, 4 Jul 2008 14:53:13 +0000 (00:53 +1000)]
Merge remote branch 'upstream/gallium-0.1' into gallium-0.1

16 years agoscons: Enable gcc SSE2 intrinsics on x86.
José Fonseca [Fri, 4 Jul 2008 13:27:50 +0000 (22:27 +0900)]
scons: Enable gcc SSE2 intrinsics on x86.

16 years agomesa: added _vbo_VertexAttrib4f()
Brian Paul [Thu, 3 Jul 2008 22:59:24 +0000 (16:59 -0600)]
mesa: added _vbo_VertexAttrib4f()

16 years agomesa: fix incorrect array size, added assertion
Brian Paul [Thu, 3 Jul 2008 22:24:26 +0000 (16:24 -0600)]
mesa: fix incorrect array size, added assertion

16 years agomesa: fix array storage allocation bug
Brian Paul [Thu, 3 Jul 2008 22:23:18 +0000 (16:23 -0600)]
mesa: fix array storage allocation bug

16 years agomesa: regenerated file
Brian Paul [Thu, 3 Jul 2008 22:22:49 +0000 (16:22 -0600)]
mesa: regenerated file

16 years agomesa: additional vec4 constructor
Brian Paul [Thu, 3 Jul 2008 22:22:36 +0000 (16:22 -0600)]
mesa: additional vec4 constructor

16 years agomesa: fix various error codes
Brian Paul [Thu, 3 Jul 2008 22:21:15 +0000 (16:21 -0600)]
mesa: fix various error codes

16 years agomesa: fix some error codes in _mesa_ShaderSourceARB()
Brian Paul [Thu, 3 Jul 2008 22:02:13 +0000 (16:02 -0600)]
mesa: fix some error codes in _mesa_ShaderSourceARB()

16 years agomesa: fix problem freeing framebuffer/renderbuffer objects
Brian Paul [Thu, 3 Jul 2008 21:41:45 +0000 (15:41 -0600)]
mesa: fix problem freeing framebuffer/renderbuffer objects

Basically, set up no-op Delete() methods for the DummyFrame/Renderbuffer obj

16 years agogallium: added a4r4g4b4_put_tile_rgba()
Brian Paul [Thu, 3 Jul 2008 20:55:14 +0000 (14:55 -0600)]
gallium: added a4r4g4b4_put_tile_rgba()

16 years agomesa: added case for fixed pt
Brian Paul [Thu, 3 Jul 2008 20:12:27 +0000 (14:12 -0600)]
mesa: added case for fixed pt

16 years agogallium: increase TGSI interpreter's number of temp registers to 64
Brian Paul [Thu, 3 Jul 2008 18:56:33 +0000 (12:56 -0600)]
gallium: increase TGSI interpreter's number of temp registers to 64

Also, clean up the definitions of the misc/extra temp regs.
A few new assertions too.

16 years agogallium: move, increase ST_MAX_SHADER_TOKENS
Brian Paul [Thu, 3 Jul 2008 16:43:14 +0000 (10:43 -0600)]
gallium: move, increase ST_MAX_SHADER_TOKENS

16 years agogallium: increase TGSI_EXEC_MAX_COND_NESTING, etc
Brian Paul [Thu, 3 Jul 2008 16:42:31 +0000 (10:42 -0600)]
gallium: increase TGSI_EXEC_MAX_COND_NESTING, etc

16 years agonv30: Reemit state when changing context
Patrice Mandin [Thu, 3 Jul 2008 20:47:15 +0000 (22:47 +0200)]
nv30: Reemit state when changing context

16 years agonv30: Emit viewport state using state objects
Patrice Mandin [Thu, 3 Jul 2008 20:42:30 +0000 (22:42 +0200)]
nv30: Emit viewport state using state objects

16 years agonv30: Emit polygon stipple state using state objects
Patrice Mandin [Thu, 3 Jul 2008 20:31:23 +0000 (22:31 +0200)]
nv30: Emit polygon stipple state using state objects

16 years agonv30: Emit scissor state using state objects
Patrice Mandin [Thu, 3 Jul 2008 20:18:38 +0000 (22:18 +0200)]
nv30: Emit scissor state using state objects

16 years agonv30: Emit depth/stencil/alpha state using state objects
Patrice Mandin [Thu, 3 Jul 2008 20:10:53 +0000 (22:10 +0200)]
nv30: Emit depth/stencil/alpha state using state objects

16 years agonv30: Emit rasterizer state using state objects
Patrice Mandin [Thu, 3 Jul 2008 19:48:18 +0000 (21:48 +0200)]
nv30: Emit rasterizer state using state objects

16 years agonv30: Emit blend state using state objects
Patrice Mandin [Thu, 3 Jul 2008 19:25:47 +0000 (21:25 +0200)]
nv30: Emit blend state using state objects

16 years agonv30: Emit blend color state using state objects
Patrice Mandin [Thu, 3 Jul 2008 19:11:07 +0000 (21:11 +0200)]
nv30: Emit blend color state using state objects

16 years agonv30: Emit framebuffer state using state objects
Patrice Mandin [Thu, 3 Jul 2008 18:58:31 +0000 (20:58 +0200)]
nv30: Emit framebuffer state using state objects

16 years agogallium: fix surface memleak in bitmap code
Brian Paul [Thu, 3 Jul 2008 16:12:00 +0000 (10:12 -0600)]
gallium: fix surface memleak in bitmap code

Found w/ tunnel2.c demo.

16 years agopipebuffer: Silent warnings.
José Fonseca [Thu, 3 Jul 2008 12:28:56 +0000 (21:28 +0900)]
pipebuffer: Silent warnings.

Although rarely hit in normal apps, they are too noisy with test suites.

16 years agoSupport conversion of YUV surfaces.
José Fonseca [Thu, 3 Jul 2008 10:55:14 +0000 (19:55 +0900)]
Support conversion of YUV surfaces.

16 years agogallium: Don't forget to get overllaping blits working again.
José Fonseca [Thu, 3 Jul 2008 10:52:05 +0000 (19:52 +0900)]
gallium: Don't forget to get overllaping blits working again.

16 years agoi915: EGL almost works again
Jakob Bornecrantz [Thu, 3 Jul 2008 10:12:25 +0000 (12:12 +0200)]
i915: EGL almost works again

16 years agoegl: Fix demodriver
Jakob Bornecrantz [Thu, 3 Jul 2008 10:10:36 +0000 (12:10 +0200)]
egl: Fix demodriver

16 years agogallium: Use surface_copy for 1:1 blits.
José Fonseca [Thu, 3 Jul 2008 06:02:56 +0000 (15:02 +0900)]
gallium: Use surface_copy for 1:1 blits.

16 years agoscons: Add a env.CodeGenerate method to simplify code generation via python scripts.
José Fonseca [Thu, 3 Jul 2008 03:42:23 +0000 (12:42 +0900)]
scons: Add a env.CodeGenerate method to simplify code generation via python scripts.

env.CodeGenerate(
target = 'my_source.c',
script = 'my_generator.py',
source = ['input.txt', 'another.txt'],
command = 'python $SCRIPT $SOURCE > $TARGET'
)

It will take care generating all appropriate dependencies, including any
module imported by the generator script, and the respective .pyc file
side effects.

16 years agomesa: fix vertex array validation test for attribute 0 (vert pos)
Brian Paul [Thu, 3 Jul 2008 01:18:10 +0000 (19:18 -0600)]
mesa: fix vertex array validation test for attribute 0 (vert pos)

We don't actually need vertex array[0] enabled when using a vertex
program/shader.

cherry-picked from master

16 years agogallium: replace an assertion with "if (!texobj) continue"
Brian Paul [Thu, 3 Jul 2008 01:11:49 +0000 (19:11 -0600)]
gallium: replace an assertion with "if (!texobj) continue"

It's possible to call update_samplers() between the time a fragment shader
is bound and when a texture image is defined (such as glClear).  This
fixes the case where we don't have a complete texture object yet.

16 years agogallium: fix a bug in vertex program output mapping
Brian Paul [Thu, 3 Jul 2008 01:07:11 +0000 (19:07 -0600)]
gallium: fix a bug in vertex program output mapping

Need to translate VERT_RESULT_PSIZ, BFC0, BFC1 to TGSI shader output slots
after all other attributes have been handled.  This fixes a bug where
generic vertex program outputs (varying vars) could get mapped to the
same slot at point size or back-face colors.

16 years agogallium: nr_attrs was off by one, updated comments, minor code movement
Brian Paul [Thu, 3 Jul 2008 01:05:18 +0000 (19:05 -0600)]
gallium: nr_attrs was off by one, updated comments, minor code movement

16 years agomesa: additional GLSL built-in constants
Brian Paul [Wed, 2 Jul 2008 23:10:42 +0000 (17:10 -0600)]
mesa: additional GLSL built-in constants

16 years agomesa: when linking a shader program, make sure all the shaders compiled OK
Brian Paul [Wed, 2 Jul 2008 23:08:47 +0000 (17:08 -0600)]
mesa: when linking a shader program, make sure all the shaders compiled OK

cherry-picked from master

16 years agomesa: added some debug code (disabled)
Brian Paul [Wed, 2 Jul 2008 23:08:28 +0000 (17:08 -0600)]
mesa: added some debug code (disabled)

cherry-picked from master

16 years agomesa: fix error codes in _mesa_shader_source(), _mesa_get_shader_source()
Brian Paul [Wed, 2 Jul 2008 23:08:09 +0000 (17:08 -0600)]
mesa: fix error codes in _mesa_shader_source(), _mesa_get_shader_source()

If the 'shader' parameter is wrong, need to either generate GL_INVALID_VALUE
or GL_INVALID_OPERATION.  It depends on whether 'shader' actually names a
'program' or is a totally unknown ID.
There might be other cases to fix...

cherry-picked from master

16 years agomesa: regenerated file
Brian Paul [Wed, 2 Jul 2008 23:06:26 +0000 (17:06 -0600)]
mesa: regenerated file

16 years agomesa: added some missing equal() notEqual() intrinsics
Brian Paul [Wed, 2 Jul 2008 23:05:56 +0000 (17:05 -0600)]
mesa: added some missing equal() notEqual() intrinsics

cherry-picked from master

16 years agomesa: disable some debug assertions
Brian Paul [Wed, 2 Jul 2008 18:47:18 +0000 (12:47 -0600)]
mesa: disable some debug assertions

We can sometimes fail these assertions because of how swizzled storage
works.  Will revisit someday.

16 years agomesa: regenerated files
Brian Paul [Wed, 2 Jul 2008 18:46:18 +0000 (12:46 -0600)]
mesa: regenerated files

16 years agomesa: fix all(bvec2) function typo, add missing bvec2/3/4() constuctors
Brian Paul [Wed, 2 Jul 2008 18:45:55 +0000 (12:45 -0600)]
mesa: fix all(bvec2) function typo, add missing bvec2/3/4() constuctors

cherry-picked from master

16 years agogallium: replace 128 with MAX_LABELS
Brian Paul [Wed, 2 Jul 2008 18:41:18 +0000 (12:41 -0600)]
gallium: replace 128 with MAX_LABELS

16 years agomesa: added _mesa_print_swizzle() debugging helper
Brian Paul [Wed, 2 Jul 2008 18:40:03 +0000 (12:40 -0600)]
mesa: added _mesa_print_swizzle() debugging helper

16 years agomesa: fix issues around multisample enable
Roland Scheidegger [Wed, 2 Jul 2008 18:08:27 +0000 (20:08 +0200)]
mesa: fix issues around multisample enable

multisample enable is enabled by default, however gl mandates multisample
rendering rules only apply if there's also a multisampled buffer.

16 years agogallium: Allow draw module to work on non-x86 platforms again.
Michel Dänzer [Wed, 2 Jul 2008 10:10:15 +0000 (12:10 +0200)]
gallium: Allow draw module to work on non-x86 platforms again.

16 years agopipebuffer: Debug buffer manager to detect buffer under- and overflows.
José Fonseca [Wed, 2 Jul 2008 03:24:19 +0000 (12:24 +0900)]
pipebuffer: Debug buffer manager to detect buffer under- and overflows.

It should detect both cpu and gpu buffer overflows.

16 years agopipebuffer: Verify usage flag consistency. Minor cleanups.
José Fonseca [Wed, 2 Jul 2008 03:22:51 +0000 (12:22 +0900)]
pipebuffer: Verify usage flag consistency. Minor cleanups.

16 years agomesa: fix a GLSL vector subscript/writemask bug
Brian Paul [Wed, 2 Jul 2008 00:40:23 +0000 (18:40 -0600)]
mesa: fix a GLSL vector subscript/writemask bug

This fixes a failure for cases like:
   vec4 v;
   v[1] *= 2.0;

The v[1] actually acts like a writemask, equivalent to v.y
The fix is a bit convoluted, but will do for now.

cherry-picked from master

16 years agomesa: move some functions
Brian Paul [Wed, 2 Jul 2008 00:39:46 +0000 (18:39 -0600)]
mesa: move some functions

cherry-picked from master

16 years agomesa: make _slang_swizzle_swizzle() non-private
Brian Paul [Wed, 2 Jul 2008 00:39:22 +0000 (18:39 -0600)]
mesa: make _slang_swizzle_swizzle() non-private

cherry-picked from master

16 years agomesa: better function inlining in the presence of 'return' statements
Brian Paul [Tue, 1 Jul 2008 17:48:57 +0000 (11:48 -0600)]
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

16 years agomesa: add/fix some IrInfo entries for debugging purposes
Brian Paul [Tue, 1 Jul 2008 17:48:27 +0000 (11:48 -0600)]
mesa: add/fix some IrInfo entries for debugging purposes

cherry-picked from master

16 years agoi915: Last reference to surface -> pitch
Jakob Bornecrantz [Tue, 1 Jul 2008 13:52:37 +0000 (15:52 +0200)]
i915: Last reference to surface -> pitch

16 years agogallium: Use the inline keyword on C++.
José Fonseca [Tue, 1 Jul 2008 13:04:58 +0000 (22:04 +0900)]
gallium: Use the inline keyword on C++.

16 years agoscons: Output mapfile on windows ddk profile builds.
José Fonseca [Tue, 1 Jul 2008 13:04:01 +0000 (22:04 +0900)]
scons: Output mapfile on windows ddk profile builds.

16 years agog3dvl: Use block and stride instead of cpp and pitch.
Younes Manton [Mon, 30 Jun 2008 23:26:22 +0000 (19:26 -0400)]
g3dvl: Use block and stride instead of cpp and pitch.

16 years agog3dvl: Simplify shader code.
Younes Manton [Mon, 30 Jun 2008 00:52:58 +0000 (20:52 -0400)]
g3dvl: Simplify shader code.

16 years agog3dvl: Support for field and frame based MC for progressive pictures.
Younes Manton [Sun, 29 Jun 2008 00:16:01 +0000 (20:16 -0400)]
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.

16 years agog3dvl: Work around SP tex cache bug, specify resource usage flags.
Younes Manton [Thu, 19 Jun 2008 02:21:11 +0000 (22:21 -0400)]
g3dvl: Work around SP tex cache bug, specify resource usage flags.

16 years agog3dvl: Get rid of some Valgrind errors.
Younes Manton [Tue, 17 Jun 2008 03:18:20 +0000 (23:18 -0400)]
g3dvl: Get rid of some Valgrind errors.

Get rid of some Valgrind memory leak and uninitialized var errors.

16 years agogles: Don't define GLAPIENTRY here.
José Fonseca [Mon, 30 Jun 2008 03:49:14 +0000 (12:49 +0900)]
gles: Don't define GLAPIENTRY here.

16 years agonouveau: oops, bump the drm patchlevel back down again
Ben Skeggs [Sun, 29 Jun 2008 06:02:01 +0000 (16:02 +1000)]
nouveau: oops, bump the drm patchlevel back down again

16 years agonv50: fixes after rebase + commits note on the code that was just pushed.
Ben Skeggs [Sun, 29 Jun 2008 05:59:24 +0000 (15:59 +1000)]
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. :)

16 years agonv50: reverse stencil sides, header is wrong
Ben Skeggs [Tue, 24 Jun 2008 20:07:02 +0000 (06:07 +1000)]
nv50: reverse stencil sides, header is wrong

16 years agonv50: fix line stipple
Ben Skeggs [Tue, 24 Jun 2008 20:01:30 +0000 (06:01 +1000)]
nv50: fix line stipple

16 years agonv50: don't multiply polygon offset units by 2.0 like on nv40
Ben Skeggs [Tue, 24 Jun 2008 19:58:35 +0000 (05:58 +1000)]
nv50: don't multiply polygon offset units by 2.0 like on nv40

16 years agonv50: maybe some scissor fixes..
Ben Skeggs [Tue, 24 Jun 2008 19:17:08 +0000 (05:17 +1000)]
nv50: maybe some scissor fixes..

16 years agonv50: vpt translate/scale backwards
Ben Skeggs [Tue, 24 Jun 2008 19:11:46 +0000 (05:11 +1000)]
nv50: vpt translate/scale backwards

16 years agonv50: whoops
Ben Skeggs [Tue, 24 Jun 2008 18:57:27 +0000 (04:57 +1000)]
nv50: whoops

16 years agonv50: rework miptree/texture/texsurf code a bit
Ben Skeggs [Tue, 24 Jun 2008 18:53:34 +0000 (04:53 +1000)]
nv50: rework miptree/texture/texsurf code a bit

16 years agonv50: turn on depth test/write again, not 100% but winsys handles it better
Ben Skeggs [Tue, 24 Jun 2008 17:56:57 +0000 (03:56 +1000)]
nv50: turn on depth test/write again, not 100% but winsys handles it better

16 years agonv50: maintain pipe surface status field
Ben Skeggs [Mon, 23 Jun 2008 13:43:34 +0000 (23:43 +1000)]
nv50: maintain pipe surface status field

16 years agonv50: remove some debug
Ben Skeggs [Mon, 23 Jun 2008 13:42:53 +0000 (23:42 +1000)]
nv50: remove some debug

16 years agonv50: simplify emit_interp a bit
Ben Skeggs [Wed, 18 Jun 2008 03:23:00 +0000 (13:23 +1000)]
nv50: simplify emit_interp a bit

16 years agonv50: make sure static buffers (constbuf, tex control etc) get on reloc list
Ben Skeggs [Tue, 17 Jun 2008 13:55:23 +0000 (23:55 +1000)]
nv50: make sure static buffers (constbuf, tex control etc) get on reloc list

16 years agonv50: R32_FLOAT vbo format
Ben Skeggs [Tue, 17 Jun 2008 13:52:41 +0000 (23:52 +1000)]
nv50: R32_FLOAT vbo format

16 years agonv50: move surface_map/unmap into nv50_surface.c
Ben Skeggs [Tue, 17 Jun 2008 13:43:38 +0000 (23:43 +1000)]
nv50: move surface_map/unmap into nv50_surface.c

16 years agonv50: some people are just born stupid.. really..
Ben Skeggs [Mon, 16 Jun 2008 15:51:13 +0000 (01:51 +1000)]
nv50: some people are just born stupid.. really..

16 years agonv50: make TEX a halfie
Ben Skeggs [Mon, 16 Jun 2008 15:36:36 +0000 (01:36 +1000)]
nv50: make TEX a halfie

16 years agonv50: get tri-scissor-tri working
Ben Skeggs [Mon, 16 Jun 2008 12:34:50 +0000 (22:34 +1000)]
nv50: get tri-scissor-tri working

16 years agonv50: separate state validation and upload, similar to nv40
Ben Skeggs [Mon, 16 Jun 2008 12:24:16 +0000 (22:24 +1000)]
nv50: separate state validation and upload, similar to nv40

16 years agonv50: fix blend colour
Ben Skeggs [Mon, 16 Jun 2008 12:06:54 +0000 (22:06 +1000)]
nv50: fix blend colour

16 years agonv50: use stateobjs for sampler/image_control uploads
Ben Skeggs [Mon, 16 Jun 2008 12:02:02 +0000 (22:02 +1000)]
nv50: use stateobjs for sampler/image_control uploads

16 years agonv50: hack of a TEX opcode
Ben Skeggs [Mon, 16 Jun 2008 08:56:39 +0000 (18:56 +1000)]
nv50: hack of a TEX opcode

16 years agonv50: hacks for stuff I don't really get yet
Ben Skeggs [Mon, 16 Jun 2008 08:03:29 +0000 (18:03 +1000)]
nv50: hacks for stuff I don't really get yet

16 years agonv50: abuse constbuf upload for program upload
Ben Skeggs [Mon, 16 Jun 2008 06:29:40 +0000 (16:29 +1000)]
nv50: abuse constbuf upload for program upload

16 years agonv50: a couple more bits'n'pieces
Ben Skeggs [Mon, 16 Jun 2008 02:55:53 +0000 (12:55 +1000)]
nv50: a couple more bits'n'pieces

16 years agonv50: disable inline IMMD for now, IMMD+pred == BANG!
Ben Skeggs [Sun, 15 Jun 2008 05:53:22 +0000 (15:53 +1000)]
nv50: disable inline IMMD for now, IMMD+pred == BANG!

fixes progs/fp/lit.txt

16 years agonv50: simplify interp crap a bit...
Ben Skeggs [Sun, 15 Jun 2008 05:49:25 +0000 (15:49 +1000)]
nv50: simplify interp crap a bit...

hopefully there wasn't a good reason I went the route I did.. can't recall..

16 years agonv50: do tsc/tic upload + stub out shader TEX stuff
Ben Skeggs [Fri, 13 Jun 2008 02:09:46 +0000 (12:09 +1000)]
nv50: do tsc/tic upload + stub out shader TEX stuff

16 years agonv50: disable ztest for now - it doesn't work still
Ben Skeggs [Fri, 13 Jun 2008 01:50:13 +0000 (11:50 +1000)]
nv50: disable ztest for now - it doesn't work still