cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

meiqz
Journeyman III

about CAL and IL doc

Hi all,

I am a neophyte of CAL and IL and just study it for a few days. I read the IL spec and found the IL doc seems to be incompleted, and I always can not find what I need in the doc. 

for example:

the syntax for input register declaration instruction is

dcl_input[_usage(usage)] dst[.mask]

buf I don't know what value the usage should be taken and there are no information about it in the IL spec.

so I doubt that there may be some other docs to be referred to when studying CAL and IL, is that right ? and what are them and where can I find them?

 

0 Likes
1 Reply
sgratton
Adept I


Hi there,

I too think it would be great if AMD could provide an "IL Programming Guide", explaining what the relevant options are for declarations and the like and giving some guidance on what the differences are and when to use what, as well as explaining common constructions such as how to read in an array.

Some points I'd like to see addressed for example are: the difference between vWinCoord0 and v0 (already mentioned on the forum at some level I think), the difference between the various declarations of these two ( _interp(linear), _interp(linear_noperspective), _interp(linear_noperspective)_centered_center), why vWinCoord0 are floats (ending in 0.5) whereas vObjIndex0 is an integer, what the number in the _sampler() part of the sample instruction does (if anything...), what the unnorm part in _type() of a resource declaration does, how to do integer subraction (is inegate followed by iadd the optimal way?)/why there is no integer subtraction opcode or integer negation modifier (_neg seems only to work with floats) and so on.

In the meantime though, I've found it possible to learn by example using the provided IL samples in the CAL SDK. If you're on linux, you can do things like "grep -r vWin samples/" from the amdcal directory to find and compare all possible usages to find one that is close to what you want to do. So one can figure out how to correctly do common tasks even if you're not precisely sure what all the options are doing! My own program is almost working now...

Best,
Steven.
0 Likes