mesa.git
15 years agoutil/debug: need to fflush(stderr) on windows
Keith Whitwell [Fri, 20 Feb 2009 14:27:23 +0000 (14:27 +0000)]
util/debug:  need to fflush(stderr) on windows

Hard to believe... but true.

15 years agoutil: Also output messages to stderr on windows.
José Fonseca [Fri, 20 Feb 2009 14:14:19 +0000 (14:14 +0000)]
util: Also output messages to stderr on windows.

When there is a console attached, and no debugger attached.

15 years agowgl: Prevent null pointer reference.
José Fonseca [Fri, 20 Feb 2009 11:35:46 +0000 (11:35 +0000)]
wgl: Prevent null pointer reference.

15 years agoutil: Stack backtracing facilities.
José Fonseca [Fri, 20 Feb 2009 11:35:23 +0000 (11:35 +0000)]
util: Stack backtracing facilities.

Not much useful until we have symbol lookup.

15 years agogallium: s/GALLIUM_DRIVER_DIRS/GALLIUM_DRIVERS_DIRS/
Jakob Bornecrantz [Fri, 20 Feb 2009 11:03:18 +0000 (11:03 +0000)]
gallium: s/GALLIUM_DRIVER_DIRS/GALLIUM_DRIVERS_DIRS/

15 years agogallium: Improve recursive makefiles
Jakob Bornecrantz [Thu, 19 Feb 2009 23:50:26 +0000 (00:50 +0100)]
gallium: Improve recursive makefiles

15 years agogallium: Improve winsys dri template Makefile
Jakob Bornecrantz [Thu, 19 Feb 2009 23:47:46 +0000 (00:47 +0100)]
gallium: Improve winsys dri template Makefile

LIBNAME_EGL had to be removed since if you didn't
set it (nobody set it anyways) make would get it
confused it with the $(TOP)/lib/gallium target.

15 years agointel: Use new makefile template for drm gem
Jakob Bornecrantz [Thu, 19 Feb 2009 23:23:29 +0000 (00:23 +0100)]
intel: Use new makefile template for drm gem

15 years agonouveau: Use new makefile template for drm common
Jakob Bornecrantz [Thu, 19 Feb 2009 23:22:07 +0000 (00:22 +0100)]
nouveau: Use new makefile template for drm common

15 years agogallium: Improve makefiles for libraries
Jakob Bornecrantz [Thu, 19 Feb 2009 23:14:00 +0000 (00:14 +0100)]
gallium: Improve makefiles for libraries

The template makefile that most libraries in
gallium included was based on dri and had a bunch
unrelevant junk in it.

Update it and improve the depending makefiles.

15 years agonouveau: reenable all the non-nv50 pipe drivers
Ben Skeggs [Thu, 19 Feb 2009 23:47:56 +0000 (09:47 +1000)]
nouveau: reenable all the non-nv50 pipe drivers

They still won't build yet, but anyway..

15 years agonv50: remove unused variable
Ben Skeggs [Thu, 19 Feb 2009 23:39:13 +0000 (09:39 +1000)]
nv50: remove unused variable

15 years agonv50: fix occlusion queries
Ben Skeggs [Thu, 19 Feb 2009 23:38:06 +0000 (09:38 +1000)]
nv50: fix occlusion queries

Left behind from some gallium changes a while back..

15 years agonv50: rework for texture_transfer changes
Ben Skeggs [Thu, 19 Feb 2009 23:32:47 +0000 (09:32 +1000)]
nv50: rework for texture_transfer changes

15 years agogallium: Renable pipe drivers disabled during vbuf changes
Jakob Bornecrantz [Thu, 19 Feb 2009 22:15:28 +0000 (23:15 +0100)]
gallium: Renable pipe drivers disabled during vbuf changes

i965simple is not enabled because it is still broken.

15 years agotrival: Make the last of progs show the name
Jakob Bornecrantz [Thu, 19 Feb 2009 21:48:21 +0000 (22:48 +0100)]
trival: Make the last of progs show the name

