mesa.git
14 years agor300/compiler: use null-terminated array of transformation functions
Marek Olšák [Tue, 31 Aug 2010 23:10:26 +0000 (01:10 +0200)]
r300/compiler: use null-terminated array of transformation functions

I need to reduce the number of parameters of each compiler pass function.
This is part of a larger cleanup.

14 years agor300g: only check for an empty shader if there are no compile errors
Marek Olšák [Tue, 31 Aug 2010 22:59:52 +0000 (00:59 +0200)]
r300g: only check for an empty shader if there are no compile errors

14 years agor300/compiler: add new compiler parameter max_alu_insts
Marek Olšák [Tue, 31 Aug 2010 22:56:57 +0000 (00:56 +0200)]
r300/compiler: add new compiler parameter max_alu_insts

14 years agor300/compiler: put emulate_loop_state in radeon_compiler
Marek Olšák [Tue, 31 Aug 2010 18:51:37 +0000 (20:51 +0200)]
r300/compiler: put emulate_loop_state in radeon_compiler

14 years agoir_reader: Run ir_validate on the generated IR.
Kenneth Graunke [Sat, 4 Sep 2010 08:09:43 +0000 (01:09 -0700)]
ir_reader: Run ir_validate on the generated IR.

It's just too easy to get something wrong in hand-written IR.

14 years agoir_reader: Emit global variables at the top of the instruction list.
Kenneth Graunke [Sat, 4 Sep 2010 08:55:55 +0000 (01:55 -0700)]
ir_reader: Emit global variables at the top of the instruction list.

Since functions are emitted when scanning for prototypes, functions
always come first, even if the original IR listed the variable
declarations first.

Fixes an ir_validate error (to be turned on in the next commit).

14 years agoir_reader: Drop support for reading the old assignment format.
Kenneth Graunke [Fri, 3 Sep 2010 23:14:40 +0000 (16:14 -0700)]
ir_reader: Drop support for reading the old assignment format.

14 years agoglsl: Regenerate autogenerated file builtin_function.cpp.
Kenneth Graunke [Fri, 3 Sep 2010 23:21:08 +0000 (16:21 -0700)]
glsl: Regenerate autogenerated file builtin_function.cpp.

14 years agoglsl/builtins: Convert assignments to new format (with write mask).
Kenneth Graunke [Fri, 3 Sep 2010 23:10:57 +0000 (16:10 -0700)]
glsl/builtins: Convert assignments to new format (with write mask).

14 years agoir_reader: Read the new assignment format (with write mask).
Kenneth Graunke [Fri, 3 Sep 2010 06:54:40 +0000 (23:54 -0700)]
ir_reader: Read the new assignment format (with write mask).

This preserves the ability to read the old format, for momentary
compatibility with all the existing IR implementations of built-ins.

14 years agoir_reader: Track the current function and report it in error messages.
Kenneth Graunke [Sat, 4 Sep 2010 08:05:51 +0000 (01:05 -0700)]
ir_reader: Track the current function and report it in error messages.

14 years agoglsl/builtins: Actually print the info log if reading a builtin failed.
Kenneth Graunke [Sat, 4 Sep 2010 07:49:23 +0000 (00:49 -0700)]
glsl/builtins: Actually print the info log if reading a builtin failed.

14 years agonvfx: consolidate tiny files
Luca Barbieri [Sat, 4 Sep 2010 03:30:27 +0000 (05:30 +0200)]
nvfx: consolidate tiny files

We probably want to reorganize the remaining files too, but that's
for later, maybe.

14 years agomesa/st: add missing _mesa_set_fetch_functions in st_get_tex_image
Luca Barbieri [Sat, 4 Sep 2010 03:13:06 +0000 (05:13 +0200)]
mesa/st: add missing _mesa_set_fetch_functions in st_get_tex_image

Fixes piglit fdo25614-genmipmap.

14 years agonvfx: fix vp DP2
Luca Barbieri [Sat, 4 Sep 2010 02:43:02 +0000 (04:43 +0200)]
nvfx: fix vp DP2

