Search Unity

compute shader "internal error: no storage type for block output"

Discussion in 'Shaders' started by gaiastellar, Nov 14, 2020.

  1. gaiastellar

    gaiastellar

    Joined:
    Nov 8, 2013
    Posts:
    57
    im writing a compute shader to process noise. Its working no problem, except... - i have a bunch of int and float variables in the shader that i initialise from the cpu side with setfloat(). That works fine, but if use more than 4 of thise variables in the actual thread - it throws this error.
    any ideas anyone?

    thanks
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    Hi!
    Can you please paste the full error here?
     
  3. gaiastellar

    gaiastellar

    Joined:
    Nov 8, 2013
    Posts:
    57
    hi yes thanks...
    for a bit of background, im using a .cginc noise library called FastNoiseLite, which works fine. The noise function has various attributes i can set within the compute shader:

    fnl_state mynoise = CustomfnlCreateState(1337, 0.02f, 1,0,1); // this works fine

    I can import these values as a structured buffer 'settings' . If i only use 4 of these values (there are 5 values in my function) in the main kernel it works fine, but if i use more than 4 it throws the error below. it also does it with ints or a mixture of floats and ints. ive tried just setting individual floats, arrays of floats, ive used floats to do very simple things as a test, and it does the same thing. i can only use 4 floats/ints for anything, and no more. I can declare as many as i like, but if use more than 4, it throws the error. example below:

    fnl_state mynoise = CustomfnlCreateState(settings[0], settings[1], settings[2], settings[3], 1) // THIS WORKS

    fnl_state mynoise = CustomfnlCreateState(settings[0], settings[1], settings[2], settings[3], settings[4]) // THIS DOESNT WORK

    ive tested it extensively to make sure its not something ive done wrong, and im sure its not.

    the error is:

    Shader error in 'planetnoise.compute': Compilation failed for kernel 'NoiseTest' [0x80004005 - unknown error] 'internal error: no storage type for block output

    i hope that all makes sense

    thanks
     
  4. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    In this case I would suggest reporting a bug.