Commit graph

38511 commits

Author SHA1 Message Date
Ian Romanick
3bcfafcf03 glsl2: Track the number of ir_loop_jump instructions that are in a loop 2010-09-03 11:55:22 -07:00
Ian Romanick
351525d534 ir_expression: Add static operator_string method
I've used this in quite a few debug commits that never reached an
up-stream tree.
2010-09-03 11:55:21 -07:00
Ian Romanick
79082b8aca exec_node: Add insert_before that inserts an entire list 2010-09-03 11:55:21 -07:00
Ian Romanick
7850ce0a99 glsl2: Eliminate zero-iteration loops 2010-09-03 11:55:21 -07:00
Ian Romanick
8df2dbf91d glsl2: Perform initial bits of loop analysis during compilation 2010-09-03 11:55:21 -07:00
Ian Romanick
bfe3fbb38e glsl2: Add module to suss out loop control variables from loop analysis data
This is the next step on the road to loop unrolling
2010-09-03 11:55:21 -07:00
Ian Romanick
9434a0749f glsl2: Add module to analyze variables used in loops
This is the first step eventually leading to loop unrolling.
2010-09-03 11:55:21 -07:00
Ian Romanick
0f4f8c7364 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.
2010-09-03 11:55:21 -07:00
Ian Romanick
53acbd87d7 ir_validate: Validate loop control fields in ir_loop 2010-09-03 11:55:21 -07:00
Ian Romanick
3b85f1cc6c glsl2: Add cmp field to ir_loop
This reprents the type of comparison between the loop induction
variable and the loop termination value.
2010-09-03 11:55:21 -07:00
Ian Romanick
c8ee8e07f7 glsl2: Set a flag when visiting the assignee of an assignment 2010-09-03 11:55:21 -07:00
Ian Romanick
29eebe9a9a exec_list: Add pop_head 2010-09-03 11:55:21 -07:00
Ian Romanick
9710d272f7 ir_print_visitor: Print empty else blocks more compactly 2010-09-03 11:55:21 -07:00
Luca Barbieri
67a9a90794 nvfx: fix division by zero in vp-ignore-input 2010-09-03 20:57:44 +02:00
Luca Barbieri
f1980af71d nvfx: report correct max lodbias
Fixes piglit lodbias
2010-09-03 20:54:48 +02:00
Luca Barbieri
657b88fc4c nvfx: remove message 2010-09-03 20:48:14 +02:00
Luca Barbieri
b946984e3b nvfx: support indirect addressing in vps
Negative or huge offsets not yet supported.
2010-09-03 20:48:14 +02:00
Alex Deucher
7e282b8e62 r600c: add proper returns for some evergreen functions
these weren't checked anyway.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=29999
2010-09-03 12:13:47 -04:00
Luca Barbieri
6ddfdaead8 nvfx: fix support for more than 8 texture units (fixes etqw crash) 2010-09-03 16:13:21 +02:00
Dave Airlie
50c1b6f2e8 r600g: fix segfault in state after rework
probably can improve this a bit.
2010-09-03 19:39:14 +10:00
Alex Deucher
b009d50f44 r600c: emit DB_HTILE_DATA_BASE on evergreen
Make the hw happy.
2010-09-03 01:13:41 -04:00
Dave Airlie
191bfc5c3b 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.
2010-09-03 14:12:38 +10:00
Dave Airlie
9ef228ee2d r600g: reduce size of r600 context structure to !insane
Its now about 7.8k, and might actually fit in a cache.
2010-09-03 13:53:39 +10:00
Dave Airlie
b5fcf82749 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.
2010-09-03 13:34:57 +10:00
Dave Airlie
ce7077423f r600g: deref old driver states for set entry points. 2010-09-03 12:01:59 +10:00
Dave Airlie
4ca207b174 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.
2010-09-03 11:56:07 +10:00
Dave Airlie
49b4f5259b 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.
2010-09-03 11:35:08 +10:00
Dave Airlie
1bd8493a0b r600g: move lots of state inline helpers to separate header.
this gets them out of sight of the main codeflow.
2010-09-03 10:55:54 +10:00
Vinson Lee
619e899a42 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.
2010-09-02 17:03:47 -07:00
Dave Airlie
883cbbd99c r600g: drop magic numbers in depth state.
this also fixes occulsion queries.
2010-09-03 09:48:40 +10:00
Vinson Lee
23120b8d30 util: Include missing header in u_linear.h.
Include p_compiler.h for size_t and boolean symbols.
2010-09-02 16:30:34 -07:00
Vinson Lee
3888c38fc9 mesa: Fix printf-like warning. 2010-09-02 16:12:58 -07:00
Vinson Lee
c5dde53f4e mesa: Fix printf-like warnings. 2010-09-02 16:03:32 -07:00
Jerome Glisse
f8d11b2e8e 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>
2010-09-02 16:58:47 -04:00
Brian Paul
e746a6bb9a 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.
2010-09-02 13:00:10 -06:00
Ian Romanick
6e3cbeb361 glsl2: Update TODO file 2010-09-02 10:11:54 -07:00
Jerome Glisse
e73c5501b2 r600g: fix memory/bo leak
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-02 11:47:30 -04:00
Brian Paul
c9039fdb16 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.
2010-09-02 07:58:33 -06:00
Brian Paul
9eca0e2c3e mesa: fix some printf warnings with casts 2010-09-02 07:57:16 -06:00
Dave Airlie
5d5f693cef r600g: fix thinko in shadow code.
spotted by taiu on irc
2010-09-02 21:26:12 +10:00
Dave Airlie
76d0541e79 r600g: fix logicop, the 3d ROP is the 2D rop shifted twice. 2010-09-02 16:40:41 +10:00
Dave Airlie
e8ff0f63b6 r600g: fix depth texture tests 2010-09-02 15:51:23 +10:00
Kenneth Graunke
f32d3df8ab 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.
2010-09-01 20:39:09 -07:00
Kenneth Graunke
43a6200f3c glsl: Convert constant record constructor parameters to ir_constants.
I'm not sure if this is strictly necessary, but it seems wise.
2010-09-01 20:39:09 -07:00
Kenneth Graunke
cfe0dd5622 glsl: Reject structure constructors that have too many arguments.
Fixes piglit test constructor-27.vert.
2010-09-01 20:39:09 -07:00
Ian Romanick
e466b182bb 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.
2010-09-01 20:39:09 -07:00
Ian Romanick
4d6221f90d glsl2: Remove unused method glsl_type::generate_constructor 2010-09-01 20:39:09 -07:00
Ian Romanick
16d9ebb357 glsl2: Remove unused 'constructor' parameter from glsl_symbol_table::add_type 2010-09-01 20:39:09 -07:00
Ian Romanick
a789ca649c glsl2: Don't generate constructor functions for structures 2010-09-01 20:39:09 -07:00
Ian Romanick
37200d83d3 glsl2: Emit structure constructors inline
Fixes piglit test cases glsl-[fv]s-all-0[12].
2010-09-01 20:39:09 -07:00