14 years agonvfx: implement fp SSG properly
Luca Barbieri [Sat, 4 Sep 2010 02:17:16 +0000 (04:17 +0200)]
nvfx: implement fp SSG properly

14 years agonvfx: don't claim we support preds since the driver doesn't
Luca Barbieri [Sat, 4 Sep 2010 01:40:49 +0000 (03:40 +0200)]
nvfx: don't claim we support preds since the driver doesn't

14 years agonv40: support all 10 texcoords
Luca Barbieri [Sat, 4 Sep 2010 01:35:22 +0000 (03:35 +0200)]
nv40: support all 10 texcoords

14 years agonvfx: add missing context init
Luca Barbieri [Sat, 4 Sep 2010 01:05:28 +0000 (03:05 +0200)]
nvfx: add missing context init

14 years agonvfx: tidy up state_emit
Luca Barbieri [Sat, 4 Sep 2010 01:05:22 +0000 (03:05 +0200)]
nvfx: tidy up state_emit

14 years agonvfx: support all coord conventions in hardware
Luca Barbieri [Sat, 4 Sep 2010 00:57:14 +0000 (02:57 +0200)]
nvfx: support all coord conventions in hardware

14 years agonvfx: add missing pushbuffer space check
Luca Barbieri [Sat, 4 Sep 2010 00:37:41 +0000 (02:37 +0200)]
nvfx: add missing pushbuffer space check

14 years agonvfx: support all possible vs consts
Luca Barbieri [Sat, 4 Sep 2010 00:26:37 +0000 (02:26 +0200)]
nvfx: support all possible vs consts

We were incorrectly setting a register that limited the range of
constants accessible via indirect addressing.

Setting it correctly, we can address all the constants the GPU
supports.

14 years agonvfx: set magic bit to round NPOT mipmap sizes down and not up
Luca Barbieri [Sat, 4 Sep 2010 00:05:14 +0000 (02:05 +0200)]
nvfx: set magic bit to round NPOT mipmap sizes down and not up

Does any API even use rounding-up?

14 years agonvfx: allow nested blitter usage, fixing bug in clear
Luca Barbieri [Fri, 3 Sep 2010 21:27:49 +0000 (23:27 +0200)]
nvfx: allow nested blitter usage, fixing bug in clear

14 years agogalahad: do map/unmap counting for resources
Brian Paul [Fri, 3 Sep 2010 22:35:07 +0000 (16:35 -0600)]
galahad: do map/unmap counting for resources

14 years agolibgl-xlib: enable galahad support
Brian Paul [Fri, 3 Sep 2010 22:33:17 +0000 (16:33 -0600)]
libgl-xlib: enable galahad support

If the GALLIUM_GALAHAD env var is 1 we'll wrap the regular driver with
the galahad validation driver.

14 years agoscons: added galahad to driver list
Brian Paul [Fri, 3 Sep 2010 22:25:44 +0000 (16:25 -0600)]
scons: added galahad to driver list

14 years agomesa: also build galahad driver
Brian Paul [Fri, 3 Sep 2010 21:57:48 +0000 (15:57 -0600)]
mesa: also build galahad driver

14 years agoexec_list: replace class with struct
Brian Paul [Fri, 3 Sep 2010 21:25:50 +0000 (15:25 -0600)]
exec_list: replace class with struct

To match the definition below.

14 years agomesa: fix up a comment
Brian Paul [Fri, 3 Sep 2010 20:39:43 +0000 (14:39 -0600)]
mesa: fix up a comment

14 years agost/glx: added some comments
Brian Paul [Thu, 2 Sep 2010 20:11:53 +0000 (14:11 -0600)]
st/glx: added some comments

14 years agonvfx: implement LIT in fp
Luca Barbieri [Fri, 3 Sep 2010 20:06:41 +0000 (22:06 +0200)]
nvfx: implement LIT in fp

