summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-03-05Fix invalid extern "C" around header inclusion.Mark Janes1-2/+0
System headers may contain C++ declarations, which cannot be given C linkage. For this reason, include statements should never occur inside extern "C". This patch moves the C linkage statements to enclose only the declarations within a single header. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2014-09-30i965/fs: Don't make a name for a vector splitting temporaryIan Romanick1-3/+8
If the name is just going to get dropped, don't bother making it. If the name is made, release it sooner (rather than later). No change Valgrind massif results for a trimmed apitrace of dota2. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-07-01i965: Use unreachable() instead of unconditional assert().Matt Turner1-1/+1
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-07-01i965: Use typed foreach_in_list_safe instead of foreach_list_safe.Matt Turner1-3/+1
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
2014-07-01i965: Use typed foreach_in_list instead of foreach_list.Matt Turner1-6/+3
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
2014-04-08i965: Drop pointless check for variable declarations in splitting.Eric Anholt1-10/+5
We're walking the whole instruction stream, so we know the declaration will be found. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-02-22i965: Move compiler debugging output to stderr.Eric Anholt1-4/+4
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-12-12glsl: move variables in to ir_variable::data, part ITapani Pälli1-1/+1
This patch moves following bitfields in to the data structure: used, assigned, how_declared, mode, interpolation, origin_upper_left, pixel_center_integer Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Paul Berry <stereotype441@gmail.com>
2013-11-01i965: Don't do vector splitting for ir_var_system_valueAnuj Phogat1-0/+1
This is required while adding builtin system value vec{2, 3, 4} variables. For example: (declare (sys) vec2 gl_SamplePosition) Without this patch above glsl ir splits in to: (declare (temporary) float gl_SamplePosition_x) (declare (temporary) float gl_SamplePosition_y) Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2013-07-09i965: Replace #include "intel_context.h" with brw_context.h.Kenneth Graunke1-1/+1
brw_context.h includes intel_context.h, but additionally makes the brw_context structure available. Switching this allows us to start using brw_context in more places. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Chris Forbes <chrisf@ijw.co.nz> Acked-by: Paul Berry <stereotype441@gmail.com> Acked-by: Anuj Phogat <anuj.phogat@gmail.com>
2013-06-21glsl: Remove ir_print_visitor.h includes and usageEric Anholt1-1/+0
We have ir->print() to do the old declaration of a visitor and having the IR accept the visitor (yuck!). And now you can call _mesa_print_ir() safely anywhere that you know what an ir_instruction is. A couple of missing printf("\n")s are added in error paths -- when an expression is handed to the visitor, it doesn't print '\n' (since it might be a step in printing a whole expression tree). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Paul Berry <stereotype441@gmail.com>
2013-01-24glsl: Eliminate ambiguity between function ins/outs and shader ins/outsPaul Berry1-4/+6
This patch replaces the three ir_variable_mode enums: - ir_var_in - ir_var_out - ir_var_inout with the following five: - ir_var_shader_in - ir_var_shader_out - ir_var_function_in - ir_var_function_out - ir_var_function_inout This eliminates a frustrating ambiguity: it used to be impossible to tell whether an ir_var_{in,out} variable was a shader in/out or a function in/out without seeing where the variable was declared in the IR. This complicated some optimization and lowering passes, and would have become a problem for implementing varying structs. In the lisp-style serialization of GLSL IR to strings performed by ir_print_visitor.cpp and ir_reader.cpp, I've retained the names "in", "out", and "inout" for function parameters, to avoid introducing code churn to the src/glsl/builtins/ir/ directory. Note: a couple of comments in the code seemed to indicate that we were planning for a possible future in which geometry shaders could have shader-scope inout variables. Our GLSL grammar rejects shader-scope inout variables, and I've been unable to find any evidence in the GLSL standards documents (or extensions) that this will ever be allowed, so I've eliminated these comments. Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-11-06i965: Fix struct vs class warnings in brw_fs_vector_splitting.cpp.Kenneth Graunke1-2/+2
Makes clang happier. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-08-30i965: Fix Android build by removing relative includesChad Versace1-5/+5
Replace each occurence of #include "../glsl/*.h" with #include "glsl/*.h" Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad@chad-versace.us>
2011-07-29i965/fs: Stop using the exec_list iterator.Eric Anholt1-8/+8
The old style has gone out of favor in the project, but I kept copy and pasting from existing iterator code.
2011-01-31Convert everything from the talloc API to the ralloc API.Kenneth Graunke1-7/+7
2010-10-11i965: Move FS backend structures to a header.Eric Anholt1-2/+0
It's time to start splitting some of this up.
2010-09-29i965: Fix use of undefined mem_ctx in vector splitting.Eric Anholt1-1/+1
2010-09-27i965: Fix vector splitting RHS channel selection with sparse writemasks.Eric Anholt1-3/+8
Fixes: glsl-fs-all-02 glsl-fs-dot-vec2
2010-09-27i965: Remove swizzling of assignment to vector-splitting single-channel LHS.Eric Anholt1-2/+0
We'd end up reading some non-x component of the float RHS. +53 piglits.
2010-09-22i965: When splitting vector variable assignment, ignore unset channels.Eric Anholt1-2/+5
The new checks for sanity in ir_assignment creation got angry about this write_mask == 0. Fixes: glsl-fs-dot-vec2. glsl-fs-atan-2 glsl-fs-dot-vec2
2010-09-22i965: Fix the vector/expression splitting for the write_mask change.Eric Anholt1-3/+0
+113 piglits.
2010-08-27i965: Fix swizzling in vector splitting for the new FS backend.Eric Anholt1-0/+3
We weren't smearing a component of a split RHS out to reach an unsplit LHS's writemask, so gl_FragColor (always unsplit) would often get uninitialized values. Fixes: glsl-algebraic-add-add-1 (and probably many others).
2010-08-26i965: Add new pass to split vectors into scalar variablesEric Anholt1-0/+388
Combined with the previous pass, this lets other optimization passes do their work thanks to ir_tree_grafting. Still have regression in instruction count with INTEL_NEW_FS, but register count is even better.