15 years agomesa: support GL_EXT_stencil_two_side in gallium/mesa state tracker
Brian Paul [Thu, 19 Feb 2009 21:37:43 +0000 (14:37 -0700)]
mesa: support GL_EXT_stencil_two_side in gallium/mesa state tracker

Since Ian's patch of a few weeks ago, we can enable all three variations
of two-sided stencil.  Update the state tracker to handle the extra back-
face state and turn on the EXT.

Note: there's a new Glean test for two-sided stencil now...

15 years agomesa: fix/update/restore comments related to two-sided stencil
Brian Paul [Thu, 19 Feb 2009 21:36:58 +0000 (14:36 -0700)]
mesa: fix/update/restore comments related to two-sided stencil

15 years agomesa: initialize ctx->Stencil._BackFace = 1
Brian Paul [Thu, 19 Feb 2009 21:34:33 +0000 (14:34 -0700)]
mesa: initialize ctx->Stencil._BackFace = 1

Back-face stencil operations didn't work correctly because this value was
zero.  It needs to be 1 or 2.  The only place it's set otherwise is in
glEnable/Disable(GL_STENCIL_TEST_TWO_SIDE_EXT).

15 years agodraw: Fix segfault if rast is null
Jakob Bornecrantz [Sat, 14 Feb 2009 16:48:11 +0000 (17:48 +0100)]
draw: Fix segfault if rast is null

15 years agogallium/winsys/xlib: Fix build with USE_XSHM undefined.
Michel Dänzer [Thu, 19 Feb 2009 18:52:59 +0000 (19:52 +0100)]
gallium/winsys/xlib: Fix build with USE_XSHM undefined.

15 years agowgl: debug_printf in the main entry/exit points
José Fonseca [Thu, 19 Feb 2009 13:15:25 +0000 (13:15 +0000)]
wgl: debug_printf in the main entry/exit points

15 years agomesa: Free the util shaders with the gallium's FREE.
José Fonseca [Thu, 19 Feb 2009 13:02:47 +0000 (13:02 +0000)]
mesa: Free the util shaders with the gallium's FREE.

15 years agowgl: Call pipe_screen::destroy on exit.
José Fonseca [Thu, 19 Feb 2009 12:58:00 +0000 (12:58 +0000)]
wgl: Call pipe_screen::destroy on exit.

15 years agoegl: glx updates for FBconfigs
Alan Hourihane [Thu, 19 Feb 2009 13:07:37 +0000 (13:07 +0000)]
egl: glx updates for FBconfigs

15 years agoegl: if a surface type isn't defined let's default to EGL_WINDOW_BIT
Alan Hourihane [Thu, 19 Feb 2009 13:07:10 +0000 (13:07 +0000)]
egl: if a surface type isn't defined let's default to EGL_WINDOW_BIT

15 years agotrivial: Add quadstrip-clip
Jakob Bornecrantz [Sat, 14 Feb 2009 08:39:52 +0000 (09:39 +0100)]
trivial: Add quadstrip-clip

15 years agoegl: error checking
Alan Hourihane [Thu, 19 Feb 2009 11:01:01 +0000 (11:01 +0000)]
egl: error checking

15 years agowgl: Use a separate .DEF for MinGW
José Fonseca [Thu, 19 Feb 2009 10:57:11 +0000 (10:57 +0000)]
wgl: Use a separate .DEF for MinGW

gnu linker fails to resolve the @n symbols, unless:
- they are listed verbatim in the .def
- they are already linked.

And mingw's .def parser is slightly incompatible with MSVC in respect with
underscores. Will try to work with upstream to fix this, but for now there
is no option other to use seperate .def for mingw.

15 years agowgl: Share more code between icd and standalone driver.
José Fonseca [Thu, 19 Feb 2009 10:52:08 +0000 (10:52 +0000)]
wgl: Share more code between icd and standalone driver.

15 years agogdi: Update for texture/surface interface changes.
José Fonseca [Wed, 18 Feb 2009 17:58:42 +0000 (17:58 +0000)]
gdi: Update for texture/surface interface changes.