14 years agoglsl2: Use as_constant some places instead of constant_expression_value
Ian Romanick [Thu, 2 Sep 2010 21:53:17 +0000 (14:53 -0700)]
glsl2: Use as_constant some places instead of constant_expression_value

The places where constant_expression_value are still used in loop
analysis are places where a new expression tree is created and
constant folding won't have happened.  This is used, for example, when
we try to determine the maximal loop iteration count.

Based on review comments by Eric.  "...rely on constant folding to
have done its job, instead of going all through the subtree again when
it wasn't a constant."

14 years agoglsl2: Allow copy / constant propagation into array indices
Ian Romanick [Fri, 27 Aug 2010 23:22:36 +0000 (16:22 -0700)]
glsl2: Allow copy / constant propagation into array indices

14 years agoglsl2: Add module to perform simple loop unrolling
Ian Romanick [Fri, 27 Aug 2010 20:59:49 +0000 (13:59 -0700)]
glsl2: Add module to perform simple loop unrolling

14 years agoglsl2: Track the number of ir_loop_jump instructions that are in a loop
Ian Romanick [Fri, 27 Aug 2010 22:41:20 +0000 (15:41 -0700)]
glsl2: Track the number of ir_loop_jump instructions that are in a loop

14 years agoir_expression: Add static operator_string method
Ian Romanick [Fri, 27 Aug 2010 20:53:25 +0000 (13:53 -0700)]
ir_expression: Add static operator_string method

I've used this in quite a few debug commits that never reached an
up-stream tree.

14 years agoexec_node: Add insert_before that inserts an entire list
Ian Romanick [Fri, 27 Aug 2010 20:53:56 +0000 (13:53 -0700)]
exec_node: Add insert_before that inserts an entire list

14 years agoglsl2: Eliminate zero-iteration loops
Ian Romanick [Fri, 27 Aug 2010 18:26:08 +0000 (11:26 -0700)]
glsl2: Eliminate zero-iteration loops

14 years agoglsl2: Perform initial bits of loop analysis during compilation
Ian Romanick [Thu, 26 Aug 2010 23:45:22 +0000 (16:45 -0700)]
glsl2: Perform initial bits of loop analysis during compilation

14 years agoglsl2: Add module to suss out loop control variables from loop analysis data
Ian Romanick [Thu, 26 Aug 2010 23:43:57 +0000 (16:43 -0700)]
glsl2: Add module to suss out loop control variables from loop analysis data

This is the next step on the road to loop unrolling

14 years agoglsl2: Add module to analyze variables used in loops
Ian Romanick [Thu, 26 Aug 2010 22:58:33 +0000 (15:58 -0700)]
glsl2: Add module to analyze variables used in loops

This is the first step eventually leading to loop unrolling.

14 years agoir_to_mesa: Handle loops with loop controls set
Ian Romanick [Thu, 26 Aug 2010 22:49:33 +0000 (15:49 -0700)]
ir_to_mesa: Handle loops with loop controls set

The downside of our talloc usage is that we can't really make static
(i.e., not created with new) instances of our IR types.  This leads to
a lot of unnecessary dynamic allocation in this patch.

14 years agoir_validate: Validate loop control fields in ir_loop
Ian Romanick [Thu, 26 Aug 2010 22:22:06 +0000 (15:22 -0700)]
ir_validate: Validate loop control fields in ir_loop

14 years agoglsl2: Add cmp field to ir_loop
Ian Romanick [Thu, 26 Aug 2010 22:11:26 +0000 (15:11 -0700)]
glsl2: Add cmp field to ir_loop

This reprents the type of comparison between the loop induction
variable and the loop termination value.

14 years agoglsl2: Set a flag when visiting the assignee of an assignment
Ian Romanick [Thu, 5 Aug 2010 22:29:24 +0000 (15:29 -0700)]
glsl2: Set a flag when visiting the assignee of an assignment

14 years agoexec_list: Add pop_head
Ian Romanick [Tue, 17 Aug 2010 01:02:11 +0000 (18:02 -0700)]
exec_list: Add pop_head

