Polyline Jitter on Intel Arc (zizgags)

Hi All,

We have noticed an issue affecting our users on Intel Arc on windows that seems very similar to an older issue that affected Apple Silicon a couple of years back.

That is, polylines that are meant to be relatively straight, render as jagged zigzag lines.

These are meant to be straight lines for example:

We have some Intel Arc hardware to hand and can confirm that this sandcastle shows the bug on intel arc, but not other GPUs.

This is very very similar to #9417 , and we have found that modifying czm_translateRelativeToEye works around some instances (but not all) of this bug… so pointing as some kind of shader miscompile on this stack.

// Essentially we are replacing this miscompiling code on windows/Intel arc:
vec4 czm_translateRelativeToEye(vec3 high, vec3 low)
{
    vec3 highDifference = high - czm_encodedCameraPositionMCHigh;
    if (length(highDifference) == 0.0) { highDifference = vec3(0); }
    vec3 lowDifference = low - czm_encodedCameraPositionMCLow;
    return vec4(highDifference + lowDifference, 1.0);
}

// With this workaround (it works around the faulty fusion):

vec4 czm_translateRelativeToEye(vec3 high, vec3 low){
    vec3 highDifference = high - czm_encodedCameraPositionMCHigh;
    if (length(highDifference) == 0.0) { highDifference = vec3(0.0); }
    vec3 lowDifference = mat3(1.0) * (low - czm_encodedCameraPositionMCLow);
    return vec4(highDifference + lowDifference, 1.0);
}

Does anyone on the forum or the Cesium team know how this issue was resolved in the earlier Apple Silicon case ?

Best Regards,
Jason McSweeney

2 Likes

Hi @Jason_McSweeney,

Thanks for the post and welcome to the community! I’m not sure what to make of this bug off the bat - it’s obviously very specific, and I don’t personally have experience with the earlier Apple Silicon issue.

I’ll ask folks when they’re back in office on Monday if anyone has recalls that issue or has any guidance on where to start here.

Best,
Matt

Is that screen shot above from the sandcastle? When I look at the sandcastle on my M-series apple gpu, I see a somewhat jagged line, but I’m unsure if it’s what you’re talking about:

Thanks for responding @mzschwartz5

Sorry, no, the screenshot was from one of our users, Bad on the sandcastle on Intel Arc looks like so: (sorry for potato quality)

(Its meant to look smooth like the ‘good’ version (like in your post) ), but it wobbles and zigzags around between verts.

I do have an issue in the github about this as well if you want to talk there.

I have the hw to hand now and have some ideas about what may be causing this (over optimization in shaders) and can help out a bit with testing and debugging, but it would be great to collaborate to solve this (or at least to get intel to solve it)

2 Likes