Page MenuHome

Fix crash when compiling renderpass shader on some AMD drivers
ClosedPublic

Authored by Germano Cavalcante (mano-wii) on Feb 28 2020, 2:13 AM.

Details

Summary

The crash happens at any render that needs the e_data.postprocess_sh in eevee_renderpasses.c.
Sometimes all RGBA components are written and sometimes not. Therefore, always write on all components

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 6828
Build 6828: arc lint + arc unit

Event Timeline

Ankit Meel (ankitm) requested changes to this revision.EditedFeb 28 2020, 8:48 AM
This revision now requires changes to proceed.Feb 28 2020, 8:48 AM

I don't think this is the issue, but more likely an effect.
I would suggest that we look at why icon rendering uses post processing. Perhaps we just need to disable the depth render layer when rendering previews. I thought that the material previews uses the custom blend files. if we just disable the depth pass there it perhaps should fix the crash. I am not saying that that is the root cause, but it is just strange that AMD/Apple cannot draw using this shader, seems more likely a driver issue...

Without this patch, the shader does not compile and crashes in glGetProgramiv(shader->program, GL_LINK_STATUS, &status);

Please try after File > Defaults > load factory settings. Otherwise, it could be a fix for another bug, not the linked one. (or obviously as Jeroen said, symptom, not the problem)

I tried to clarify this on the report*. There are two ways to get the crash. Either viewport shading: material, or material properties. The latter can be mitigated by changing render engine to cycles once, back to eevee. The former is what I am trying to emphasise. It is permanent. (now that I am stuck in the middle of a older build process, I cannot test if this patch fixed the latter; sorry)
*: https://developer.blender.org/T74206#881878

Germano Cavalcante (mano-wii) retitled this revision from Fix T74206: Crashes when selecting Material Properties tab to Fix crash when compiling renderpass shader on some AMD drivers.Feb 28 2020, 11:40 AM
Ankit Meel (ankitm) resigned from this revision.Feb 28 2020, 11:41 AM
This revision now requires review to proceed.Feb 28 2020, 11:41 AM
  • write in all components
Jeroen Bakker (jbakker) added inline comments.
source/blender/draw/engines/eevee/shaders/renderpass_postprocess_frag.glsl
65

vec4(depth)

This revision is now accepted and ready to land.Mar 2 2020, 2:03 PM