14 years agoir_print_visitor: Print empty else blocks more compactly
Ian Romanick [Thu, 12 Aug 2010 21:55:48 +0000 (14:55 -0700)]
ir_print_visitor: Print empty else blocks more compactly

14 years agonvfx: fix division by zero in vp-ignore-input
Luca Barbieri [Fri, 3 Sep 2010 18:57:44 +0000 (20:57 +0200)]
nvfx: fix division by zero in vp-ignore-input

14 years agonvfx: report correct max lodbias
Luca Barbieri [Fri, 3 Sep 2010 18:54:48 +0000 (20:54 +0200)]
nvfx: report correct max lodbias

Fixes piglit lodbias

14 years agonvfx: remove message
Luca Barbieri [Fri, 3 Sep 2010 18:36:29 +0000 (20:36 +0200)]
nvfx: remove message

14 years agonvfx: support indirect addressing in vps
Luca Barbieri [Fri, 3 Sep 2010 16:31:18 +0000 (18:31 +0200)]
nvfx: support indirect addressing in vps

Negative or huge offsets not yet supported.

14 years agor600c: add proper returns for some evergreen functions
Alex Deucher [Fri, 3 Sep 2010 16:13:47 +0000 (12:13 -0400)]
r600c: add proper returns for some evergreen functions

these weren't checked anyway.

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

14 years agonvfx: fix support for more than 8 texture units (fixes etqw crash)
Luca Barbieri [Fri, 3 Sep 2010 13:44:27 +0000 (15:44 +0200)]
nvfx: fix support for more than 8 texture units (fixes etqw crash)

14 years agor600g: fix segfault in state after rework
Dave Airlie [Fri, 3 Sep 2010 09:37:52 +0000 (19:37 +1000)]
r600g: fix segfault in state after rework

probably can improve this a bit.

14 years agor600c: emit DB_HTILE_DATA_BASE on evergreen
Alex Deucher [Fri, 3 Sep 2010 05:13:41 +0000 (01:13 -0400)]
r600c: emit DB_HTILE_DATA_BASE on evergreen

Make the hw happy.

14 years agor600g: refactor sample states into a reusable struct.
Dave Airlie [Fri, 3 Sep 2010 04:12:38 +0000 (14:12 +1000)]
r600g: refactor sample states into a reusable struct.

I will not cut-n-paste.
I will not cut-n-paste.
I will not cut-n-paste.

14 years agor600g: reduce size of r600 context structure to !insane
Dave Airlie [Fri, 3 Sep 2010 03:53:39 +0000 (13:53 +1000)]
r600g: reduce size of r600 context structure to !insane

Its now about 7.8k, and might actually fit in a cache.

14 years agor600g: add texture border state.
Dave Airlie [Fri, 3 Sep 2010 03:07:40 +0000 (13:07 +1000)]
r600g: add texture border state.

Okay I finally wrapped my head around what r600_context_state is meant to be,
maybe I should just rename all the structs so that have distinct names.

I've no idea however why 16 is a good magic number for R600_MAX_RSTATE.

14 years agor600g: deref old driver states for set entry points.
Dave Airlie [Fri, 3 Sep 2010 02:01:59 +0000 (12:01 +1000)]
r600g: deref old driver states for set entry points.

14 years agor600g: drop r600_bind_state.
Dave Airlie [Fri, 3 Sep 2010 01:55:36 +0000 (11:55 +1000)]
r600g: drop r600_bind_state.

This was another ugly function that really wasn't needed.

The 3 calls to it from the gallium api were shorter than it,
and all the calls from the set_ functions were pointless.

14 years agor600g: kill r600_context_state function
Dave Airlie [Fri, 3 Sep 2010 01:35:08 +0000 (11:35 +1000)]
r600g: kill r600_context_state function

having some sort of locality of code really matters, just create
and setup state at time. Not sure if this is just further polishing of a bad thing,
but at least it makes it more readable.

14 years agor600g: move lots of state inline helpers to separate header.
Dave Airlie [Fri, 3 Sep 2010 00:55:02 +0000 (10:55 +1000)]
r600g: move lots of state inline helpers to separate header.

