> What do you mean by GUI support? Are you thinking about running the shaders in a fake execution environment to test out the VM?
Yes. I am trying to build simple shader execution environment with GUI support, which will be implemented using wxWidgets, wxPython or FLTK.
Do you have any preference for GUI toolkit so that we can share the codebase as much as possible?
> How are you going to set the VM up?
LLVM IR itself as VM. This is the reason why I am interesting in using use LLVM infrastructure.
The renderer(shader executor) executes LLVM bitcode by JIT.
But as you mentioned, sometimes we still have to go back from LLVM world to C/C++ to access renderer internal(trace(), Du(), etc).
And there's a couple of ways to map RSL into LLVM.
for example, for SPMD style(reyes) renderer it'd be efficient to emit following LLVM code,
// RSL code
shader myshader(float k)
{
Ci = k * Cs;
}
// pseudo code equivalent to translated LLVM bitcode
shader myshader(param *param, shadingpoint *ps, int n)
{> What do you mean by GUI support? Are you thinking about running the shaders in a fake execution environment to test out the VM?
Yes. I am trying to build simple shader execution environment with GUI support, which will be implemented using wxWidgets, wxPython or FLTK.
Do you have any preference for GUI toolkit so that we can share the codebase as much as possible?
> How are you going to set the VM up?
LLVM IR itself as VM. This is why I am trying to use LLVM infrastructure.
The renderer(shader executor) executes LLVM bitcode by JIT.
But as you mentioned, sometimes we still have to go back from LLVM world to C/C++ to access renderer internal(trace(), Du(), etc).
And there's a couple of ways to map RSL into LLVM.
for example, for SPMD style(reyes) renderer it'd be efficient to emit following LLVM code,
// RSL
shader myshader(float k)
{
Ci = k * Cs;
}
// pseudo code equivalent to LLVM bitcode
shader myshader(param *param, shadingpoint *ps, int n)
{
int i;
for (i = 0; i < n; i++) {
ps->Ci[i] = param->k[i] * ps->Cs[i];
}
}
int i;
for (i = 0; i < n; i++) {
ps->Ci[i] = param->k[i] * ps->Cs[i];
}
}