godot: Grey rendering on Mesa/Radeon r600 (Translation from TGSI failed)

Operating system or device - Godot version: ubuntu + arch, Godot master Card AMD Radeon 7500M/7600M

Issue description: There is no lighting in the editor

Steps to reproduce: Export mesh, open mesh, either dae or scene files

Link to minimal example project: screenshot_20170509_221224


Bugsquad edit: Same issue on AMD Radeon 6670, see #8774

Everything 3D is rendered grey and the terminal shows a lot of this errors:

EE ../../../../../src/gallium/drivers/r600/r600_shader.c:183 r600_pipe_shader_create - translation from TGSI failed !
EE ../../../../../src/gallium/drivers/r600/r600_state_common.c:800 r600_shader_select - Failed to build shader variant (type=1) -1

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 28 (19 by maintainers)

Most upvoted comments

For those who know how to patch and build mesa, these patches, solved the problem for me. You also have to set MESA_GLSL_TO_TGSI_NEW_MERGE and clean mesa’s shaders cache to make it work.

Let’s close as fixed by Mesa 17.3 then.

I can confirm that is fixed in 17.3

This should be fixed in mesa 17.3. The patch is in mesa git now. https://bugs.freedesktop.org/show_bug.cgi?id=99349#c19

@johannesgunnar This guide explains how to build and run Mesa. https://www.gamingonlinux.com/wiki/Building_Mesa_from_source. Then you can use this script to run godot:

#!/bin/sh
export LD_LIBRARY_PATH=/opt/mesa-master/x86_64:$LD_LIBRARY_PATH
export LIBGL_DRIVERS_PATH=/opt/mesa-master/x86_64
export EGL_DRIVERS_PATH=/opt/mesa-master/x86_64
export MESA_GLSL_TO_TGSI_NEW_MERGE=1
export MESA_GLSL_CACHE_DISABLE=1
~/godot/bin/godot.x11.tools.64 "$@"

@Gibbz I don’t think they merged the patch yet.

In the mean time there is a rebased version: https://github.com/gerddie/mesa/tree/regrename-v8

I believe this bug is fixed in the 17.2 mesa release coming this month?

On 6 Aug. 2017 7:06 am, “Jóhannes Gunnar Þorsteinsson” < notifications@github.com> wrote:

Successfully built the regrename-v7 https://github.com/gerddie/mesa/tree/regrename-v7 branch (I hope) and set the MESA_GLSL_TO_TGSI_NEW_MERGE env variable. (should it just be empty? or set to true? tried both without luck) and no change. Same errors.

Did the usual ./configure, make and sudo make install with regrename-v7 like mentioned in the mesa docs but no luck. Am I missing a step? Is there any way for me to double check if the correct version of Mesa is running?

Are these questions perhaps better suited for the discussion on this bug at the mesa mailing list?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/8700#issuecomment-320471747, or mute the thread https://github.com/notifications/unsubscribe-auth/AAntCozyo6i6m_1ypHZqs0zX3GRcHtSKks5sVOB6gaJpZM4NVQ0s .

@johannesgunnar Mesa currently fails to build certain types of shaders on r600. The only thing you can do now is to build this branch https://github.com/gerddie/mesa/tree/regrename-v7 which contains patches that improve the estimation of registers life-time, thus making mesa able to build shaders with less registers.