Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Shader compilation crash with AMD GPU

Hi folks,

I'm experiencing crashes during shader compilation for LightShaftOcclusion/RadialBlur on Linux when using an AMD GPU. From the log I get:

 [0m [31m[2017.12.08-12.29.43:941][  2]LogRHI: Error: Failed to link program. Compile log:
 error: vertex shader output `out_TEXCOORD0' specifies noperspective interpolation qualifier, but fragment shader input specifies no interpolation qualifier

I would guess it originated to either line 50 or 62 in the attached shader source. On another linux system with a nVidia GPU I can not reproduce this issue.

 #0 raise()
 #1 FLinuxPlatformMisc::DebugBreak()
 #2 FOpenGLDynamicRHI::RHICreateBoundShaderState()
 #3 RHICreateBoundShaderState()
 #4 IRHICommandContext::RHISetGraphicsPipelineState()
 #5 FRHICommandList::SetGraphicsPipelineState()
 #6 SetGraphicsPipelineState()
 #7 ApplyRadialBlurPasses()
 #8 FDeferredShadingSceneRenderer::RenderLightShaftOcclusion()
 #9 FDeferredShadingSceneRenderer::Render()
 #10 RenderViewFamily_RenderThread()
 #11 FRendererModule::BeginRenderingViewFamily(FCanvas*, FSceneViewFamily*)::EURCMacro_FDrawSceneCommand::DoTask(ENamedThreads::Type, TRefCountPtr<FGraphEvent> const&)()
 #12 TGraphTask<FRendererModule::BeginRenderingViewFamily(FCanvas*, FSceneViewFamily*)::EURCMacro_FDrawSceneCommand>::ExecuteTask(TArray<FBaseGraphTask*, FDefaultAllocator>&, ENamedThreads::Type)()
 #13 FBaseGraphTask::Execute()
 #14 FNamedTaskThread::ProcessTasksNamedThread()
 #15 FNamedTaskThread::ProcessTasksUntilQuit()
 #16 FTaskGraphImplementation::ProcessThreadUntilRequestReturn()
 #17 RenderingThreadMain()
 #18 FRenderingThread::Run()
 #19 FRunnableThreadPThread::Run()
 #20 FRunnableThreadPThread::_ThreadProc()

Looking at this callstack I suppose this is still the same issue I already had on 4.16 with a less verbose log. I would be great to get any hints how I can make this shader work for OpenGL on Linux with an AMD GPU.

Product Version: UE 4.17
call-stack.txt (2.6 kB)
more ▼

asked Dec 08 '17 at 01:38 PM in Linux

avatar image

j.mueller RFG
304 3 10 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first


Thanks for the report. It looks like this is a known issue with some of the shaders. I will update our tracking system with reference to this specific shader to make sure it is not missed in any of the fixes.

There is already a pull request found here https://github.com/EpicGames/UnrealEngine/pull/4080 to fix this issue for one specific shader and you should be able to adapt this to create a work around for other shaders you have issues with until a fix is released.

Overall the reason this works on nvidia but not amd looks like a potential miss interpretation between the GLSL 430 spec in the driver's compiler. The following link may be related to why the miss-interpretation in the spec: https://github.com/KhronosGroup/OpenGL-API/issues/10

more ▼

answered Dec 13 '17 at 11:57 AM

avatar image

0x414e54 STAFF
66 2 4 5

avatar image j.mueller RFG Dec 13 '17 at 05:42 PM

Thanks a lot for your reply. Please be aware that a copy of this thread exists on UDN as I did not expected this to be answered here soon anymore and also did not make notable progress myself on this issue. I'm sorry if this should have lead to confusion. Please feel free to merge the threads if you like.

When I try to fix the LightShaftShader by adding noperspective qualifiers to the TEXCOORD0 params I'm experiencing system freezes, possibly caused by the same reasons as the issue I linked in the original question. I attached a glxinfo output to provide some insight to the hardware and drivers used on the development system. Strange enough, several of our customers report that the game is working for them with Linux and AMD GPU, although we don't support it officially due to this issue. So this also seems not to be a general problem with AMD cards or MESA drivers.

glxinfo.txt (103.4 kB)
avatar image 0x414e54 STAFF Dec 13 '17 at 06:09 PM

It's okay, as anyone using the github source on Linux will still come up against this issue and be able to find it here.

There will potentially be a difference between the way the compiler works on different AMD cards or different Linux setups as there are at least 3 different AMD drivers in use, AMDGPU-PRO, fglrx, radeonsi. So it may work on systems running AMDGPU-PRO (downloaded from AMD) but not radeonsi (the open source mesa based drivers) as they may interpret the spec differently.

avatar image 0x414e54 STAFF Jan 02 '18 at 10:55 AM

In regard to your system freeze:

Taking a look at your glxinfo I see you are currently running on the Mesa AMD drivers. Unfortunately whilst we will fix issues where we can, we currently do not support non-official drivers on Linux. If you could try again with the official AMD drivers downloaded from here http://support.amd.com/en-us/download/linux

If you continue to have the system freeze issue with the proprietary drivers please resubmit a new issue.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question