Sign in to follow this  
sepul

HLSL Fragment Linker Bug ?!

Recommended Posts

I'm using DX-SDK (feb2007) Fragment Linker tool, which is DX10 compiler but I have noticed a bug in linker which really messes up my design and code. Fragment Linker doesn't seem to care about Sampler Registers that I manually set. for example :
sampler _s1 : register(s1);

void psFunc0(float2 texcoord:TEXCOORD0, out float4 color:r_psFunc0_color)
{
	color = tex2D( _s1, texcoord );
}

....
when compiling this kind of code with Fragment Linker, the sampler will be changed to s0 and not s1, I tried the fxc tool on the similar code and the sampler registers are correct. do you think it is a bug, or I'm missing something here ?

Share this post


Link to post
Share on other sites
The fragment linker hasn't received much love in recent times and has been dropped for D3D10, so it would be feasible for it to have some old lingering bugs that haven't been fixed...

Have you looked into all the available reflection and constant-table information? The shader compiler has always preferred to assign its own sampler registers, so you may be able to programmatically look up with slot you need to bind a texture to...

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
The fragment linker hasn't received much love in recent times and has been dropped for D3D10, so it would be feasible for it to have some old lingering bugs that haven't been fixed...

shit, guess I'm in trouble, I just downloaded the latest SDK to see if it's fixed.
anyway, I've checked the fragment linker version and yes, it's old, but does it mean that it uses older compiler ? are FXC and fragment linker share the same core compiler ? if they are not, the generated code must be even less optimized than the FXC one, am I right ?

btw, I have already checked all constants (manually setting constants are correct), the only problem is with sampler registers, which FXC and FLINK behaves differently (I guess they don't share the same compiler anyways).

the purpose of using fragment linker is that it works well with my node based shader design (something like offset engine), I create fragments from the graph, and link them, etc. guess I have to changed that one too.

thanks

-- Edit --> Tried the latest SDK - flink, it's the same crap, same bug, enough for me today !

[Edited by - sepul on February 1, 2008 3:30:55 PM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this