this gets them out of sight of the main codeflow.

14 years agodraw: Include missing headers in draw_vs_aos.h.
Vinson Lee [Fri, 3 Sep 2010 00:00:53 +0000 (17:00 -0700)]
draw: Include missing headers in draw_vs_aos.h.

Include tgsi_exec.h for TGSI_EXEC_NUM_TEMPS.
Include draw_vs.h for draw_vs_varient.

14 years agor600g: drop magic numbers in depth state.
Dave Airlie [Thu, 2 Sep 2010 23:39:04 +0000 (09:39 +1000)]
r600g: drop magic numbers in depth state.

this also fixes occulsion queries.

14 years agoutil: Include missing header in u_linear.h.
Vinson Lee [Thu, 2 Sep 2010 23:30:34 +0000 (16:30 -0700)]
util: Include missing header in u_linear.h.

Include p_compiler.h for size_t and boolean symbols.

14 years agomesa: Fix printf-like warning.
Vinson Lee [Thu, 2 Sep 2010 23:12:58 +0000 (16:12 -0700)]
mesa: Fix printf-like warning.

14 years agomesa: Fix printf-like warnings.
Vinson Lee [Thu, 2 Sep 2010 23:03:32 +0000 (16:03 -0700)]
mesa: Fix printf-like warnings.

14 years agor600g: force unbind of previously bind sampler/sampler_view
Jerome Glisse [Thu, 2 Sep 2010 20:53:33 +0000 (16:53 -0400)]
r600g: force unbind of previously bind sampler/sampler_view

Previously bind sampler/sampler_view can be converted and endup
overwritting the current state we want to schedule. Example :
bind texA texB to sampler_view[0] & sampler_view[1], render,
bind texB to sampler_view[0] render. Now state associated to
texB are set to configure sampler_view slot 0, but as we don't
unbind sampler_view[1] still point to texB state so we end up
with sampler_view[1] overwritting sampler_view[0], which gives
wrong rendering if next rendering bind texA to sampler_view[0],
it will endup as texB is bound to sampler_view[0]. If you are
not confuse at that point give me a call i will be buying you
beer.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agost/mesa: clamp gl_constants::MaxVarying against MAX_VARYING
Brian Paul [Thu, 2 Sep 2010 18:58:58 +0000 (12:58 -0600)]
st/mesa: clamp gl_constants::MaxVarying against MAX_VARYING

Don't try to use more generic varying vars than core Mesa supports.
Fixes fd.o bug 29959.

14 years agoglsl2: Update TODO file
Ian Romanick [Thu, 2 Sep 2010 17:11:54 +0000 (10:11 -0700)]
glsl2: Update TODO file

14 years agor600g: fix memory/bo leak
Jerome Glisse [Thu, 2 Sep 2010 15:32:32 +0000 (11:32 -0400)]
r600g: fix memory/bo leak

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agomesa: fix code generation for ir_unop_sqrt
Brian Paul [Thu, 2 Sep 2010 13:58:28 +0000 (07:58 -0600)]
mesa: fix code generation for ir_unop_sqrt

The CMP instruction needed to be flipped to properly handle
operand==0.

Fixes fd.o bug 29923.

14 years agomesa: fix some printf warnings with casts
Brian Paul [Thu, 2 Sep 2010 13:57:16 +0000 (07:57 -0600)]
mesa: fix some printf warnings with casts

14 years agor600g: fix thinko in shadow code.
Dave Airlie [Thu, 2 Sep 2010 11:25:42 +0000 (21:25 +1000)]
r600g: fix thinko in shadow code.

spotted by taiu on irc

14 years agor600g: fix logicop, the 3d ROP is the 2D rop shifted twice.
Dave Airlie [Thu, 2 Sep 2010 06:39:32 +0000 (16:39 +1000)]
r600g: fix logicop, the 3d ROP is the 2D rop shifted twice.