15 years agoutil: Use right include.
José Fonseca [Wed, 18 Feb 2009 17:42:55 +0000 (17:42 +0000)]
util: Use right include.

15 years agoprogs: Make fp-tri use glew and add scons target
Jakob Bornecrantz [Sat, 14 Feb 2009 00:05:13 +0000 (01:05 +0100)]
progs: Make fp-tri use glew and add scons target

15 years agocell: patch up cell_texture.c so it compiles
Brian Paul [Thu, 19 Feb 2009 04:50:20 +0000 (21:50 -0700)]
cell: patch up cell_texture.c so it compiles

Start adding some new pipe_transfer code.

Texturing is totally broken at this point but non-texture programs
seem to run OK.

15 years agocell: updates for new pipe_transfer changes
Brian Paul [Thu, 19 Feb 2009 04:46:12 +0000 (21:46 -0700)]
cell: updates for new pipe_transfer changes

Update framebuffer color/z/stencil mapping/unmapping.

15 years agocell: update vbuf code to catch up to recent changes
Brian Paul [Thu, 19 Feb 2009 04:38:53 +0000 (21:38 -0700)]
cell: update vbuf code to catch up to recent changes

15 years agocell: remove unused var
Brian Paul [Thu, 19 Feb 2009 04:38:17 +0000 (21:38 -0700)]
cell: remove unused var

15 years agocell: start adding new cell_transfer types/code
Brian Paul [Thu, 19 Feb 2009 04:36:29 +0000 (21:36 -0700)]
cell: start adding new cell_transfer types/code

15 years agocell: remove old surface_map code
Brian Paul [Thu, 19 Feb 2009 04:35:56 +0000 (21:35 -0700)]
cell: remove old surface_map code

15 years agomesa: convert VERT_RESULT_* from #defines to enum, like the others
Brian Paul [Thu, 19 Feb 2009 00:50:24 +0000 (17:50 -0700)]
mesa: convert VERT_RESULT_* from #defines to enum, like the others

15 years agoglsl: asst improvements, clean-ups in set_program_uniform()
Brian Paul [Thu, 19 Feb 2009 00:46:00 +0000 (17:46 -0700)]
glsl: asst improvements, clean-ups in set_program_uniform()

Move the is_boolean/integer_type() calls out of the loops.
Move the is_sampler_type() function near the bool/int functions.
Add a bunch of comments.

15 years agoglsl: fix inequality in set_program_uniform()
Brian Paul [Thu, 19 Feb 2009 00:40:44 +0000 (17:40 -0700)]
glsl: fix inequality in set_program_uniform()

We were off by one when checking for too many uniform values.

15 years agogallium/winsys/egl_xlib: Fix build after introduction of struct pipe_transfer.
Michel Dänzer [Wed, 18 Feb 2009 22:39:36 +0000 (23:39 +0100)]
gallium/winsys/egl_xlib: Fix build after introduction of struct pipe_transfer.

15 years agomesa: bump gl.h version comment to 7.7 (bug 20170)
Brian Paul [Wed, 18 Feb 2009 22:38:10 +0000 (15:38 -0700)]
mesa: bump gl.h version comment to 7.7 (bug 20170)

15 years agor300-gallium: implement simple pipe_transfer Basically make the driver compile and...
Joakim Sindholt [Wed, 18 Feb 2009 19:32:40 +0000 (20:32 +0100)]
r300-gallium: implement simple pipe_transfer Basically make the driver compile and behave like it did before the gallium-texture-transfer merge

15 years agoglsl: fix link failure for variable-indexed varying output arrays
Brian Paul [Wed, 18 Feb 2009 21:24:14 +0000 (14:24 -0700)]
glsl: fix link failure for variable-indexed varying output arrays

If the vertex shader writes to a varying array with a variable index,
mark all the elements of that array as being written.

For example, if the vertex shader does:

   for (i = 0; i < 4; i++)
      gl_TexCoord[i] = expr;

Mark all texcoord outputs as being written, not just the first.

Linking will fail if a fragment shader tries to read an input that's not
written by the vertex shader.  Before this fix, this linker test could fail.

