DiscussionsIssue archiveOCCT:Visualization

Archived issue #0024345

TKOpenGl - GLSL compatibility issues on NV40 (GeForce 6xxx/7xxx)

Open CASCADEOCCT:Visualizationclosed5 public notes

Search issues

Description

GLSL Phong program compilation fails on NV40 due to hardware limits.
The reason is variable number of light sources used in Fragment shader.
0(215) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable


OpenGL info:
  GLvendor    = 'NVIDIA Corporation'
  GLdevice    = 'GeForce 6600 GT/PCIe/SSE2'
  GLversion   = '2.1.2'
  GLSLversion = '1.20 NVIDIA via Cg compiler'

Public activity

5 archived notes

Participants are labeled by their role within this record.

01Author
Patch is ready for review in CR24345 branch.

It seems change has negligible effect on performance (tested on RadeOn HD 6850).

restore [locate_data_file occ/Bottom.brep] b
restore [locate_data_file occ/Top.brep] t
tclean b
tclean t
vdefaults absDefl=0.002
vinit View1
vclear
vaxo vsetdispmode 1
vdisplay b t
vfit
vfps
vshaderprog phong
vfps
02Commenter 2
Dear Commenter 1,

The patch is reviewed without remarks.

Please test.
03Commenter 3
Dear Commenter 1,

Branch CR24345 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
[revision removed]

Number of compiler warnings:

occt component :
Linux: 318 (318 on master)
Windows: 0 (0 on master)

products component :
Linux: 188 (188 on master)
Windows: 287 (287 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 355879336 / 356024524
Total CPU difference: 43484.69000000019 / 42011.39000000042

Testing on Windows:
Total MEMORY difference: 411162152 / 410757816
Total CPU difference: 30141.953125 / 30177.1875

There are following differences in images found by testdiff.
Only on Linux platform:
http://occt-tests/CR24345-master-occt/Debian60-64/diff-Debian60-64.html
IMAGE v3d glsl phong_fuse2: phong_fuse2_ph2.png differs
IMAGE v3d glsl phong_fuse2: phong_fuse2_ph1.png differs
IMAGE v3d glsl phong_fuse2: phong_fuse2.png differs
IMAGE v3d glsl phong_fuse: phong_fuse2_ph2.png differs
IMAGE v3d glsl phong_fuse: phong_fuse2_ph1.png differs
IMAGE v3d glsl phong_fuse: phong_fuse2.png differs
04Author
OpenGL info:
  GLvendor    = 'Brian Paul'
  GLdevice    = 'Mesa X11'
  GLversion   = '2.1 Mesa 9.1'
  GLSLversion = '1.20'
  GLdebug     =  ON

Dear Commenter 1, it looks like a bug in Mesa on Linux.

Could you please evaluate patch (only v3d/glsl/phong_fuse2 test case) on more recent Mesa release?
05Author
OpenGL info:
  GLvendor    = 'X.Org'
  GLdevice    = 'Gallium 0.4 on AMD BARTS'
  GLversion   = '3.0 Mesa 9.1.7'
  GLSLversion = '1.30'
  GLdebug     =  ON

Tested on RadeOn HD 6850 (Ubuntu 13.04 AMD64, hardware accelerated Mesa) - there no such issues.
Cumulative patch, containing all recent GLSL fixed has been pushed to CR24345_1 branch.

Related records