Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-15 Thread Matijn Woudt
On Thu, Apr 15, 2010 at 11:23 AM, Stefan Dösinger wrote: > > Am 14.04.2010 um 20:45 schrieb Jason Green: >> FYI, we encountered a game a while back which used a few shaders that >> depended on being compiled with a particular version for d3dx9_##.dll.   >> There was a compiler bug which the game

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-15 Thread Stefan Dösinger
Am 14.04.2010 um 20:45 schrieb Jason Green: > FYI, we encountered a game a while back which used a few shaders that > depended on being compiled with a particular version for d3dx9_##.dll. There > was a compiler bug which the game engine knew about and accounted for. If > you tried to use the

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Jason Green
On Apr 14, 2010, at 1:48 PM, Matijn Woudt wrote: >> I think you want to test if the compiled shader works instead of the >> exact bytecode. Generating the same bytecode is probably way too hard, >> fragile to test, and most likely not worth the effort. > > I think I should go for exact bytecode a

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Stefan Dösinger
Am 14.04.2010 um 19:29 schrieb Henri Verbeet: > I think you want to test if the compiled shader works instead of the > exact bytecode. Generating the same bytecode is probably way too hard, > fragile to test, and most likely not worth the effort. Yep, comparing generated bytecode is not going to w

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Matijn Woudt
On Wed, Apr 14, 2010 at 7:30 PM, Roderick Colenbrander wrote: > On Wed, Apr 14, 2010 at 7:22 PM, Matijn Woudt wrote: >> On Wed, Apr 14, 2010 at 6:47 PM, Matteo Bruni >> wrote: dlls/wineshader doesn't exist in that tree? >>> >>> Check if you are in the correct branch (should be the "co

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Matijn Woudt
On Wed, Apr 14, 2010 at 7:29 PM, Henri Verbeet wrote: > On 14 April 2010 17:19, Matijn Woudt wrote: >> I have thought about using LLVM, but I don't like it because of: >> 1) Having another wine dependency (~40MB for me on ubuntu) >> 2) Code generated by LLVM will most likely not generated exactly

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Roderick Colenbrander
On Wed, Apr 14, 2010 at 7:22 PM, Matijn Woudt wrote: > On Wed, Apr 14, 2010 at 6:47 PM, Matteo Bruni > wrote: >>> dlls/wineshader doesn't exist in that tree? >>> >> >> Check if you are in the correct branch (should be the "compiler" >> branch in his tree). >> > > Right, my mistake. > Lastly

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Henri Verbeet
On 14 April 2010 17:19, Matijn Woudt wrote: > I have thought about using LLVM, but I don't like it because of: > 1) Having another wine dependency (~40MB for me on ubuntu) > 2) Code generated by LLVM will most likely not generated exactly the > same bytecode as native compiler does, even though th

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Matijn Woudt
On Wed, Apr 14, 2010 at 6:47 PM, Matteo Bruni wrote: >> dlls/wineshader doesn't exist in that tree? >> > > Check if you are in the correct branch (should be the "compiler" > branch in his tree). > Right, my mistake. >>> Lastly, a bit on testing the compiler. I'm not sure trying to get >>> exactl

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Charles Davis
On 4/14/10 10:36 AM, Reece Dunn wrote: > On 14 April 2010 16:19, Matijn Woudt wrote: >> I have thought about using LLVM, but I don't like it because of: >> 1) Having another wine dependency (~40MB for me on ubuntu) >> 2) Code generated by LLVM will most likely not generated exactly the >> same byt

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Matteo Bruni
> dlls/wineshader doesn't exist in that tree? > Check if you are in the correct branch (should be the "compiler" branch in his tree). >> Lastly, a bit on testing the compiler. I'm not sure trying to get >> exactly the same bytecode as native is a feasible objective: while for >> an assembler prog

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Reece Dunn
On 14 April 2010 16:19, Matijn Woudt wrote: > I have thought about using LLVM, but I don't like it because of: > 1) Having another wine dependency (~40MB for me on ubuntu) > 2) Code generated by LLVM will most likely not generated exactly the > same bytecode as native compiler does, even though th

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Matijn Woudt
On Wed, Apr 14, 2010 at 5:59 PM, Matteo Bruni wrote: > 2010/4/14 Matijn Woudt : >> On Wed, Apr 14, 2010 at 4:27 PM, Stefan Dösinger >> wrote: >>> >>> Am 14.04.2010 um 15:44 schrieb Henri Verbeet: >>> On 14 April 2010 15:07, Stefan Dösinger wrote: >> 3) Implement the compiler in d3dcomp

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Matteo Bruni
2010/4/14 Matijn Woudt : > On Wed, Apr 14, 2010 at 4:27 PM, Stefan Dösinger > wrote: >> >> Am 14.04.2010 um 15:44 schrieb Henri Verbeet: >> >>> On 14 April 2010 15:07, Stefan Dösinger wrote: > 3) Implement the compiler in d3dcompiler_xx. I wrote a basic HLSL compiler as university proje

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Roderick Colenbrander
On Wed, Apr 14, 2010 at 5:19 PM, Matijn Woudt wrote: > On Wed, Apr 14, 2010 at 4:51 PM, Roderick Colenbrander > wrote: >> On Wed, Apr 14, 2010 at 4:38 PM, Matijn Woudt wrote: >>> On Wed, Apr 14, 2010 at 4:27 PM, Stefan Dösinger >>> wrote: Am 14.04.2010 um 15:44 schrieb Henri Verbeet:

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Matijn Woudt
On Wed, Apr 14, 2010 at 4:51 PM, Roderick Colenbrander wrote: > On Wed, Apr 14, 2010 at 4:38 PM, Matijn Woudt wrote: >> On Wed, Apr 14, 2010 at 4:27 PM, Stefan Dösinger >> wrote: >>> >>> Am 14.04.2010 um 15:44 schrieb Henri Verbeet: >>> On 14 April 2010 15:07, Stefan Dösinger wrote: >

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Roderick Colenbrander
On Wed, Apr 14, 2010 at 4:38 PM, Matijn Woudt wrote: > On Wed, Apr 14, 2010 at 4:27 PM, Stefan Dösinger > wrote: >> >> Am 14.04.2010 um 15:44 schrieb Henri Verbeet: >> >>> On 14 April 2010 15:07, Stefan Dösinger wrote: > 3) Implement the compiler in d3dcompiler_xx. I wrote a basic HLSL

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Matijn Woudt
On Wed, Apr 14, 2010 at 4:27 PM, Stefan Dösinger wrote: > > Am 14.04.2010 um 15:44 schrieb Henri Verbeet: > >> On 14 April 2010 15:07, Stefan Dösinger wrote: 3) Implement the compiler in d3dcompiler_xx. >>> I wrote a basic HLSL compiler as university project in 2008, this is where >>> part

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Stefan Dösinger
Am 14.04.2010 um 15:44 schrieb Henri Verbeet: > On 14 April 2010 15:07, Stefan Dösinger wrote: >>> 3) Implement the compiler in d3dcompiler_xx. >> I wrote a basic HLSL compiler as university project in 2008, this is where >> part of the assembler code came from. Do you have the sources, do you

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Henri Verbeet
On 14 April 2010 15:07, Stefan Dösinger wrote: >> 3) Implement the compiler in d3dcompiler_xx. > I wrote a basic HLSL compiler as university project in 2008, this is where > part of the assembler code came from. Do you have the sources, do you need > them? > Quite frankly, I also believe that's

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Matijn Woudt
On Wed, Apr 14, 2010 at 3:07 PM, Stefan Dösinger wrote: > > Am 14.04.2010 um 13:08 schrieb Matijn Woudt: >> 2) Move the assembler to d3dcompiler_xx.dll and forward calls from >> d3dx9. This is needed because the assembler and compiler can share the >> same bytecode writer this way. > When Mattheo

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Stefan Dösinger
Am 14.04.2010 um 13:08 schrieb Matijn Woudt: > 2) Move the assembler to d3dcompiler_xx.dll and forward calls from > d3dx9. This is needed because the assembler and compiler can share the > same bytecode writer this way. When Mattheo implemented the assembler in the gsoc project we decided to put

Re: HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Henri Verbeet
On 14 April 2010 13:08, Matijn Woudt wrote: > Hi, > > I'm about to implement the HLSL compiler, but I want to make sure I'm > taking the right direction. > For the compiler: > preprocessor(wpp)->hlslparser/compiler(lex/bison)->bytecode > writer(same as for the shader assembler). > Now the question

HLSL Compiler and d3dcompiler_xx.dll

2010-04-14 Thread Matijn Woudt
Hi, I'm about to implement the HLSL compiler, but I want to make sure I'm taking the right direction. For the compiler: preprocessor(wpp)->hlslparser/compiler(lex/bison)->bytecode writer(same as for the shader assembler). Now the question is where to implement the compiler. It can be called from a