15 years agoswrast: Set vp_override flag during DrawPixels
Nicolai Haehnle [Sun, 15 Feb 2009 12:34:43 +0000 (13:34 +0100)]
swrast: Set vp_override flag during DrawPixels

Obviously, the color of fragments produced by DrawPixels is not constant,
even if the current vertex array / vertex program state indicates that the
color for normal rendering will be constant. Therefore, we need to override
certain optimisations that have been added to texenvprogram.c

Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com>
15 years agomesa: improved error msg
Brian Paul [Wed, 18 Feb 2009 20:28:12 +0000 (13:28 -0700)]
mesa: improved error msg

15 years agomesa: increase MAX_UNIFORMS to 1024 (of vec4 type)
Brian Paul [Wed, 18 Feb 2009 18:47:40 +0000 (11:47 -0700)]
mesa: increase MAX_UNIFORMS to 1024 (of vec4 type)

Old limit was 256.  Note that no arrays are declared to this size.
The only place we have to be careful about raising this limit is the
prog_src/dst_register Index bitfields.  These have been bumped up too.

Added assertions to check we don't exceed the bitfield in the future too.

15 years agoglsl: fix a swizzle-related regression
Brian Paul [Wed, 18 Feb 2009 18:06:57 +0000 (11:06 -0700)]
glsl: fix a swizzle-related regression

This new issue was exposed by commit 6eabfc27f19a10dfc2663e99f9560966ba1ff697

15 years agoprogs/trivial: Label program windows with actual program name
Keith Whitwell [Wed, 18 Feb 2009 18:20:50 +0000 (18:20 +0000)]
progs/trivial:  Label program windows with actual program name

Each of these programs previously called itself "First Tri" which was a
little confusing.  Could have left one as "First Tri", but the trouble
then is that people would still clone that file & we'd end up with
another thousand first tri apps...

15 years agogallium: Also disable i965simple for scons
Jakob Bornecrantz [Wed, 18 Feb 2009 17:12:18 +0000 (17:12 +0000)]
gallium: Also disable i965simple for scons

Please read previous commit for more info.

15 years agogallium: Disable i965simple pipe driver after it was broken
Jakob Bornecrantz [Wed, 18 Feb 2009 16:58:24 +0000 (16:58 +0000)]
gallium: Disable i965simple pipe driver after it was broken

It is only the i965simple pipe driver that was broken
in the gallium-texture-transfere merge that is being
disabled, mothing more nothing less.

FYI, there never where working i965 hardware support
in gallium anyways.

15 years agogallium: Fix up trace driver for introduction of struct pipe_transfer.
Michel Dänzer [Wed, 18 Feb 2009 17:13:44 +0000 (18:13 +0100)]
gallium: Fix up trace driver for introduction of struct pipe_transfer.

15 years agogallium: Add pipe_transfer_reference().
Michel Dänzer [Wed, 18 Feb 2009 17:12:31 +0000 (18:12 +0100)]
gallium: Add pipe_transfer_reference().

15 years agoMerge branch 'gallium-texture-transfer'
Michel Dänzer [Wed, 18 Feb 2009 15:43:02 +0000 (16:43 +0100)]
Merge branch 'gallium-texture-transfer'

Conflicts:
src/gallium/drivers/softpipe/sp_tile_cache.c

15 years agoMerge commit 'origin/gallium-0.1'
Keith Whitwell [Wed, 18 Feb 2009 15:14:39 +0000 (15:14 +0000)]
Merge commit 'origin/gallium-0.1'

Conflicts:

src/gallium/auxiliary/draw/draw_vs_aos.c

15 years agor300-gallium: Factor out common functionality in vbuf emit.
Corbin Simpson [Wed, 18 Feb 2009 14:38:21 +0000 (06:38 -0800)]
r300-gallium: Factor out common functionality in vbuf emit.

15 years agoi915simple: Minimal fixup for introduction of struct pipe_transfer.
Michel Dänzer [Wed, 18 Feb 2009 12:14:02 +0000 (13:14 +0100)]
i915simple: Minimal fixup for introduction of struct pipe_transfer.

