View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024926 | Open CASCADE | OCCT:Visualization | public | 2014-05-14 20:08 | 2014-11-11 18:27 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | feature | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.7.1 | ||||
Target Version | 6.8.0 | Fixed in Version | 6.8.0 | ||
Summary | 0024926: MeshVS - improve generation of primitive arrays | ||||
Description | The major issue regarding the current implementation of PrsBuilders in MeshVS package is that they produce primitive arrays that result in exactly N calls to glDrawArrays() OpenGL function in wireframe and shading modes, where N is the number of mesh faces. And this number becomes 2*N when mesh face outlines are visible in shading mode (the default). An example is MeshVS_MeshPrsBuilder::BuildElements() method, however other builders follow the same practice. Such a huge number of OpenGL rendering calls is a bad practice. The following MeshVS improvements are required: 1. Decompose mesh faces into triangles at MeshVS level and use arrays of triangles rather than arrays of polygons with arbitrary vertex number for shaded mesh representation, and arrays of lines instead of arrays of polylines in wireframe mode. Like this, the whole mesh will be drawn with 1-2 OpenGL calls (like it is done in AIS_Shape now). The array of lines should avoid duplication of the same edges - hash map with pair of integer keys and symmetric hasher can be used for this purpose. 2. Avoid duplication of mesh vertex coordinates data and use glDrawElements() rather than glDrawArrays() - this point is less critical but still it should be analyzed (at least). Classes to be revised: MeshVS_ElementalColorPrsBuilder MeshVS_MeshPrsBuilder MeshVS_NodalColorPrsBuilder MeshVS_VectorPrsBuilder (to be checked at least) | ||||
Additional information and documentation updates | Results of performance improvement can be found in perf.pdf attached. | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
Dear san, please review the patch in branch CR24926_1. |
|
Branch CR24926_1 reviewed with the following remarks: 1. As agreed, please add a comment to related MeshVS_*PrsBuilder.cxx (or .cdl) explaining why indexed arrays of primitives are not efficient here. 2. MeshVS_VectorPrsBuilder class still uses polylines and bounds - should be optimized. |
|
Dear san, please review the patch in branch CR24926_2. |
|
Branch CR24926_2 reviewed without remarks, ready for testing. |
2014-05-28 18:37 developer |
perf.pdf (62,497 bytes) |
|
Performance comparison is available in attached file 'perf.pdf'. |
|
Dear BugMaster, Branch CR24926_2 (and products from GIT master) was compiled on Linux platform. SHA-1: b2d38679a8608f0ef403b35ab616a9f3bdcab3d0 Number of compiler warnings: occt component : Linux: 33 (16 on master) There are new additional compilation warnings: Handle_Standard_Transient.hxx:145, GNU C Compiler 4 (gcc), Priority: Normal dereferencing pointer ‘aSVer’ does break strict-aliasing rules MeshVS_SymmetricPairHasher.hxx:19, GNU C Compiler 4 (gcc), Priority: Normal suggest parentheses around ‘&&’ within ‘||’ MeshVS_ElementalColorPrsBuilder.cxx:279, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_0D’ not handled in switch MeshVS_ElementalColorPrsBuilder.cxx:279, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_Node’ not handled in switch MeshVS_ElementalColorPrsBuilder.cxx:279, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_NONE’ not handled in switch MeshVS_ElementalColorPrsBuilder.cxx:279, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_All’ not handled in switch MeshVS_ElementalColorPrsBuilder.cxx:279, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_Element’ not handled in switch MeshVS_MeshPrsBuilder.cxx:266, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_NONE’ not handled in switch MeshVS_MeshPrsBuilder.cxx:266, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_All’ not handled in switch MeshVS_MeshPrsBuilder.cxx:266, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_Element’ not handled in switch MeshVS_MeshPrsBuilder.cxx:266, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_0D’ not handled in switch MeshVS_MeshPrsBuilder.cxx:266, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_Node’ not handled in switch MeshVS_NodalColorPrsBuilder.cxx:245, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_All’ not handled in switch MeshVS_NodalColorPrsBuilder.cxx:245, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_Element’ not handled in switch MeshVS_NodalColorPrsBuilder.cxx:245, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_0D’ not handled in switch MeshVS_NodalColorPrsBuilder.cxx:245, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_Node’ not handled in switch MeshVS_NodalColorPrsBuilder.cxx:245, GNU C Compiler 4 (gcc), Priority: Normal enumeration value ‘MeshVS_ET_NONE’ not handled in switch There is extraction error in products part: Error : the deferred method TDF_Attribute::Paste(TDF_Attribute,TDF_RelocationTable) must Error : have an implementation in class OMFCAF_TMesh Error : Check of OMFCAF has failed Error : Failed during execution Info : Failed OMFCAF (xcpp.fill xcpp.src xcpp.header xcpp.template obj.inc obj.comp obj.idep ) |
|
Dear san, compilation warnings were fixed. Please check the patch in branch CR24926_2. |
|
Branch CR24926_2 reviewed without remarks, ready for testing. |
|
Dear BugMaster, Branch CR24926_2 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested. SHA-1: 57649d8553be049d2fb98aa33999aec6256ba4d5 Number of compiler warnings: occt component : Linux: 15 (15 on master) Windows: 0 (0 on master) MacOS: 199 (199 on master) products component : Linux: 11 (11 on master) Windows: 2 (2 on master) Regressions/Differences: http://occt-tests/CR24926-2-master-occt/Debian60-64/bugs/xde/bug23193.html http://occt-tests/CR24926-2-master-occt/Windows-32-VC9/bugs/xde/bug23193.html bugs xde(005) bug23193: FAILED Testing cases: Not needed Testing on Linux: Total MEMORY difference: 350273556 / 349917692 Total CPU difference: 54457.35999999988 / 52501.220000000074 Testing on Windows: Total MEMORY difference: 376895600 / 377431628 Total CPU difference: 39075.609375 / 39670.796875 There are following differences in images found by testdiff. http://occt-tests/CR24926-2-master-occt/Debian60-64/diff-Debian60-64.html http://occt-tests/CR24926-2-master-occt/Windows-32-VC9/diff-Windows-32-VC9.html IMAGE bugs xde bug2: bug23193_Driver1_Viewer1_View1.png differs |
|
Branch CR24926_2 has been updated by dbp. SHA-1: 6c8d61fa0febf1f06a566def322ba428b950111f |
|
Dear san, please review bug fix in branch CR24926_2. |
|
Branch CR24926_2 reviewed without remarks, ready for testing. |
|
Branch CR24926_2 has been updated forcibly by mkv. SHA-1: 040f44d1264e15978162795d9315722e08d98417 |
|
Dear BugMaster, Branch CR24926_2 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested. SHA-1: 040f44d1264e15978162795d9315722e08d98417 Number of compiler warnings: occt component : Linux: 15 (15 on master) Windows: 0 (0 on master) MacOS: 196 (196 on master) products component : Linux: 11 (11 on master) Windows: 1 (1 on master) Regressions/Differences: No regressions/differences Testing cases: Not needed Testing on Linux: Total MEMORY difference: 351460552 / 351968492 Total CPU difference: 47571.94999999992 / 46305.24 Testing on Windows: Total MEMORY difference: 238740824 / 239134364 Total CPU difference: 34843.328125 / 35090.21875 There are no differences in images found by testdiff. |
|
Branch CR24926_2 has been deleted by inv. SHA-1: 040f44d1264e15978162795d9315722e08d98417 |
|
Branch CR24926_1 has been deleted by inv. SHA-1: 02cf49d36db7602f44ec833ea10e366101b72605 |
|
Branch CR24926 has been deleted by inv. SHA-1: a1fe8030f965ca5216b08fc795844f904276e298 |
occt: master 37ac4a67 2014-07-24 09:21:54
Committer: bugmaster Details Diff |
0024926: MeshVS - improve generation of primitive arrays Remove redundant code. Fix GCC compilation warnings. Bug fix in MeshVS_ElementalColorPrsBuilder. |
Affected Issues 0024926 |
|
mod - src/MeshVS/FILES | Diff File | ||
mod - src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx | Diff File | ||
mod - src/MeshVS/MeshVS_MeshPrsBuilder.cdl | Diff File | ||
mod - src/MeshVS/MeshVS_MeshPrsBuilder.cxx | Diff File | ||
mod - src/MeshVS/MeshVS_NodalColorPrsBuilder.cdl | Diff File | ||
mod - src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx | Diff File | ||
add - src/MeshVS/MeshVS_SymmetricPairHasher.hxx | Diff File | ||
mod - src/MeshVS/MeshVS_VectorPrsBuilder.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-05-14 20:08 |
|
New Issue | |
2014-05-14 20:08 |
|
Assigned To | => san |
2014-05-15 11:44 | kgv | Description Updated | |
2014-05-15 13:12 |
|
Assigned To | san => duv |
2014-05-15 13:12 |
|
Status | new => assigned |
2014-05-15 13:12 |
|
Target Version | => 6.8.0 |
2014-05-15 14:52 |
|
Description Updated | |
2014-05-15 15:42 |
|
Description Updated | |
2014-05-16 18:11 |
|
Assigned To | duv => san |
2014-05-16 18:11 |
|
Assigned To | san => dbp |
2014-05-21 21:37 | kgv | Summary | MeshVS: improved generation of primitive arrays => MeshVS - improve generation of primitive arrays |
2014-05-22 16:03 |
|
Note Added: 0029468 | |
2014-05-22 16:03 |
|
Assigned To | dbp => san |
2014-05-22 16:03 |
|
Status | assigned => feedback |
2014-05-26 21:30 |
|
Note Added: 0029526 | |
2014-05-26 21:30 |
|
Assigned To | san => dbp |
2014-05-26 21:30 |
|
Status | feedback => assigned |
2014-05-26 21:31 |
|
Relationship added | related to 0024961 |
2014-05-28 10:59 |
|
Note Added: 0029562 | |
2014-05-28 10:59 |
|
Assigned To | dbp => san |
2014-05-28 10:59 |
|
Status | assigned => feedback |
2014-05-28 18:28 |
|
Note Added: 0029587 | |
2014-05-28 18:28 |
|
Assigned To | san => bugmaster |
2014-05-28 18:28 |
|
Status | feedback => reviewed |
2014-05-28 18:37 |
|
File Added: perf.pdf | |
2014-05-28 18:38 |
|
Note Added: 0029588 | |
2014-05-28 18:40 |
|
Additional Information Updated | |
2014-06-03 11:36 | bugmaster | Assigned To | bugmaster => apn |
2014-06-03 18:41 |
|
Note Added: 0029658 | |
2014-06-03 18:42 |
|
Assigned To | apn => dbp |
2014-06-03 18:42 |
|
Status | reviewed => assigned |
2014-07-07 11:29 |
|
Note Added: 0029979 | |
2014-07-07 11:29 |
|
Assigned To | dbp => san |
2014-07-07 11:29 |
|
Status | assigned => resolved |
2014-07-08 17:29 |
|
Note Added: 0030009 | |
2014-07-08 17:29 |
|
Assigned To | san => bugmaster |
2014-07-08 17:29 |
|
Status | resolved => reviewed |
2014-07-09 12:23 |
|
Assigned To | bugmaster => mkv |
2014-07-11 15:00 |
|
Note Added: 0030075 | |
2014-07-11 15:01 |
|
Test case number | => Not needed |
2014-07-11 15:01 |
|
Assigned To | mkv => dbp |
2014-07-11 15:01 |
|
Status | reviewed => assigned |
2014-07-18 18:44 | git | Note Added: 0030254 | |
2014-07-18 18:45 |
|
Note Added: 0030255 | |
2014-07-18 18:45 |
|
Assigned To | dbp => san |
2014-07-18 18:45 |
|
Status | assigned => resolved |
2014-07-21 20:57 |
|
Note Added: 0030282 | |
2014-07-21 20:57 |
|
Assigned To | san => bugmaster |
2014-07-21 20:57 |
|
Status | resolved => reviewed |
2014-07-22 11:13 | git | Note Added: 0030283 | |
2014-07-22 12:51 |
|
Assigned To | bugmaster => mkv |
2014-07-23 12:39 |
|
Note Added: 0030376 | |
2014-07-23 12:39 |
|
Assigned To | mkv => bugmaster |
2014-07-23 12:39 |
|
Status | reviewed => tested |
2014-07-25 14:45 | bugmaster | Changeset attached | => occt master 37ac4a67 |
2014-07-25 14:45 | bugmaster | Status | tested => verified |
2014-07-25 14:45 | bugmaster | Resolution | open => fixed |
2014-07-28 16:42 | git | Note Added: 0030442 | |
2014-07-28 16:42 | git | Note Added: 0030452 | |
2014-07-28 16:42 | git | Note Added: 0030453 | |
2014-11-11 12:46 |
|
Fixed in Version | => 6.8.0 |
2014-11-11 12:57 |
|
Status | verified => closed |
2014-11-11 18:27 | kgv | Relationship added | related to 0025463 |