View Issue Details

IDProjectCategoryView StatusLast Update
0027735Open CASCADEOCCT:Visualizationpublic2016-12-09 16:38
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.9.0 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027735: Visualization, OpenGl_ShaderManager - fix clipping state management
DescriptionThere are several issues within clipping state tracking in OpenGl_ShaderManager:
- OpenGl_ShaderManager::UpdateClippingState() and ::RevertClippingState() are called asymmetrically leading to unlimited growth of clipping state stack and thus memory leak.
- OpenGl_CappingAlgo::RenderCapping() alters clipping plane list without updating clipping state in OpenGl_ShaderManager leading to visualization issues.
- OpenGl_Clipping::AddWorldLazy() is intended to skip uploading matrices for FFP. This optimization leads to broken planes definition in some cases and does not make much sense (AddWorldLazy() is used only to set clipping planes 2 times per frame).
Steps To Reproducebugs/vis/bug24224
TagsNo tags attached.
Test case numberbugs vis bug24224

Relationships

related to 0026122 closedbugmaster Community Visualization, TKOpenGl - clipping and capping is broken when ffp is disabled on Linux 
child of 0024838 closedbugmaster Open CASCADE Visualization, TKOpenGl - make general rendering path compatible with OpenGL 3.1+ core profiles 

Activities

git

2016-08-01 23:01

administrator   ~0056358

Branch CR27735 has been created by kgv.

SHA-1: 6309cde1219187518b99b8a42553f920f8727dda


Detailed log of new commits:

Author: kgv
Date: Mon Aug 1 22:59:41 2016 +0300

    0027735: Visualization, OpenGl_ShaderManager - fix clipping state management
    
    OpenGl_CappingAlgo::RenderCapping() now updates clipping state in Shader Manager.
    OpenGl_View::render() clipping state setup has been moved to OpenGl_View::renderScene().
    
    OpenGl_ShaderManager now converts position to homogeneous coordinates within clipping code GLSL.
    This fixes capping plane rendering with clipping planes applied.

kgv

2016-08-01 23:02

developer   ~0056359

Patch is ready for review.

apl

2016-08-02 14:15

developer   ~0056378

Dear bugmaster,

I have no remarks to the patch, please test it.

apv

2016-08-03 13:53

tester   ~0056434

Dear BugMaster,

Branch CR27735 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 6309cde1219187518b99b8a42553f920f8727dda

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1124

Regressions/Differences:
Not detected

Testing cases:
bugs vis bug24224 - OK
http://occt-tests/CR27735-master-OCCT/Debian70-64/bugs/vis/bug24224.html
http://occt-tests/CR27735-master-OCCT/Windows-64-VC10/bugs/vis/bug24224.html

Testing on Linux:
Total MEMORY difference: 90117749 / 90124523 [-0.01%]
Total CPU difference: 19367.620000000003 / 19470.040000000092 [-0.53%]

Testing on Windows:
Total MEMORY difference: 57084276 / 57093912 [-0.02%]
Total CPU difference: 18202.212280098767 / 18078.831089198848 [+0.68%]

There are differences in images found by testdiff:
http://occt-tests/CR27735-master-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR27735-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html
v3d mesh B7
bugs vis bug270_2
bugs vis bug270_1

apv

2016-08-03 13:55

tester   ~0056435

Dear Kirill,

Branch CR27735 has been rejected due to:
- differences in images

git

2016-08-03 15:36

administrator   ~0056441

Branch CR27735 has been updated by kgv.

SHA-1: 4cb510bf7128eb5dd8c72b06e810742e7c4b999f


Detailed log of new commits:

Author: kgv
Date: Wed Aug 3 15:37:14 2016 +0300

    OpenGl_ShaderManager - revert change for OccEquationCoords_View case

git

2016-08-03 15:37

administrator   ~0056442

Branch CR27735_1 has been created by kgv.

SHA-1: 579f6e136b23d82a8c292861aec088ed5cf91cbf


Detailed log of new commits:

