Hello, during the game development process, we encountered occasional crashes. The gpudump showed that the crash occurred in the ApplyContrast function of the SlateElementPixelShader. However, we were unable to identify the specific cause of the crash.
重现步骤
[Image Removed]
Hi there,
Looking at your crash dump IL in Nsight, it looks like the instruction that is causing the crash is actually a loadInput op (red x). The next instruction that would have been executed (yellow arrow), is just after the first usage of the loaded value.
Since load results / blocking on load is deferred until first usage, this means the error is actually coming from the data coming in, and being interpolated, from your vertex shader.
The specific input that the shader seems to be crashing on is the Color field in the VertexToPixelInterpolants struct.[Image Removed]
Some things you might want to check are:
- Do you have any shader code changes to SlateShaderCommon.ush, specifically in the VertexToPixelInterpolants struct that might make the vertex and pixel shader output / input definitions mismatch.
- Do you have any shader code changes to SlateVertexShader.usf that changes the return type of Main, or anything else that might change the output interpolants structure somehow.
- Do you have any widgets that use materials with multiple texture coordinate references? This changes the VertexToPixelInterpolants struct, depending on how many extra texture coordinates you are using in the material (though it should still match between the vertex and pixel shader, so in theory this shouldn’t be an issue).
- Do you have any custom slate code that might be supplying the incorrect vertex data, which might get pushed through to the pixel shader before crashing (seems unlikely, but possible).
I can’t reproduce this issue locally, so I would need a minimal reproduction project to do any further investigation on my end.
Regards,
Lance Chaney
Thank you for your reply. We did not modify SlateShaderCommon.ush and SlateVertexShader.usf. For this issue, we are currently unable to reproduce it either.
Unfortunately, without a reproduction project, or additional information regarding how this issue might be reproduced, we can’t really assist any further.
If you can create a minimal reproduction project, or provide steps to reproduce the issue then we can re-open this ticket.
Regards,
Lance Chaney