Commit Graph

36190 Commits

Author SHA1 Message Date
Zhenyu Wang
881ec3a814 i965: Add support for math instructions in the gen6 WM. 2010-06-12 21:47:32 -07:00
Zhenyu Wang
7ba2ecb32b i965: Set the correct WM GRF start reg on gen6. 2010-06-12 21:47:31 -07:00
Eric Anholt
0f59b9a95d i965: Update gen6 paths for the streaming rework. 2010-06-12 21:47:31 -07:00
Eric Anholt
7ad26b0030 i965: Stream out CC unit state.
before:
[ # ]  backend                         test   min(s) median(s) stddev. count
[  0]       gl            firefox-talos-gfx   31.791   32.287   1.11%    6/6
after:
[  0]       gl            firefox-talos-gfx   31.198   31.675   0.96%    6/6
2010-06-12 21:47:31 -07:00
Zack Rusin
db05972807 draw/gs: copy the outputs only if we emitted something 2010-06-12 10:45:42 -04:00
Zack Rusin
1551b4da8c softpipe: small cleanup 2010-06-12 10:45:42 -04:00
Joakim Sindholt
60cfed6c70 r300/compiler: fix scons build 2010-06-12 15:40:14 +02:00
Vinson Lee
b6cfca42e3 i965: Remove unnecessary header. 2010-06-12 01:44:43 -07:00
Vinson Lee
e0b211d07c scons: Disable i965g build if using MSVC.
i965g uses C99 constructs that are not supported by MSVC.
2010-06-11 18:43:58 -07:00
Vinson Lee
de51485000 scons: Disable i915g build if using MSVC.
i915g uses C99 constructs that are not supported by MSVC.
2010-06-11 18:42:57 -07:00
Ian Romanick
824b659d91 ir_constant: Eliminate 'void *' constructor
All of the places that had been using the (glsl_type *, void *)
constructor were actually passing an ir_constant_data for the
'void *'.  The code can be greatly simplified by replacing this
constructor with a (glsl_type *, ir_constant_data *) constructor.
This should also help prevent one class of invalid uses of the old
constructor.
2010-06-11 17:12:40 -07:00
Ian Romanick
b74b43e4ba Use statically typed ir_constant constructors wherever possible 2010-06-11 17:12:23 -07:00
Ian Romanick
4976e57448 ir_reader: Use 'union ir_constant_data' in read_constant 2010-06-11 17:12:23 -07:00
Ian Romanick
f8b88bea0f ir_constant_visitor: Type of constant result is same as original expression
The type of the resulting constant must be the same as the type of the
original expression.  The changes to the code require that the case
where an unhandled expression is received, and there really shouldn't
be any of these, must be an exit point.
2010-06-11 17:12:12 -07:00
Ian Romanick
083d75a942 ir_constant_visitor: Types of ir_binop_{equal,nequal} must match
The types must match exactly, so there is no reason to check the types here.
2010-06-11 17:11:14 -07:00
Ian Romanick
4daaab6040 ir_constant_visitor: Use 'union ir_constant_data' in expression handler 2010-06-11 17:11:06 -07:00
Ian Romanick
0bb70a30d5 ir_constant_visitor: Use 'union ir_constant_data' instead of open-coded version 2010-06-11 15:49:49 -07:00
Ian Romanick
be1d2bfdea Matrix and vector constructors with a single constant scalar are constant 2010-06-11 15:48:26 -07:00
Ian Romanick
39d6dd3537 ir_constant_visitor: Handle bool-to-int and int-to-bool 2010-06-11 15:43:59 -07:00
Ian Romanick
7825d3d157 Treat ?: with all constant subexpressions as a constant expression 2010-06-11 15:43:59 -07:00
Ian Romanick
0ad76c6767 Rearrange code in HIR conversion of ?: operator
There are no functional changes.  Code is just moved arround.  This
prepares for the next set of changes that do change the functionality.
2010-06-11 15:43:59 -07:00
Ian Romanick
c2ba619092 ir_constant_visitor: Handle constant swizzles 2010-06-11 15:43:59 -07:00
Ian Romanick
9b92af9ebc ir_constant_visitor: Handle array access of constant vectors and matrices 2010-06-11 15:43:56 -07:00
Ian Romanick
2cf0969de5 Remove redundant type checks for constant constructors
All of the cases (e.g., arrays and structures) that were being
filtered by these tests were already filtered by the earlier
is_numeric and is_boolean tests.
2010-06-11 15:37:34 -07:00
Ian Romanick
1a872b1af3 Do simple constant folding while processing function call parameters 2010-06-11 15:37:34 -07:00
Ian Romanick
253dedeb6c ir_constant_visitor: Handle dereferences of constant records 2010-06-11 15:37:27 -07:00
Ian Romanick
b94c29a47b ir_constant: Add get_record_field query 2010-06-11 15:36:05 -07:00
Ian Romanick
eeedd355cf Add glsl_types::field_index to get the location of a record field 2010-06-11 13:51:42 -07:00
Ian Romanick
ab92d0e53e Detect and process constant record constructors 2010-06-11 13:51:42 -07:00
Ian Romanick
c077131c0f Move parameter processing out of match_function_by_name
Eventually code that processes constant structure constructors will
need to use the processed list of parameters.
2010-06-11 13:51:42 -07:00
Ian Romanick
d4b33edbd0 ir_constant_visitor: Use clone to create a constant from a variable reference 2010-06-11 13:51:42 -07:00
Ian Romanick
710919fd7c ir_constant: Support constant structures in clone 2010-06-11 13:51:42 -07:00
Ian Romanick
7f1ab834d7 ir_constant: Add storage for multiple constants for arrays and records 2010-06-11 13:51:42 -07:00
Ian Romanick
93073551f9 Add glsl_type::is_record query 2010-06-11 13:51:42 -07:00
Ian Romanick
7dc2b71a89 Add float/bool conversion to ir_constant_expression.cpp. 2010-06-11 13:51:42 -07:00
Ian Romanick
00eb466e38 Constant-fold constructor parameters after type conversion
This causes the following tests to pass:

         glslparsertest/shaders/CorrectMatComma2.frag

One of the incorrect errors in glslparsertest/shaders/CorrectComma.frag
is also eliminated.
2010-06-11 13:51:42 -07:00
Ian Romanick
9e08d019ce Make constructors with all constant parameters generate in-line constants 2010-06-11 13:51:09 -07:00
Ian Romanick
756a3fac4f Construct an ir_constant from a list of ir_constant values 2010-06-11 13:51:09 -07:00
Ian Romanick
7c40a32054 Add queries to determine if a node is a list sentinal 2010-06-11 13:51:09 -07:00
Ian Romanick
31881908eb Add methods to ir_constant to get scalar components in a particular type 2010-06-11 13:51:09 -07:00
Ian Romanick
c9cb1032be Derefence components of constants smarter
During generation of calls to constructors, derefernce constants by creating
new constants instead of creating dereferences.
2010-06-11 13:51:09 -07:00
Ian Romanick
989cfc432e Construct an ir_constant from a scalar component of another ir_constant 2010-06-11 13:51:09 -07:00
Ian Romanick
565185cd8f Use ir_unop_b2i when converting a bool-to-int and add a missing break
The previous code just had dumb cut-and-paste errors.
2010-06-11 13:49:00 -07:00
Tom Stellard
3eca311b72 r300/compiler: Handle more complex conditionals in loops. 2010-06-11 22:06:59 +02:00
Tom Stellard
bde34a76b5 r300/compiler: Fix warning. 2010-06-11 22:06:59 +02:00
Tom Stellard
f7269cf26a r300/compiler: Handle SGT and SLE at the beginning of loops. 2010-06-11 22:06:59 +02:00
Tom Stellard
0125f5270b r300/compiler: Verify assumptions about opcode types. 2010-06-11 22:06:59 +02:00
Tom Stellard
6f1b6814bc r300/compiler: Unroll loops that decrement the counter.
e.g. for(i=10; i>0; i--)
2010-06-11 22:06:58 +02:00
Tom Stellard
0f1109ce36 r300/compiler: Unroll loops that have a constant number of iterations.
This only works with for loops that increment the counter.
e.g. for(i=0; i<10; i++)
2010-06-11 22:06:58 +02:00
Tom Stellard
622fd4d061 r300/compiler: Implement simple loop emulation
The loop emulation unrolls loops as may times as possbile while still
keeping the shader program below the maximum instruction limit.  At this
point, there are no checks for constant conditionals.  This is only enabled
for fragment shaders.
2010-06-11 22:06:58 +02:00