Author: kgv
Date: Wed Aug 3 15:39:07 2016 +0300

    0027735: Visualization, OpenGl_ShaderManager - fix clipping state management
    
    OpenGl_CappingAlgo::RenderCapping() now updates clipping state in Shader Manager.
    OpenGl_View::render() clipping state setup has been moved to OpenGl_View::renderScene().
    
    OpenGl_ShaderManager now converts position to homogeneous coordinates within clipping code GLSL.
    This fixes capping plane rendering with clipping planes applied.

kgv

2016-08-03 15:38

developer   ~0056443

Please check corrected patch in branch CR27735_1.

apv

2016-08-04 11:31

tester   ~0056456

Dear BugMaster,

Branch CR27735_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 579f6e136b23d82a8c292861aec088ed5cf91cbf

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1144

Regressions/Differences:
Not detected

Testing cases:
bugs vis bug24224 - OK
http://occt-tests/CR27735_1-master-OCCT/Debian70-64/bugs/vis/bug24224.html
http://occt-tests/CR27735_1-master-OCCT/Windows-64-VC10/bugs/vis/bug24224.html

Testing on Linux:
Total MEMORY difference: 90227602 / 90104021 [+0.14%]
Total CPU difference: 19352.470000000045 / 19470.140000000094 [-0.60%]

Testing on Windows:
Total MEMORY difference: 57087337 / 57093912 [-0.01%]
Total CPU difference: 18118.08094079885 / 18078.831089198848 [+0.22%]

There are differences in images found by testdiff:
http://occt-tests/CR27735_1-master-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR27735_1-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html
v3d mesh B7
bugs vis bug270_2
bugs vis bug270_1

apv

2016-08-04 11:32

tester   ~0056457

Dear Kirill,

Branch CR27735_1 has been rejected due to:
- differences in images

git

2016-08-04 12:43

administrator   ~0056459

Branch CR27735_1 has been updated by kgv.

SHA-1: 0f88c2d8d75b2dd6fcff3b6e916b371188dd8446


Detailed log of new commits:

Author: kgv
Date: Thu Aug 4 12:45:03 2016 +0300

    fix ZClipping planes state tracking

git

2016-08-04 12:46

administrator   ~0056460

Branch CR27735_2 has been created by kgv.

SHA-1: 2b8a2c2edc77c9eb5a3b031b4a3df92c11cd759c


Detailed log of new commits:

Author: kgv
Date: Thu Aug 4 12:47:29 2016 +0300

    0027735: Visualization, OpenGl_ShaderManager - fix clipping state management
    
    OpenGl_CappingAlgo::RenderCapping() now updates clipping state in Shader Manager.
    OpenGl_View::render() clipping state setup has been moved to OpenGl_View::renderScene().
    
    OpenGl_ShaderManager now converts position to homogeneous coordinates within clipping code GLSL.
    This fixes capping plane rendering with clipping planes applied.

kgv

2016-08-04 12:46

developer   ~0056461

Regression should be fixed now - please test branch CR27735_2.

git

2016-08-04 13:45

administrator   ~0056465

Branch CR27735_3 has been created by kgv.

SHA-1: baf46c2e5a0ad37af44007d81be775ca799c2bc4


Detailed log of new commits:

Author: kgv
Date: Thu Aug 4 12:47:29 2016 +0300

    0027735: Visualization, OpenGl_ShaderManager - fix clipping state management
    
    OpenGl_CappingAlgo::RenderCapping() now updates clipping state in Shader Manager.
    OpenGl_View::render() clipping state setup has been moved to OpenGl_View::renderScene().
    
    OpenGl_ShaderManager now converts position to homogeneous coordinates within clipping code GLSL.
    This fixes capping plane rendering with clipping planes applied.

kgv

2016-08-04 13:46

developer   ~0056466

CR27735_3 is the same as CR27735_2 rebased onto IR (trivial merge conflict).

git

2016-08-04 20:27

administrator   ~0056486

Branch CR27735_3 has been updated forcibly by kgv.

SHA-1: a653d66e57d06d1a8c042466ee54b93ffd2281c5

