aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/lower_jumps.cpp
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Use 'using' to be explicit about visitor overloadsKristian H. Kristensen2020-02-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Clang has a warning about overloading virtuals that triggers when a derived class defines a virtual function that's an overload of function in the base class. This kind of thing: struct chart; // let's pretend this exists struct Base { virtual void* get(char* e); }; struct Derived: public Base { virtual void* get(chart* e); // typo, we wanted to override the same function }; The solution is to use using Base::get; to be explicit about the intention to reuse the base class virtual. We hit this a lot with out glsl ir_hierarchical_visitor visitor pattern, so let's adds some 'using' to calm down the compiler. See-also: https://stackoverflow.com/questions/18515183/c-overloaded-virtual-function-warning-by-clang) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3686>
* glsl: Don't pass NULL to ir_assignment constructor when not necessaryIan Romanick2017-10-021-6/+5
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Alejandro PiƱeiro <[email protected]>
* glsl: fix lower jumps for nested non-void returnsTimothy Arceri2017-04-081-0/+6
| | | | | | | | Fixes the case were a loop contains a return and the loop is nested inside an if. Reviewed-by: Roland Scheidegger <[email protected]> https://bugs.freedesktop.org/show_bug.cgi?id=100303
* glsl: fix spelling of embedded in commentTimothy Arceri2017-03-281-1/+1
|
* glsl: fix lower jumps for returns when loop is inside an ifTimothy Arceri2017-03-281-5/+12
| | | | | | | | | | | | | | | | | Previously we would just escape the loop and move everything following the loop inside the if to the else branch of a new if with a return flag conditional. However everything outside the if the loop was nested in would still get executed. Adding a new return to the then branch of the new if fixes this and we just let a follow pass clean it up if needed. Fixes: tests/spec/glsl-1.10/execution/vs-nested-return-sibling-loop.shader_test tests/spec/glsl-1.10/execution/vs-nested-return-sibling-loop2.shader_test Cc: "13.0 17.0" <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* glsl: Separate overlapping sentinel nodes in exec_list.Matt Turner2016-07-261-1/+1
| | | | | | | | | | | I do appreciate the cleverness, but unfortunately it prevents a lot more cleverness in the form of additional compiler optimizations brought on by -fstrict-aliasing. No difference in OglBatch7 (n=20). Co-authored-by: Davin McCall <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: move to compiler/Emil Velikov2016-01-261-0/+1022
Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>