Hey,
I built a shader via Unity (written in HLSL) and made an Android build on a OnePlus 7T with Adreno 640. One of my shaders crash, saying:
if (abs(endPoint.value.x - controlPoint.x) < 0.001 || abs(endPoint.value.x - startPoint.x) < 0.001) { endPoint.value.x += 10 * 0.001; }
endPoint.value.x += 10 * 0.001 * (abs(startPoint.x - controlPoint.x) < 0.001 || abs(controlPoint.x - startPoint.x) < 0.001);
Seems to compile just fine. I simply moved the condition into the addition as a factor.
(startPoint, controlPoint are float2, endPoint is: struct { float2 value; int a; }; )
I get this crash elsewhere too and have yet to fully understand the pattern. What is `PSEUDOIMUL32` and why do I get it in my compilation?
Edit: I managed to find a horrible workaround by changing all the code which was used to calculate the final value of `endPoint` from using `if` statements to using lerp(X, Y, B) where B is either 0 or 1 and X and Y were the two possible return values in the previous implementation. Maybe this provides a clue?
This is my Andreno data as reported by Andreno-VK-0, if that helps:
AdrenoVK-0 QUALCOMM build : 2f950bf, I802c3b73eb
I can provide a binary generated in "shader-playground" if that helps, but I don't know what values to set for the:
target_profile, optimization level, extra options, (output format I assume is SPIR-V) and SPRI-V target.