View Issue Details

IDProjectCategoryView StatusLast Update
0002357NoesisGUIC++ SDKpublic2022-06-08 13:43
Reporterjack.barkov Assigned Tojsantos  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.1.4 
Target Version3.1.5Fixed in Version3.1.5 
Summary0002357: Intel(R) HD Graphics - GL 3.1.0 - Crash
DescriptionFrom forum topic: https://www.noesisengine.com/forums/viewtopic.php?t=2625

There is an error starting noesis with some computers that use OpenGL 3.1.

The error in question is:
"Link program failed: Interpolation of color does not match in vertex and fragment shaders."
File: noesis-gui\Src\Packages\Render\GLRenderDevice\Src\GLRenderDevice.cpp
Line: 2264

This happens with some hardware, and they all get the exact same error...

These are the computers I tested:
GL Renderer: Intel(R) HD Graphics - GL Version: 3.1.0 - Build 8.15.10.2696
GL Renderer: Intel(R) HD Graphics - GL Version: 3.1.0 - Build 9.17.10.3517
GL Renderer: Intel(R) HD Graphics - GL Version: 3.1.0 - Build 9.17.10.4229
GL Renderer: Intel(R) HD Graphics - GL Version: 3.1.0 - Build 9.17.10.4459
GL Renderer: Intel(R) HD Graphics Family - GL Version: 3.1.0 - Build 8.15.10.2538
GL Renderer: Intel(R) HD Graphics Family - GL Version: 3.1.0 - Build 8.15.10.2559
GL Renderer: Intel(R) HD Graphics 2000 - GL Version: 3.1.0 - Build 9.17.10.4229
GL Renderer: Intel(R) HD Graphics 2000 - GL Version: 3.1.0 - Build 9.17.10.4459
GL Renderer: Intel(R) HD Graphics 3000 - GL Version: 3.1.0 - Build 9.17.10.2843
GL Renderer: Intel(R) HD Graphics 3000 - GL Version: 3.1.0 - Build 9.17.10.3517
GL Renderer: Intel(R) HD Graphics 3000 - GL Version: 3.1.0 - Build 9.17.10.4229
GL Renderer: Intel(R) HD Graphics 3000 - GL Version: 3.1.0 - Build 9.17.10.4459
GL Renderer: Intel(R) HD Graphics 4000 - GL Version: 3.1.0 - Build 8.15.10.2712
As you can see, they are all OpenGL 3.1.0, and they are integrated cards from Intel.

In the tests were used: Windows 7 and Windows 10.
TagsNo tags attached.
PlatformWindows

Activities

jack.barkov

jack.barkov

2022-06-07 14:31

reporter  

jsantos

jsantos

2022-06-07 14:54

manager   ~0007956

Last edited: 2022-06-07 14:55

One quick question, does removing the 'flat' modifier from both vertex and fragment shaders fix the linker error on your machines?
jack.barkov

jack.barkov

2022-06-07 15:16

reporter   ~0007957

Yes, removing all "flat" from shaders 140, the crash stops happening.

I have a crashing computer available with AnyDesk with Noesis and VS available.

If you want to access it, just let me know and I'll send you anydesk credentials.
jack.barkov

jack.barkov

2022-06-07 15:25

reporter   ~0007958

I got another crash on the same hardware, I remove the "flat" from shaders, and when I open the Gallery, Media and Brushes, a new crash without stacktrace happens.
gallery - brushes - crash.png (261,875 bytes)   
gallery - brushes - crash.png (261,875 bytes)   
jsantos

jsantos

2022-06-07 16:01

manager   ~0007959

Thanks for the offer for AnyDesk. I need to investigate a few things before.

If you remove the "flat" keyword only for the fragment shader, does the linking error message disappear?

Regarding the second crash, could you please check buildig everything in Debug?
jack.barkov

jack.barkov

2022-06-07 16:24

reporter   ~0007960

I removed the flat from fragment shader only, and crashs continues.

If you want to check, this computer is dedicated for you test now.

Anydesk ID: 514 240 482
Password: jsantos*

