MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027735Open CASCADE[OCCT] OCCT:Visualizationpublic2016-08-01 21:562016-12-09 16:38
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.9.0 
Target Version[OCCT] 7.1.0Fixed in Version[OCCT] 7.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
Attached Files

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

-  Notes
(0056358)
git (administrator)
2016-08-01 23:01

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.
(0056359)
kgv (developer)
2016-08-01 23:02

Patch is ready for review.
(0056378)
apl (developer)
2016-08-02 14:15

Dear bugmaster,

I have no remarks to the patch, please test it.
(0056434)
apv (tester)
2016-08-03 13:53

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
(0056435)
apv (tester)
2016-08-03 13:55

Dear Kirill,

Branch CR27735 has been rejected due to:
- differences in images
(0056441)
git (administrator)
2016-08-03 15:36

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

(0056442)
git (administrator)
2016-08-03 15:37

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.
(0056443)
kgv (developer)
2016-08-03 15:38

Please check corrected patch in branch CR27735_1.
(0056456)
apv (tester)
2016-08-04 11:31

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
(0056457)
apv (tester)
2016-08-04 11:32

Dear Kirill,

Branch CR27735_1 has been rejected due to:
- differences in images
(0056459)
git (administrator)
2016-08-04 12:43

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

(0056460)
git (administrator)
2016-08-04 12:46

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.
(0056461)
kgv (developer)
2016-08-04 12:46

Regression should be fixed now - please test branch CR27735_2.
(0056465)
git (administrator)
2016-08-04 13:45

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.
(0056466)
kgv (developer)
2016-08-04 13:46

CR27735_3 is the same as CR27735_2 rebased onto IR (trivial merge conflict).
(0056486)
git (administrator)
2016-08-04 20:27

Branch CR27735_3 has been updated forcibly by kgv.

SHA-1: a653d66e57d06d1a8c042466ee54b93ffd2281c5
(0056509)
git (administrator)
2016-08-05 20:54

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.

(0056510)
git (administrator)
2016-08-05 20:58

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.
(0056511)
kgv (developer)
2016-08-05 21:02

Patch has been updated (branch CR27735_4) to fix one more detected bug (NOT a regression of previous patch).
(0056586)
apv (tester)
2016-08-09 11:42

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%]
(0057160)
git (administrator)
2016-08-26 16:24

Branch CR27735_4 has been deleted by inv.

SHA-1: c80e108b1bfac7832669024ba244eb42e255c35a
(0057161)
git (administrator)
2016-08-26 16:24

Branch CR27735_3 has been deleted by inv.

SHA-1: e13b7f7275937cc37bfd5db81f1ceb0e340312e0
(0057164)
git (administrator)
2016-08-26 16:24

Branch CR27735_2 has been deleted by inv.

SHA-1: 2b8a2c2edc77c9eb5a3b031b4a3df92c11cd759c
(0057165)
git (administrator)
2016-08-26 16:24

Branch CR27735_1 has been deleted by inv.

SHA-1: 0f88c2d8d75b2dd6fcff3b6e916b371188dd8446
(0057166)
git (administrator)
2016-08-26 16:24

Branch CR27735 has been deleted by inv.

SHA-1: 4cb510bf7128eb5dd8c72b06e810742e7c4b999f

- Related Changesets
occt: master deb02f86
Timestamp: 2016-08-05 17:58:13
Author: 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.
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 View Revisions
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 user533 Status verified => closed
2016-12-09 16:38 user533 Fixed in Version => 7.1.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker