openfimg: Fix cast warnings

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
openfimg: Extend skeleton of optimization framework

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
openfimg: compiler: Migrate to AST-based representation

This means that both assembler and SSA generation need to be done
differently so this is a little step back, but should be make further
work much easier and resulting code more effective.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
openfimg: Keep dummy shader until the state gets dirty again

This makes the logs a bit more cleaner.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
openfimg: HACK: Enable texture shadow map and occlusion query caps

Even though I'm not sure if we can even support them, to enable testing
using OpenGL 2.1 apps, advertise support for them for now.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
openfimg: compiler: Fix unintended fall-throughs in merge_swizzle()

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
openfimg: compiler: Make the stubs report success

This enables more code to be tested.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
openfimg: compiler: Fold opcode and reg info arrays using macros

While at it, autogenerate name field to simplify code dumping.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
openfimg: compiler: Publish reg info by adding getter function

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
openfimg: compiler: Do not keep all nodes in one list

Instead, by default nodes are root nodes and are kept in a list inside
of_ir_shader, but after inserting it into another node it becomes
a subnode and is automatically removed.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
openfimg: compiler: Implement AST dumper

Quite handy for debugging

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>