15 years agodraw: Reuse xmm registers.
Keith Whitwell [Tue, 17 Feb 2009 21:45:54 +0000 (21:45 +0000)]
draw: Reuse xmm registers.

15 years agogallium: fix merge
Keith Whitwell [Mon, 16 Feb 2009 20:19:40 +0000 (20:19 +0000)]
gallium: fix merge

It looks like I resolved the merge conflicts but did not save my emacs
buffers before committing...

15 years agoMerge branch 'master' into gallium-texture-transfer
Keith Whitwell [Mon, 16 Feb 2009 19:50:48 +0000 (19:50 +0000)]
Merge branch 'master' into gallium-texture-transfer

Conflicts:

src/mesa/state_tracker/st_cb_accum.c
src/mesa/state_tracker/st_cb_drawpixels.c

15 years agomesa: remove old comments
Brian Paul [Mon, 16 Feb 2009 18:50:05 +0000 (11:50 -0700)]
mesa: remove old comments

Note: the default value for EmitCondCodes is FALSE.  This means the GLSL
compiler will emit code like this:

SEQ TEMP[0].x, A, B;
IF TEMP[0].x;
   ...
ENDIF

But if EmitCondCodes is TRUE, condition codes will be used instead:

SEQ.C TEMP[0].x, A, B;
IF (NE.xxxx);
   ...
ENDIF

15 years agoi965: tell GLSL compiler to emit code using condition codes
Brian Paul [Mon, 16 Feb 2009 18:45:57 +0000 (11:45 -0700)]
i965: tell GLSL compiler to emit code using condition codes

The default for EmitCondCodes got flipped when gallium-0.2 was merged.
This fixes GLSL if/else/endif regressions.
Drivers that use GLSL should always explicitly set the flag to be safe.

15 years agonouveau: oops :-)
Patrice Mandin [Mon, 16 Feb 2009 17:43:56 +0000 (18:43 +0100)]
nouveau: oops :-)

15 years agoautoconf: Always enable glew
Dan Nicholson [Mon, 16 Feb 2009 17:28:35 +0000 (09:28 -0800)]
autoconf: Always enable glew

Maybe this should turn into an option (--disable-glew), but for now just
enable glew all the time.

15 years agoglsl: silence some uninit var warnings
Brian Paul [Mon, 16 Feb 2009 15:25:57 +0000 (08:25 -0700)]
glsl: silence some uninit var warnings

15 years agocell: use some SPU intrinsics to get slightly better code in eval_inputs()
Brian Paul [Mon, 16 Feb 2009 15:25:33 +0000 (08:25 -0700)]
cell: use some SPU intrinsics to get slightly better code in eval_inputs()

Suggested by Jonathan Adamczewski.  There may be more places to do this...

15 years agor300-gallium: Add verbosity level to debugging.
Corbin Simpson [Mon, 16 Feb 2009 11:56:03 +0000 (03:56 -0800)]
r300-gallium: Add verbosity level to debugging.

Makes it a bit more manageable to read through the console logs.

15 years agor300-gallium: Fix BEGIN_CS and END_CS counting and mismatch.
Corbin Simpson [Mon, 16 Feb 2009 11:55:16 +0000 (03:55 -0800)]
r300-gallium: Fix BEGIN_CS and END_CS counting and mismatch.

15 years agor300-gallium: Set up draw rasterizer.
Corbin Simpson [Mon, 16 Feb 2009 11:33:56 +0000 (03:33 -0800)]
r300-gallium: Set up draw rasterizer.

15 years agodemos: fix glxpixmap and call glXWaitGL before calling XCopyArea.
Alan Hourihane [Mon, 16 Feb 2009 11:54:58 +0000 (11:54 +0000)]
demos: fix glxpixmap and call glXWaitGL before calling XCopyArea.

15 years agodri2: support glXWaitX & glXWaitGL by using fake front buffer.
Alan Hourihane [Mon, 16 Feb 2009 11:44:40 +0000 (11:44 +0000)]
dri2: support glXWaitX & glXWaitGL by using fake front buffer.

