RE: [fog-dev] CG Shader Parser

17 views
Skip to first unread message

Mike Tajmajer

unread,
Jun 29, 2010, 7:01:07 PM6/29/10
to fog...@googlegroups.com
Hi Petr,

I actually have a small CG program running now as well!

// This is C2E2f_passthru from "The Cg Tutorial" (Addison-Wesley, ISBN
// 0321194969) by Randima Fernando and Mark J. Kilgard. See page 53.

struct C2E2f_Output {
float4 color : COLOR;
};

C2E2f_Output C2E2f_passthru(float4 color : COLOR)
{
C2E2f_Output OUT;
OUT.color = color;
return OUT;
}

Petr Kobalíček

unread,
Jul 2, 2010, 5:21:52 AM7/2/10
to fog...@googlegroups.com
Nice work Mike!

I'd like to make the possibility to include foundation for shaders in
Fog this week, I hope the time will be sufficient,

Really sorry about my slow replies at this time

--
Best regards
- Petr Kobalicek <http://kobalicek.com>

Mike Tajmajer

unread,
Jul 9, 2010, 12:44:10 PM7/9/10
to fog...@googlegroups.com
Hi Petr,

> I'd like to make the possibility to include foundation for shaders in Fog
this
> week, I hope the time will be sufficient,

I am just wonder of Status.

There is no rush!

Petr Kobalíček

unread,
Jul 11, 2010, 11:17:49 AM7/11/10
to fog...@googlegroups.com
Hi Mike,

I'm still not ready with this:(

I'd like to release AsmJit-1.0 beta so we can use new AsmJit for such thing, but it's not finished yet. Is your shader experiment somewhere available so I can review the design?

Mike Tajmajer

unread,
Jul 11, 2010, 4:57:22 PM7/11/10
to fog...@googlegroups.com

Hi Petr,

 

Waiting for AsmJit 1.0 would be fine.

 

As I implement the opcodes and figure out the nuances of the grammar I am making changes to the code.

 

I will post the grammar and part of the code generation that is working. 

 

I'll likely be rewriting it as I move forward -- so the design is still in flux!

Petr Kobalíček

unread,
Jul 11, 2010, 5:12:43 PM7/11/10
to fog...@googlegroups.com
Hi Mike,

I'd like to help you with implementation. Last week I did some optimizations in MathPresso (expression JIT compiler) and I think that JIT compilation has big potential, also read my latest post:
  http://fog-framework.blogspot.com/2010/07/fog-graphics-and-jit-compilation.html

Fog is moving to the first ideas and I think that this is great!

I found also very interesting article about optimizations here:
  http://www.redhat.com/magazine/002dec04/features/gcc/

But I think that we need to start with simple implementation making it robust later.

I think that I will release AsmJit-1.0 beta next week so we can start with experiments!


--
Best regards
- Petr Kobalicek <http://kobalicek.com>

Reply all
Reply to author
Forward
0 new messages