HLSL compiler

Matteo Bruni matteo.mystral at gmail.com
Fri Sep 2 12:45:04 CDT 2016


2016-09-02 3:33 GMT+02:00 Fabian Maurer <dark.shadow4 at web.de>:
> Also, does it really not support function calls?
> I'm currently trying to get that part to work, like built-in functions, but I
> somewhat can't believe that is missing.

I don't see a parser rule for function calls at the moment. Looking at
my private branch, I have an additional VAR_IDENTIFIER '('
func_arguments ')' rule for the postfix_expr nonterminal.

In general, the parser should be in pretty decent shape, if missing
some rules. Everything else (IR transformation / optimization,
codegen) is just not there at the moment.

Somewhat related: the current IR probably isn't quite optimal. It's a
tree IR, quite strongly inspired by the one from the current GLSL
compiler in Mesa. At least two issues with it are that memory usage
can get relatively high and some optimizations are difficult to do
with it. Fortunately we don't need to do too much optimization since
there is another compiler down the line (e.g. GLSL compiler in the
OpenGL drivers) which should be able to cover up our shortcomings...



More information about the wine-devel mailing list