15 years agor300-gallium: Ooops, forgot to apply this stash.
Corbin Simpson [Mon, 16 Feb 2009 11:13:16 +0000 (03:13 -0800)]
r300-gallium: Ooops, forgot to apply this stash.

"git stash": The cause of, and solution to, all my problems.

15 years agor300-gallium: Include-guard r300_emit.h
Corbin Simpson [Mon, 16 Feb 2009 11:03:28 +0000 (03:03 -0800)]
r300-gallium: Include-guard r300_emit.h

15 years agor300-gallium: Add draw_arrays and friends.
Corbin Simpson [Mon, 16 Feb 2009 10:53:34 +0000 (02:53 -0800)]
r300-gallium: Add draw_arrays and friends.

This is the last bit of Gallium-side plumbing for drawing things.
From this point on, the only missing parts should be in r3xx-specific
code areas...

15 years agor300-gallium: Add SC_CLIP_RULE to clear.
Corbin Simpson [Mon, 16 Feb 2009 10:52:47 +0000 (02:52 -0800)]
r300-gallium: Add SC_CLIP_RULE to clear.

This is a register that is in r300_demo but not r300_surface, so adding it in
to see if it helps.

15 years agocell: minor Makefile clean-up
Brian Paul [Sun, 15 Feb 2009 19:08:47 +0000 (12:08 -0700)]
cell: minor Makefile clean-up

15 years agocell: new/tighter code for computing fragment program inputs
Brian Paul [Sun, 15 Feb 2009 19:08:02 +0000 (12:08 -0700)]
cell: new/tighter code for computing fragment program inputs

15 years agocell: combine eval_z(), eval_w() functions
Brian Paul [Sun, 15 Feb 2009 16:25:22 +0000 (09:25 -0700)]
cell: combine eval_z(), eval_w() functions

15 years agor300-gallium: Fix scissors.
Corbin Simpson [Sat, 14 Feb 2009 23:24:44 +0000 (15:24 -0800)]
r300-gallium: Fix scissors.

Don't use SCISSORS_OFFSET since we're DRI2,
and don't forget to set scissors in clear.

15 years agor300-gallium: Grab bag of goodies.
Corbin Simpson [Sat, 14 Feb 2009 12:41:29 +0000 (04:41 -0800)]
r300-gallium: Grab bag of goodies.

Some fixes from glisse, moar swtcl emit setup, cleanup a bunch of regs,
properly do clear flush, and BEGIN_CS count fixes.

15 years agor300-gallium: Clean up some clear registers.
Corbin Simpson [Sat, 14 Feb 2009 12:11:27 +0000 (04:11 -0800)]
r300-gallium: Clean up some clear registers.

15 years agor300-gallium: Use fui instead of a roll-my-own.
Corbin Simpson [Sat, 14 Feb 2009 11:23:50 +0000 (03:23 -0800)]
r300-gallium: Use fui instead of a roll-my-own.

Man, util/u_math just gets better by the day.

15 years agor300: Redirect constant TEX coordinates
Nicolai Haehnle [Sat, 14 Feb 2009 16:06:06 +0000 (17:06 +0100)]
r300: Redirect constant TEX coordinates

R3xx/R5xx fragment program texture constants must come from a hardware
register instead of the constant file, so we redirect if necessary during
the native rewrite phase.

The symptoms of this bug started appearing when the Mesa fixed function
texenvprogram code started using STATE_CURRENT_ATTRIB constants for
texture coordinates when the corresponding attributes were constant across
all vertices.

Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com>
15 years agoradeon-gallium: Clean out extensions explicitly enabled by Mesa.
Corbin Simpson [Sat, 14 Feb 2009 10:40:33 +0000 (02:40 -0800)]
radeon-gallium: Clean out extensions explicitly enabled by Mesa.

This cleans up some of the cruft from the old DRI setup, and
it turns out that only the GLSL extensions are still off if we
let st_extensions.c handle the setup instead.

