sgx530 fails to compile shader – works on others.

This topic contains 0 replies, has 1 voice, and was last updated by  tiggersgi 5 years, 11 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #30734

    tiggersgi
    Member

    Hi,

    I have this shader code.

    if (lit != true){

    highp vec4 sce= texture2D(inSampler0, vec2(swd.s – offset, swd.t – offset));

    if (dot(swd.xyzw,ndm) > nd) lum+= 1.0;

    sce= texture2D(inSampler0, vec2(swd.s, swd.t – offset));

    if (dot(swd.xyzw,ndm) > nd) lum+= 1.0;

    sce= texture2D(inSampler0, vec2(swd.s + offset, swd.t – offset));

    if (dot(swd.xyzw,ndm) > nd) lum+= 1.0;

    sce= texture2D(inSampler0, vec2(swd.s – offset, swd.t));

    if (dot(swd.xyzw,ndm) > nd) lum+= 1.0;     

    >Any More of the above will fail on the Motorola defys sgx530<

    }

    I’m sampling for a PCF filter so do the above quite a few times. the problem is the condition, on

    every other device I tested sgx540,sgx535,Adreno 220,Tegra2 across quite a few devices (6 + PC) I can have as many texture reads as I want inside that condition.

    If ran on my defys SGX530 the following compile error happens

    “Calls to any function that may require a gradient calculation inside a conditional block may return undefined results” – remove the condition and I can sample as many as I want but add the condition

    then more than 4 will give me that error but only on the defy’s sgx530 – I dont have another sgx530

    device to test with.

    As I said works fine on all my other devices, so I’m edging to the defys compiler – but would like

    to know if I’ve missed anything in the code.

    I’ve tried many ways to get it to compile (functions, different paths etc) all attempts work fine on the others but as soon as that condition block – defy wont compile.

    Would love a suggestion 🙂

    Cheers

Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.