14 years agor600g: fix depth texture tests
Dave Airlie [Thu, 2 Sep 2010 05:51:23 +0000 (15:51 +1000)]
r600g: fix depth texture tests

14 years agoglsl: Apply implicit conversions to structure constructor parameters.
Kenneth Graunke [Thu, 2 Sep 2010 03:03:17 +0000 (20:03 -0700)]
glsl: Apply implicit conversions to structure constructor parameters.

The code for handling implicit conversions should probably get
refactored, but for now, this is easy.

Fixes piglit test constructor-26.vert.

14 years agoglsl: Convert constant record constructor parameters to ir_constants.
Kenneth Graunke [Thu, 2 Sep 2010 02:54:27 +0000 (19:54 -0700)]
glsl: Convert constant record constructor parameters to ir_constants.

I'm not sure if this is strictly necessary, but it seems wise.

14 years agoglsl: Reject structure constructors that have too many arguments.
Kenneth Graunke [Thu, 2 Sep 2010 02:44:25 +0000 (19:44 -0700)]
glsl: Reject structure constructors that have too many arguments.

Fixes piglit test constructor-27.vert.

14 years agoglsl2: Remove unnecessary glsl_symbol_table::get_function parameter return_constructors
Ian Romanick [Wed, 1 Sep 2010 21:16:53 +0000 (14:16 -0700)]
glsl2: Remove unnecessary glsl_symbol_table::get_function parameter return_constructors

Now that constructors are not generated as functions or stored in the
symbol table, there is no need to flag whether or not constructors
should be returned.

14 years agoglsl2: Remove unused method glsl_type::generate_constructor
Ian Romanick [Wed, 1 Sep 2010 21:12:24 +0000 (14:12 -0700)]
glsl2: Remove unused method glsl_type::generate_constructor

14 years agoglsl2: Remove unused 'constructor' parameter from glsl_symbol_table::add_type
Ian Romanick [Wed, 1 Sep 2010 21:10:39 +0000 (14:10 -0700)]
glsl2: Remove unused 'constructor' parameter from glsl_symbol_table::add_type

14 years agoglsl2: Don't generate constructor functions for structures
Ian Romanick [Wed, 1 Sep 2010 21:08:08 +0000 (14:08 -0700)]
glsl2: Don't generate constructor functions for structures

14 years agoglsl2: Emit structure constructors inline
Ian Romanick [Wed, 1 Sep 2010 20:46:04 +0000 (13:46 -0700)]
glsl2: Emit structure constructors inline

Fixes piglit test cases glsl-[fv]s-all-0[12].

14 years agor600g: add missing vertex fetch formats to the translation table.
Dave Airlie [Thu, 2 Sep 2010 03:32:25 +0000 (13:32 +1000)]
r600g: add missing vertex fetch formats to the translation table.

fixes at least 2 more piglits.

14 years agor600g: fix binding of same texture to several target slot
Jerome Glisse [Thu, 2 Sep 2010 01:57:43 +0000 (21:57 -0400)]
r600g: fix binding of same texture to several target slot

One can bind same texture or sampler to different slot,
each slot needs it own state. The solution implemented
here is not exactly beautifull or optimal need to think
to somethings better.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agoglsl: Fix write mask in matrix-from-matrix constructors.
Kenneth Graunke [Wed, 1 Sep 2010 23:10:01 +0000 (16:10 -0700)]
glsl: Fix write mask in matrix-from-matrix constructors.

If the matrix being constructed was larger than the source matrix, it
would overwrite the lower-right part of the matrix with the wrong
values, rather than leaving it as the identity matrix.

For example, constructing a mat4 from a mat2 should only use a writemask
of "xy" when copying from the source, but was using "xyzw".

Fixes the code generated by piglit test constructor-23.vert.

14 years agoglsl: Add proper handling for constant matrix-from-matrix constructors.
Kenneth Graunke [Wed, 1 Sep 2010 22:37:13 +0000 (15:37 -0700)]
glsl: Add proper handling for constant matrix-from-matrix constructors.

