cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

ryta1203
Journeyman III

CAL Error Reporting

Is there a place in the documentation that lists what the errors reported by CAL mean? This would really go a long way to help debugging a CAL program. Where can I find this information? Thanks.
0 Likes
8 Replies
marcr
Staff


There's the following table in cal_8h.html in the CAL
installation directory (doc/html):

enum CALresultEnum

Function call result/return codes

Enumeration values:
CAL_RESULT_OK No error
CAL_RESULT_ERROR Operational error
CAL_RESULT_INVALID_PARAMETER Parameter passed in is invalid
CAL_RESULT_NOT_SUPPORTED Function used properly but currently not supported
CAL_RESULT_ALREADY Stateful operation requested has already been performed
CAL_RESULT_NOT_INITIALIZED CAL function was called without CAL being initialized
CAL_RESULT_BAD_HANDLE A handle parameter is invalid
CAL_RESULT_BAD_NAME_TYPE A name parameter is invalid
CAL_RESULT_PENDING An asynchronous operation is still pending
CAL_RESULT_BUSY The resource in question is still in use
CAL_RESULT_WARNING Compiler generated a warning



0 Likes

marcr,

Thanks, I think I can get that by simply outputting the error string, which I have done; however, that doesn't go very far as to explaining what the "error string" means, which is what I was trying to ask to begin with, sorry if there was any confusion on that.

For example, "No error" is pretty self-explanatory and so are a lot of the others, but something like "Operational error" is very vague. What does that mean exactly?
0 Likes

I agree, some of them could be more descriptive. Actually, what's
probably needed is a section in each CAL function man page that
describes which conditions lead to certain error codes. I'll file
a request along those lines.

-- marcr

P.S.: did you see my response regarding the scatter code on the other thread?
0 Likes

marcr,

That would be great. In the meantime, could you tell me what "Operational Error" refers to? I mean, that could probably mean a thousand things.

Also, yes, I saw your post. It must be something that I am missing in the Properties, I will send the files as soon as I get in the lab, I wasn't in there today so I was going to wait to respond until I got in there. I will try to get in there tomorrow.
0 Likes


I'll ask around internally. Any particular function your interested in?
The same return value might have different meanings for different
functions. In fact, "operational error" is probably just a descriptor
for "error", i.e. the most generic form.

--marcr

0 Likes

marcr,

Thanks again. The "operational error" I am getting is coming back from calclCompile. There are quite a few things I haven't tried yet, so I'm not nearly at the end of my rope with that as I am with the scatter in Brook+, I was just curious if there was documentation that was more descript.

I know it's only in Beta version but it seems like there is still some confusion, even internally, as to what you can and can't do with the sdk. Personally, I don't like relying on forums and support all that much, I prefer to be able to read and figure things out from there (right now I just feel like I'm nagging you guys to death, since there is no real community for this sdk yet), it's just that the documentation is so limited, or vague, that doing so would take forever in these cases.

If I can, my main feature request is to make the documentation more thorough/detailed. This, to me, is more important than any other feature I can think of.
0 Likes

Ryta,
The operational error is a generic error for the compilation failed. There can be a few reasons why this is happening.
1) The number of registers used is too large and the compiler can't fit the shader onto a single simd.
2) An invalid opcode is being used
3) An invalid instruction format is being used.
There are other reasons but these seem to be the most common. One quick way to figure out if it is one of these items is to take your shader and plug it into GPU Shader Analyzer. Instead of compiling it to ISA, compile it to IL Assembly(Catalyst). It will start spitting out garbage when it hits invalid opcodes. It will use registers such as b#/i#/a# registers or state invalid opcode.

Hope this helps in debugging your compilation problems.
0 Likes

Thanks for the help.
0 Likes