15 years agor300-gallium: Update r300_screen comments and add a few formats.
Corbin Simpson [Sat, 14 Feb 2009 10:24:30 +0000 (02:24 -0800)]
r300-gallium: Update r300_screen comments and add a few formats.

15 years agor300-gallium: Enable all four colorbuffer render targets.
Corbin Simpson [Sat, 14 Feb 2009 10:07:29 +0000 (02:07 -0800)]
r300-gallium: Enable all four colorbuffer render targets.

As far as I can tell all the state emission necessary has been set up.
Well, except for the fragment shader, but c'mon, gimme a break. :3

15 years agor300-gallium: Add Z/stencil buffer format emit.
Corbin Simpson [Sat, 14 Feb 2009 10:06:17 +0000 (02:06 -0800)]
r300-gallium: Add Z/stencil buffer format emit.

Also set BEGIN_CS correctly.

15 years agor300-gallium: Emit Z/stencil buffer offset.
Corbin Simpson [Sat, 14 Feb 2009 09:55:38 +0000 (01:55 -0800)]
r300-gallium: Emit Z/stencil buffer offset.

15 years agor300-gallium: Add derived state for vertex formats.
Corbin Simpson [Sat, 14 Feb 2009 07:20:43 +0000 (23:20 -0800)]
r300-gallium: Add derived state for vertex formats.

Next up: The evil RS block.

15 years agoi965: rewrite the code for handling shader subroutine calls
Brian Paul [Sat, 14 Feb 2009 00:17:52 +0000 (17:17 -0700)]
i965: rewrite the code for handling shader subroutine calls

Previously, the prog_instruction::Data field was used to map original Mesa
instructions to brw instructions in order to resolve subroutine calls.  This
was a rather tangled mess.  Plus it's an obstacle to implementing dynamic
allocation/growing of the instruction buffer (it's still a fixed size).

Mesa's GLSL compiler emits a label for each subroutine and CAL instruction.
Now we use those labels to patch the subroutine calls after code generation
has been done.  We just keep a list of all CAL instructions that needs patching
and a list of all subroutine labels.  It's a simple matter to resolve them.

This also consolidates some redundant post-emit code between brw_vs_emit.c and
brw_wm_glsl.c and removes some loops that cleared the prog_instruction::Data
fields at the end.

Plus, a bunch of new comments.

15 years agoi965: add missing break for OPCODE_RET case
Brian Paul [Fri, 13 Feb 2009 23:56:25 +0000 (16:56 -0700)]
i965: add missing break for OPCODE_RET case

This doesn't effect correctness, but we were emitting an extraneous ADD.

15 years agoi965: the return value of translate_insn() is never used. Make it void.
Brian Paul [Thu, 12 Feb 2009 23:03:39 +0000 (16:03 -0700)]
i965: the return value of translate_insn() is never used.  Make it void.

15 years agoi965: minor clean-ups
Brian Paul [Thu, 12 Feb 2009 22:40:04 +0000 (15:40 -0700)]
i965: minor clean-ups

15 years agoi965: code clean-ups, comments, and minor refactoring
Brian Paul [Thu, 12 Feb 2009 22:35:41 +0000 (15:35 -0700)]
i965: code clean-ups, comments, and minor refactoring

15 years agoi965: updated comments
Brian Paul [Thu, 12 Feb 2009 22:35:02 +0000 (15:35 -0700)]
i965: updated comments

15 years agointel: turn on GL_ARB_shading_language_120
Brian Paul [Thu, 12 Feb 2009 22:04:21 +0000 (15:04 -0700)]
intel: turn on GL_ARB_shading_language_120

It's done in the Mesa GLSL compiler.  The only part of it that might
matter in drivers is the centroid sampling option for MSAA.

15 years agoi965: more reformatting/clean-up
Brian Paul [Thu, 12 Feb 2009 21:58:19 +0000 (14:58 -0700)]
i965: more reformatting/clean-up

15 years agoi965: s/__inline/INLINE/
Brian Paul [Thu, 12 Feb 2009 21:54:13 +0000 (14:54 -0700)]
i965: s/__inline/INLINE/