Search Unity

Interlocked operations not supported ?!

Discussion in 'Shaders' started by supermtf20, Oct 29, 2014.

  1. supermtf20

    supermtf20

    Joined:
    Oct 29, 2014
    Posts:
    5
    Hi everybody,

    I'm porting a HLSL shader code to unity. The problem is that when I use functions like InterlockedMax()


    I get the following error:

    ps_4_0 does not support interlocked operations

    I've made sure that DX11 is selected in the player settings and my video card is GTX 650 which I'm sure supports shader model 5. Any Idea?
     
  2. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Looks like you have not set the target in the shader. It defaults to SM4 if dx11 is enabled but no target is set.

    You will have to set the target to SM5 in the shader.
     
  3. supermtf20

    supermtf20

    Joined:
    Oct 29, 2014
    Posts:
    5
    Thanks, scrawk. This worked like charm.

    Never knew it defaults to SM4.

    Thanks again, dude.