Corange icon indicating copy to clipboard operation
Corange copied to clipboard

Notice: Mesa - R600 - NIR - TGSI - translation from TGSI failed

Open blogdron opened this issue 2 years ago • 0 comments

This is just a note for those who will be affected by the problem like mine. This is not Corange problem.
But it's better to know about it.

The problem is described here:

  • https://gitlab.freedesktop.org/mesa/mesa/-/issues/7780

I will only briefly summarize the main. If you come across artifacts and graphics options like in graphics.cfg lighting = 1 and while in the terminal you see the following lines

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

it means the shader is working now assets_core/shaders/deferred/compose.fs

4 fix options

  • 1 Fix shader
#version 120
-#define MAX_LIGHTS 32
+#define MAX_LIGHTS 8

or

-#version 120
+#version 130
#define MAX_LIGHTS 32
  • 2 Use NIR backend
$export R600_DEBUG=nir
$run_corange_app
  • 3 Wait update MESA with NIR by default

  • 4 Set in graphics.cfg lighting = 0 for use assets_core/shaders/deferred/compose_low.fs Notice: shadows not working with lighting = 0 and again wait update mesa


I hope this will be useful to know and someone will be protected from tedious debugging like me :smiley:

blogdron avatar Nov 27 '22 13:11 blogdron