Fixes piglit test case constructor-21.vert and changes
constructor-22.vert to give the correct output.

14 years agoglsl: Move generate_constructor_(matrix|vector) to ir_constant ctor.
Kenneth Graunke [Wed, 1 Sep 2010 22:31:06 +0000 (15:31 -0700)]
glsl: Move generate_constructor_(matrix|vector) to ir_constant ctor.

14 years agoast_function: Fix check for "too few components".
Kenneth Graunke [Wed, 1 Sep 2010 22:04:57 +0000 (15:04 -0700)]
ast_function: Fix check for "too few components".

This was triggering even for matrix-from-matrix constructors.  It is
perfectly legal to construct a mat3 from a mat2 - the rest will be
filled in by the identity matrix.

Changes piglit test constructor-23.vert from FAIL to PASS, but the
generated code is incorrect.

14 years agoast_function: Remove bogus cases from generate_constructor_matrix.
Kenneth Graunke [Wed, 1 Sep 2010 21:49:53 +0000 (14:49 -0700)]
ast_function: Remove bogus cases from generate_constructor_matrix.

There are no integer matrix types, so switching on them is silly.

14 years agor600g: fix incorrect state naming in pipe_sampler vs pipe_sampler_view
Dave Airlie [Thu, 2 Sep 2010 01:16:31 +0000 (11:16 +1000)]
r600g: fix incorrect state naming in pipe_sampler vs pipe_sampler_view

fixes problems in valgrind with uninitialised values.

14 years agoir_to_mesa: Load all the STATE_VAR elements of a builtin uniform to a temp.
Eric Anholt [Wed, 1 Sep 2010 23:06:32 +0000 (16:06 -0700)]
ir_to_mesa: Load all the STATE_VAR elements of a builtin uniform to a temp.

Like the constant handling and the handling of other uniforms, we add
the whole thing to the Parameters, avoiding messy, incomplete logic
for adding just the elements of a builting uniform that get used.
This means that a driver that relies only on ParameterValues[] for its
parameters will have an increased parameter load, but drivers
generally don't do that (since they have other params they need to
handle, too).

Fixes glsl-fs-statevar-call (testcase for Ember).  Bug #29687.

Regresses glsl-vs-array-04 on 965.  Thanks to a slight change in
register allocation, this test of undefined behavior now wraps around
the register space and unexpectedly reads the constant value it's
trying to compare to.  The test should probably not look at the
resulting color, since behavior is undefined.

14 years agoir_to_mesa: Add a little helper for emitting link failure messages.
Eric Anholt [Wed, 1 Sep 2010 21:56:43 +0000 (14:56 -0700)]
ir_to_mesa: Add a little helper for emitting link failure messages.

14 years agomesa: Fix many printf-like warnings.
Eric Anholt [Wed, 1 Sep 2010 21:46:22 +0000 (14:46 -0700)]
mesa: Fix many printf-like warnings.

Most of these are just typecasting to long to match the arg type.  I
don't really care too much about getting a GLsizei or whatever
appropriate type in.  However, there were a number of real bugs, like
missing arguments or passing floats to integer format specifiers.  My
favorite: printflike("%s, argument") is missing an argument.

14 years agomesa: Add __printf__ attribute to printf-like functions to get warnings.
Eric Anholt [Wed, 1 Sep 2010 21:39:50 +0000 (14:39 -0700)]
mesa: Add __printf__ attribute to printf-like functions to get warnings.

14 years agomesa/st: remove check for buffer/elements = 0
Dave Airlie [Wed, 1 Sep 2010 23:45:37 +0000 (09:45 +1000)]
mesa/st: remove check for buffer/elements = 0

shown by the glsl-vs-point-size failing on r600g.

the test passes on softpipe and I get a full piglit test run completing on r600g.

14 years agor600g: silence compiler warning
Jerome Glisse [Wed, 1 Sep 2010 22:09:37 +0000 (18:09 -0400)]
r600g: silence compiler warning

Signed-off-by: Jerome Glisse <jglisse@redhat.com>