Jump to content

[v2.1.1] error: #extension directive is not allowed in the middle of a shader


photo

Recommended Posts

HI there!

We are having troubles getting the desired hardware to use in our currents and previous proyects due to the sortage of nVidia graphic cards.

Because that we're testing new hardware and currently a very promising one is the plataform Intel nuc with Ubuntu 20.04.3.

We have got run the benchmark Valley with the desired screen resolution and graphics settinngs at 50fps so the platform has the capabilities of run Unigine smooth, but when we try to run our simulation we are getting the error pointed in the title of the post. We had started to test our early protects because is quite well spread within our clients and if we need to do some support, we need som quick solution and the Intel nuc platform is a good point for that. But to work with those projects we need to down to the v2.1.1 of Unigine, this is because this version is marked in the title of the post.

I have attached a couple of pics with the specs of the plataform we are testing. The more remarkable point of the platform is that it uses an Intel Iris Xe Graphics adapter.

Also I hace attached the output of the simulator running in QT.

As you can see when the renderer must start to draw something (after the "STARTING" echos) it start to report errors which we had never seen before:

GLShader::loadFragment(): error in "core/shaders/terrain/fragment/depth.frag" file
defines: INTEL,QUALITY_LOW,QUALITY_MEDIUM,QUALITY_HIGH,USE_TESSELLATION,USE_ALPHA_FADE,USE_REFLECTION,USE_PARALLAX,USE_EXPOSURE_LOGARITHMIC,USE_FILMIC,USE_DECALS,USE_SURFACE_LIGHT_MAP,USE_SURFACE_AO,USE_ENVIRONMENT,USE_HAZE_SCATTERING,USE_HAZE,USE_RW_TEXTURES,USE_HIGHQUALITY_MOTIONBLUR,OPENGL,SHADING_LANGUAGE=460,USE_ARB_SAMPLE_SHADING,USE_ARB_SHADER_IMAGE_LOAD_STORE,BASE_SHADOW,BLEND_SRC_FUNC_NONE,BLEND_DEST_FUNC_NONE,PATCH
0:858(1): error: #extension directive is not allowed in the middle of a shader

The file which is referred is different in some of the errors reported.

Here ar the list of files:

GLShader::loadFragment(): error in "common/shaders/post/fragment_post_black.shader" file
GLShader::loadFragment(): error in "core/shaders/decal/fragment/deferred.frag" file
GLShader::loadFragment(): error in "core/shaders/default/post/fragment_filter_sobel.shader" file
GLShader::loadFragment(): error in "core/shaders/default/render/fragment_copy_2d.shader" file
GLShader::loadFragment(): error in "core/shaders/default/render/fragment_dof_blur.shader" file
GLShader::loadFragment(): error in "core/shaders/default/render/fragment_dof_sample.shader" file
GLShader::loadFragment(): error in "core/shaders/default/render/fragment_hdr_blur.shader" file
GLShader::loadFragment(): error in "core/shaders/default/render/fragment_hdr_cross.shader" file
GLShader::loadFragment(): error in "core/shaders/default/render/fragment_hdr_shaft.shader" file
GLShader::loadFragment(): error in "core/shaders/default/render/fragment_query_deferred.shader" file
GLShader::loadFragment(): error in "core/shaders/mesh/fragment/auxiliary.frag" file
GLShader::loadFragment(): error in "core/shaders/mesh/fragment/depth.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/environment/environment.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/environment/scattering_lut.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/exposure/fragment/average.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/exposure/fragment/luminance.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/exposure/fragment/luminance.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/exposure/fragment/normalize.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/exposure/fragment/normalize.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/exposure/fragment/scale.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/exposure/fragment/scale.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/fragment/bloom_blur.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/fragment/bloom_composite.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/fragment/composite.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/fragment/lens_flare.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/fragment/light/deferred_prob.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/fragment/render_bright.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/fragment/render_deferred.frag" file
GLShader::loadFragment(): error in "core/shaders/screen_space/fragment/shadow_shafts.frag" file
GLShader::loadFragment(): error in "core/shaders/sky/fragment/shadow.frag" file
GLShader::loadFragment(): error in "core/shaders/sky/fragment/sphere.frag" file
GLShader::loadFragment(): error in "core/shaders/stem/fragment/depth.frag" file
GLShader::loadFragment(): error in "core/shaders/stem/fragment/leaf_auxiliary.frag" file
GLShader::loadFragment(): error in "core/shaders/stem/fragment/leaf_deferred.frag" file
GLShader::loadFragment(): error in "core/shaders/stem/fragment/stem_deferred.frag" file
GLShader::loadFragment(): error in "core/shaders/terrain/fragment/auxiliary.frag" file
GLShader::loadFragment(): error in "core/shaders/terrain/fragment/deferred.frag" file
GLShader::loadFragment(): error in "core/shaders/terrain/fragment/depth.frag" file
GLShader::loadFragment(): error in "core/shaders/volume/fragment/fog/box_ambient.frag" file
 

I reviwed one of those  files (core/shaders/mesh/fragment/depth.frag) and it have the include of the file fragment.h

This file include the line ##extension GL_ARB_sample_shading : enable and this doble pad/hashtag have something wierd.

I don't know why we are getting those errors if the bechmark can run without any issue.

Could you give me some help?

Thanks.

IMG_20211130_120309.jpg

IMG_20211130_120344.jpg

SimulatorOutput.txt

Link to comment

Gmarquez

Old versions of UNIGINE has only proper support for proprietary AMD / nVidia drivers. Benchmarks are working fine because of the driver workarounds that Mesa devs implemented. Probably everything will work fine if you will rename your app executable name to valley_x64 / heaven_x64.

Also benchmarks that are showing 50 fps were built on UNIGINE 1 (2013) and has less features and different shaders code, so in your application there is no guarantee that you will have any stable FPS with Intel and Mesa drivers after all.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

The actual fix is quite easy, just move 

##extension GL_ARB_sample_shading : enable

from data/core/shaders/default/common/fragment_base.h to data/core/shaders/default/common/common_base.h.

Put it after ##extension GL_ARB_gpu_shader5 : enable line. The file paths maybe slightly different, but the idea will remain the same.

But as I said before - no guarantees that Mesa driver can give you any stable performance with Intel GPUs.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
×
×
  • Create New...