Thanks.
jsantos

jsantos

2022-06-08 10:41

manager   ~0007961

I am connecting to the computer right now! Thank you!
jsantos

jsantos

2022-06-08 11:51

manager   ~0007962

Last edited: 2022-06-08 11:51

Thanks for your help, I fixed the compiler error for the next version. This is the patch:

Index: Shader.140.frag
===================================================================
--- Shader.140.frag	(revision 11338)
+++ Shader.140.frag	(working copy)
@@ -189,8 +189,7 @@
         fragColor = mix(texture(image, uv1), texture(shadow, uv1), cbuffer1_ps[0]) * (opacity_ * paint.a);
 
     #elif defined(EFFECT_SDF)
-        vec4 color = texture(glyphs, uv1);
-        float distance = SDF_SCALE * (color.r - SDF_BIAS);
+        float distance = SDF_SCALE * (texture(glyphs, uv1).r - SDF_BIAS);
         vec2 grad = dFdx(st1);
 
         float gradLen = length(grad);

jsantos

jsantos

2022-06-08 11:56

manager   ~0007963

Last edited: 2022-06-08 11:56

The crash in the gallery is really weird and there is definitely something wrong in the intel drivers.

The problem is with the ConicGradientBrushShader, I just simplified to something like this:

static  const char* GLSL_CONIC =
R"(
    //float T(int n)
    //{
    //    return cbuffer1_ps[4 + 8 * n];
    //}

    vec4 GetCustomPattern()
    {
        return vec4(1);
    }
)";

And it works, but if I comment out the T() function the driver crashes (although T() is unused).

I haven't found an easy workaround for this, so for now, we are not going to fix it, as this is not part of core.
jack.barkov

jack.barkov

2022-06-08 13:26

reporter   ~0007964

The shader related fix worked.
I just tested it and everything seems correct.

opengl has some weird things that are hard to explain...

About the gallery problem, it seems to be a driver problem.

Thanks for the quick correction.
jsantos

jsantos

2022-06-08 13:43

manager   ~0007965

Thanks a lot for your help!

Issue History

Date Modified Username Field Change
2022-06-07 14:31 jack.barkov New Issue
2022-06-07 14:31 jack.barkov File Added: glewinfo - IHD 3000 - GL 3.1.0.txt.7z
2022-06-07 14:53 jsantos Assigned To => jsantos
2022-06-07 14:53 jsantos Status new => assigned
2022-06-07 14:54 jsantos Target Version => 3.1.5
2022-06-07 14:54 jsantos Note Added: 0007956
2022-06-07 14:54 jsantos Status assigned => feedback
2022-06-07 14:55 jsantos Note Edited: 0007956
2022-06-07 14:55 jsantos Note Edited: 0007956
2022-06-07 15:16 jack.barkov Note Added: 0007957
2022-06-07 15:16 jack.barkov Status feedback => assigned
2022-06-07 15:25 jack.barkov Note Added: 0007958
2022-06-07 15:25 jack.barkov File Added: gallery - brushes - crash.png
2022-06-07 16:01 jsantos Note Added: 0007959
2022-06-07 16:01 jsantos Status assigned => feedback
2022-06-07 16:24 jack.barkov Note Added: 0007960
2022-06-07 16:24 jack.barkov Status feedback => assigned
2022-06-08 10:41 jsantos Note Added: 0007961
2022-06-08 11:51 jsantos Note Added: 0007962
2022-06-08 11:51 jsantos Note Edited: 0007962
2022-06-08 11:56 jsantos Note Added: 0007963
2022-06-08 11:56 jsantos Note Edited: 0007963
2022-06-08 11:56 jsantos Status assigned => feedback
2022-06-08 13:26 jack.barkov Note Added: 0007964
2022-06-08 13:26 jack.barkov Status feedback => assigned
2022-06-08 13:43 jsantos Status assigned => resolved
2022-06-08 13:43 jsantos Resolution open => fixed
2022-06-08 13:43 jsantos Fixed in Version => 3.1.5
2022-06-08 13:43 jsantos Note Added: 0007965