View Issue Details

IDProjectCategoryView StatusLast Update
0001813NoesisGUIC++ SDKpublic2020-10-17 13:41
ReporterExt3hAssigned Tojsantos 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.0.6 
Target Version3.0.7Fixed in Version3.0.7 
Summary0001813: Use of deprecated texture2D() in OpenGL 3.1+ shaders
DescriptionIn NoesisGUI 3.0.4 you still got this right, and used `texture()` rather than deprecated `texture2D()` in your GLSL #140 code.

In 3.0.5 / 3.0.6, for an unknown reason, you started using `texture2D()` which is only available in explicit compatbility profiles, but not in standard, forward compatible profiles.
Steps To ReproduceTry to use your your 3.0.6 GLRenderDevice with an OpenGL 4.3 CORE context.
Depending on the driver (known to be broken on Intels Windows drivers), shader compilation will now fail:

[OpenGL] Error high : SHADER_ID_COMPILE error has been generated. GLSL compile failed for shader 24, "": ERROR: 2:442: 'function' : is removed in Forward Compatible context texture2D
ERROR: 2:442: 'texture2D' : no matching overloaded function found (using implicit conversion)
ERROR: 2:442: 'texture2D' : function is not known
ERROR: 2:441: '=' : cannot convert from 'const highp float' to '4-component vector of highp float'


2020.10.15 17:03:41:785 [NOESIS] Shader compilation failed: ERROR: 2:442: 'function' : is removed in Forward Compatible context texture2D
ERROR: 2:442: 'texture2D' : no matching overloaded function found (using implicit conversion)
ERROR: 2:442: 'texture2D' : function is not known
ERROR: 2:441: '=' : cannot convert from 'const highp float' to '4-component vector of highp float'
TagsOpenGL
PlatformAny

Activities

jsantos

jsantos

2020-10-17 12:16

manager   ~0006690

Last edited: 2020-10-17 12:18

View 2 revisions

Thanks for reporting this, in 3.0.5 we moved away from glsl-optimizer to handcrafted shaders for each version and using glslangValidator for validating. This allow us to generate more efficient shaders, but it seems glslangValidator is not complaining about using texture2D in #version 140 (I even tried #version 150 core) and there is no way to force that warning, I probably should report this.

jsantos

jsantos

2020-10-17 12:18

manager   ~0006691

Please, find attached the fix and let me know if everything is right. This will be available in the imminent 3.0.7.

Thanks for taking care

Shader.140.frag.h (15,949 bytes)
Ext3h

Ext3h

2020-10-17 13:27

reporter   ~0006692

Can't validate as I don't have access to an Intel iGPU system myself. Issue was reported by a consumer. I do expect the issue to be resolved though.
jsantos

jsantos

2020-10-17 13:41

manager   ~0006693

Unfortunately, all the machines we have here (including Intel integrated GPU - UHD Graphics 620 - ) render correctly with texture2D.

I am committing this change right now though.

Issue History

Date Modified Username Field Change
2020-10-17 10:28 Ext3h New Issue
2020-10-17 10:28 Ext3h Tag Attached: OpenGL
2020-10-17 10:37 Ext3h Steps to Reproduce Updated View Revisions
2020-10-17 10:38 Ext3h Description Updated View Revisions
2020-10-17 12:11 jsantos Assigned To => jsantos
2020-10-17 12:11 jsantos Status new => assigned
2020-10-17 12:11 jsantos Target Version => 3.0.7
2020-10-17 12:16 jsantos Note Added: 0006690
2020-10-17 12:18 jsantos File Added: Shader.140.frag.h
2020-10-17 12:18 jsantos Note Added: 0006691
2020-10-17 12:18 jsantos Status assigned => feedback
2020-10-17 12:18 jsantos Note Edited: 0006690 View Revisions
2020-10-17 13:27 Ext3h Note Added: 0006692
2020-10-17 13:27 Ext3h Status feedback => assigned
2020-10-17 13:41 jsantos Status assigned => resolved
2020-10-17 13:41 jsantos Resolution open => fixed
2020-10-17 13:41 jsantos Fixed in Version => 3.0.7
2020-10-17 13:41 jsantos Note Added: 0006693