git

2016-08-05 20:54

administrator   ~0056509

Branch CR27735_3 has been updated by kgv.

SHA-1: e13b7f7275937cc37bfd5db81f1ceb0e340312e0


Detailed log of new commits:

Author: kgv
Date: Fri Aug 5 20:54:34 2016 +0300

    OpenGl_Clipping::AddWorldLazy() method has been dropped
    to avoid broken clipping planes definition within FFP enabled.

git

2016-08-05 20:58

administrator   ~0056510

Branch CR27735_4 has been created by kgv.

SHA-1: c80e108b1bfac7832669024ba244eb42e255c35a


Detailed log of new commits:

Author: kgv
Date: Fri Aug 5 20:58:13 2016 +0300

    0027735: Visualization, OpenGl_ShaderManager - fix clipping state management
    
    OpenGl_CappingAlgo::RenderCapping() now updates clipping state in Shader Manager.
    OpenGl_View::render() clipping state setup has been moved to OpenGl_View::renderScene().
    
    OpenGl_ShaderManager now converts position to homogeneous coordinates within clipping code GLSL.
    This fixes capping plane rendering with clipping planes applied.
    
    Fixed possible Clipping planes misconfiguration when FFP is used;
    error-prone OpenGl_Clipping::AddWorldLazy() method has been dropped.

kgv

2016-08-05 21:02

developer   ~0056511

Patch has been updated (branch CR27735_4) to fix one more detected bug (NOT a regression of previous patch).

apv

2016-08-09 11:42

tester   ~0056586

Dear BugMaster,

Branch CR27735_4 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: c80e108b1bfac7832669024ba244eb42e255c35a

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1132

Regressions/Differences:
Not detected

Testing cases:
bugs vis bug24224 - OK
http://occt-tests/CR27735_4-master-OCCT/Debian70-64/bugs/vis/bug24224.html
http://occt-tests/CR27735_4-master-OCCT/Windows-64-VC10/bugs/vis/bug24224.html

Testing on Linux:
Total MEMORY difference: 88835913 / 88483292 [+0.40%]
Total CPU difference: 19372.410000000076 / 19249.210000000057 [+0.64%]

Testing on Windows:
Total MEMORY difference: 57138657 / 57173794 [-0.06%]
Total CPU difference: 18438.257393198823 / 18044.994472298804 [+2.18%]

git

2016-08-26 16:24

administrator   ~0057160

Branch CR27735_4 has been deleted by inv.

SHA-1: c80e108b1bfac7832669024ba244eb42e255c35a

git

2016-08-26 16:24

administrator   ~0057161

Branch CR27735_3 has been deleted by inv.

SHA-1: e13b7f7275937cc37bfd5db81f1ceb0e340312e0

git

2016-08-26 16:24

administrator   ~0057164

Branch CR27735_2 has been deleted by inv.

SHA-1: 2b8a2c2edc77c9eb5a3b031b4a3df92c11cd759c

git

2016-08-26 16:24

administrator   ~0057165

Branch CR27735_1 has been deleted by inv.

SHA-1: 0f88c2d8d75b2dd6fcff3b6e916b371188dd8446

git

2016-08-26 16:24

administrator   ~0057166

Branch CR27735 has been deleted by inv.

SHA-1: 4cb510bf7128eb5dd8c72b06e810742e7c4b999f

Related Changesets

occt: master deb02f86

2016-08-05 17:58:13

kgv


Committer: bugmaster Details Diff
0027735: Visualization, OpenGl_ShaderManager - fix clipping state management

OpenGl_CappingAlgo::RenderCapping() now updates clipping state in Shader Manager.
OpenGl_View::render() clipping state setup has been moved to OpenGl_View::renderScene().

OpenGl_ShaderManager now converts position to homogeneous coordinates within clipping code GLSL.
This fixes capping plane rendering with clipping planes applied.

