cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

roddomi
Journeyman III

Error compiling il_cs_2_0 kernel

Hello,

I am trying to learn IL and I wrote a small program that compiles an empty kernel:

il_cs_2_0

end

When I get to calclCompile it returns CAL_RESULT_ERROR. When I try to get more information using calGetErrorString it returns "No Error"! If I change the shader to a pixel shader (il_ps_2_0) then it works fine. What's the problem? Is it wrong to compile an empty cs kernel?

I have an ATI 5870 and my info.target = CAL_TARGET_CYPRESS.

Thank you.

0 Likes
5 Replies
roddomi
Journeyman III

OK. I think I figured it out. dcl_num_thread_per_group seems to be mandatory.

0 Likes

roddomi,
This is correct. The reason being is that in order to calculate resources for local memory usage, the number of threads per group needs to be known.
0 Likes

Hi Micah,

So how do you declare 'dcl_num_thread_per_group' when it is unknown at compile time? Or when it changes between multiple shader invocations? Do you use a default?

Thank you.

0 Likes

roddomi,
Either recompile for each group size or use the token dcl_max_thread_per_group to specify the largest possible size that the kernel will execute.
0 Likes
soufsoufs
Journeyman III

Hi roddomi,

can you tell me how do you compile an IL kernel?

thank you for help

0 Likes