Fixed possible Clipping planes misconfiguration when FFP is used;
error-prone OpenGl_Clipping::AddWorldLazy() method has been dropped.
Affected Issues
0027735
mod - src/OpenGl/OpenGl_CappingAlgo.cxx Diff File
mod - src/OpenGl/OpenGl_Clipping.hxx Diff File
mod - src/OpenGl/OpenGl_ShaderManager.cxx Diff File
mod - src/OpenGl/OpenGl_Structure.cxx Diff File
mod - src/OpenGl/OpenGl_View_Redraw.cxx Diff File
mod - src/Shaders/PhongShading.fs Diff File
mod - tests/bugs/vis/bug24224 Diff File

Issue History

Date Modified Username Field Change
2016-08-01 21:56 kgv New Issue
2016-08-01 21:56 kgv Assigned To => kgv
2016-08-01 22:35 kgv Product Version 7.0.0 => 6.9.0
2016-08-01 23:01 git Note Added: 0056358
2016-08-01 23:02 kgv Note Added: 0056359
2016-08-01 23:02 kgv Assigned To kgv => apl
2016-08-01 23:02 kgv Status new => resolved
2016-08-01 23:02 kgv Relationship added child of 0024838
2016-08-01 23:56 kgv Relationship added related to 0026122
2016-08-02 14:15 apl Note Added: 0056378
2016-08-02 14:15 apl Assigned To apl => bugmaster
2016-08-02 14:15 apl Status resolved => reviewed
2016-08-02 19:07 apv Assigned To bugmaster => apv
2016-08-03 12:53 apv Test case number => bugs vis bug24224
2016-08-03 13:53 apv Note Added: 0056434
2016-08-03 13:53 apv Assigned To apv => kgv
2016-08-03 13:53 apv Status reviewed => assigned
2016-08-03 13:55 apv Note Added: 0056435
2016-08-03 15:36 git Note Added: 0056441
2016-08-03 15:37 git Note Added: 0056442
2016-08-03 15:38 kgv Note Added: 0056443
2016-08-03 15:38 kgv Assigned To kgv => bugmaster
2016-08-03 15:38 kgv Status assigned => resolved
2016-08-03 15:38 kgv Status resolved => reviewed
2016-08-03 16:40 apv Assigned To bugmaster => apv
2016-08-04 11:31 apv Note Added: 0056456
2016-08-04 11:31 apv Assigned To apv => kgv
2016-08-04 11:31 apv Status reviewed => assigned
2016-08-04 11:32 apv Note Added: 0056457
2016-08-04 12:43 git Note Added: 0056459
2016-08-04 12:46 git Note Added: 0056460
2016-08-04 12:46 kgv Note Added: 0056461
2016-08-04 12:46 kgv Assigned To kgv => bugmaster
2016-08-04 12:46 kgv Status assigned => resolved
2016-08-04 12:47 kgv Status resolved => reviewed
2016-08-04 13:12 apv Assigned To bugmaster => apv
2016-08-04 13:45 git Note Added: 0056465
2016-08-04 13:46 kgv Note Added: 0056466
2016-08-04 20:27 git Note Added: 0056486
2016-08-05 20:54 git Note Added: 0056509
2016-08-05 20:58 git Note Added: 0056510
2016-08-05 21:02 kgv Note Added: 0056511
2016-08-05 21:02 kgv Description Updated
2016-08-09 11:42 apv Note Added: 0056586
2016-08-09 11:42 apv Assigned To apv => bugmaster
2016-08-09 11:42 apv Status reviewed => tested
2016-08-12 10:48 bugmaster Changeset attached => occt master deb02f86
2016-08-12 10:48 bugmaster Status tested => verified
2016-08-12 10:48 bugmaster Resolution open => fixed
2016-08-26 16:24 git Note Added: 0057160
2016-08-26 16:24 git Note Added: 0057161
2016-08-26 16:24 git Note Added: 0057164
2016-08-26 16:24 git Note Added: 0057165
2016-08-26 16:24 git Note Added: 0057166
2016-12-09 16:31 aiv Status verified => closed
2016-12-09 16:38 aiv Fixed in Version => 7.1.0