MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030119Open CASCADE[OCCT] OCCT:Visualizationpublic2018-09-10 11:482018-10-28 16:14
Reportermnv 
Assigned Toapn 
PrioritynormalSeverityfeature 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0030119: Visualization, OpenGl_ShaderManager - implement mechanism generating in/out section of shader programs
DescriptionIt's desired to have functionality for generating source code for in/out section of shader programs, which will be collect var names and generate target source code in one place.
Steps To ReproduceNot required
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships

-  Notes
(0079079)
git (administrator)
2018-09-10 11:58

Branch CR30119 has been created by mnv.

SHA-1: c0c56870aa54d56e98a6d6053e24d9a0bf09c2b8


Detailed log of new commits:

Author: mnv
Date: Fri Sep 7 10:18:46 2018 +0300

    0030119: Visualization - implement mechanism for generating in/out section of shader programs.
    
    Added function which generate in/out part of shaders source code from prepared list of variables.
(0079085)
git (administrator)
2018-09-10 14:42

Branch CR30119 has been updated forcibly by mnv.

SHA-1: 7b1e3aacc7b2cb460eef4308bd4e7f02d698b80a
(0079089)
git (administrator)
2018-09-10 15:34

Branch CR30119 has been updated forcibly by mnv.

SHA-1: 3d6d57d57262fee535392aad129c32c98cf4964c
(0079108)
mnv (developer)
2018-09-11 08:56

Patch is ready for review
(0079111)
kgv (developer)
2018-09-11 11:02

+//! List of variable of shader program.
+typedef NCollection_Vector<TCollection_AsciiString> OpenGl_ShaderVarList;

I still don't see an answer to the question, why NCollection_Vector is used here.

+  Standard_EXPORT void prepareShadersOutSrc (TCollection_AsciiString&    theSrcVertOut,
+                                             TCollection_AsciiString&    theSrcFragOut,
+                                             const OpenGl_ShaderVarList& theVarList);

Should be static or const method.

-      aSrcVertExtraOut +=
-        EOL"THE_SHADER_OUT vec2 ScreenSpaceCoord;";
+      aVarList.Append ("vec2 ScreenSpaceCoord");
       aSrcFragExtraOut +=
-        EOL"THE_SHADER_IN  vec2 ScreenSpaceCoord;"
         EOL"uniform int   uPattern;"
         EOL"uniform float uFactor;";

Please generalize approach to cover uniform variables as well (probably, these can be specified per-stage).

+  if (!aVarList.IsEmpty())
+  {
+    prepareShadersOutSrc (aSrcVertExtraOut, aSrcFragExtraOut, aVarList);
+  }

This looks awkward to keep dedicated variables for that - aSrcVertExtraOut and aSrcFragExtraOut are probably should gone away.

prepareShadersOutSrc() can be redefined to be called per-shader stage (take enumeration).
Or even better, Graphic3d_ShaderObject::CreateFromSource() can be wrapped by OpenGl_ShaderObject/OpenGl_ShaderManager to take additional arguments (in/out variables, uniform variables).
(0079409)
git (administrator)
2018-09-26 14:36

Branch CR30119 has been updated forcibly by mnv.

SHA-1: dce5f089792f1199c8cc4e0ecd9a9b1ac9167a6c
(0079411)
git (administrator)
2018-09-26 15:03

Branch CR30119 has been updated forcibly by mnv.

SHA-1: a5bc3aef487c15a3928c3111fd430d77650739ae
(0079428)
git (administrator)
2018-09-27 08:55

Branch CR30119 has been updated forcibly by mnv.

SHA-1: 7a6f109f987b0a879b592a756d7f5b81f4e0dc99
(0079441)
mnv (developer)
2018-09-27 13:42

Patch is ready for review.
http://jenkins-test-12.nnov.opencascade.com/view/CR30119-master-MNV/view/ALL/ [^]
(0079886)
git (administrator)
2018-10-11 14:02

Branch CR30119_1 has been created by mnv.

SHA-1: f3be2cb43dc3bf33a6e8080e80fdfd09c0647f14


Detailed log of new commits:

Author: mnv
Date: Fri Sep 7 10:18:46 2018 +0300

    0030119: Visualization - implement mechanism for generating in/out section of shader programs.
    
    Added functionality which generate in/out part of shaders source code from prepared list of variables.
(0079887)
git (administrator)
2018-10-11 14:15

Branch CR30119_1 has been updated forcibly by mnv.

SHA-1: a4e9f20c1f1a42589006f2cdbdfbc1d311c0885a
(0079888)
git (administrator)
2018-10-11 14:21

Branch CR30119_1 has been updated forcibly by mnv.

SHA-1: de15358417492fed963a77ae96c0347fa2d047b9
(0079965)
git (administrator)
2018-10-15 15:56

Branch CR30119_1 has been updated forcibly by mnv.

SHA-1: ba91a5d576536c48fa3bfcd1a232fef2337f1650
(0080208)
git (administrator)
2018-10-22 20:07

Branch CR30119_1 has been updated forcibly by kgv.

SHA-1: f856ee605986c81b59f3857728b98ab248816147
(0080209)
git (administrator)
2018-10-22 22:04

Branch CR30119_2 has been created by kgv.

SHA-1: fb4dea0c406931e5238d5cc75ddf06e3c68deba5


Detailed log of new commits:

Author: mnv
Date: Fri Sep 7 10:18:46 2018 +0300

    0030119: Visualization - implement mechanism for generating in/out section of shader programs
    
    Added functionality which generate in/out part of shaders source code from prepared list of variables.
(0080210)
kgv (developer)
2018-10-22 23:45

Please take the patch (reviewed with amendments).

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR30119_2-master-KGV [^]
(0080220)
apn (administrator)
2018-10-23 11:08

Combination -
OCCT branch : CR30119_2 SHA - fb4dea0c406931e5238d5cc75ddf06e3c68deba5
Products branch : master SHA - 35af85def09c66ceeaf90b4e4fb8b54e68d5e98c
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17629.539999999823 / 17520.90999999988 [+0.62%]
Products
Total CPU difference: 7459.220000000069 / 7462.09000000004 [-0.04%]
Windows-64-VC14:
OCCT
Total CPU difference: 17688.563387498496 / 17666.582846598394 [+0.12%]
Products
Total CPU difference: 8382.495333599978 / 8372.402068899986 [+0.12%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0080416)
git (administrator)
2018-10-28 16:13

Branch CR30119_2 has been deleted by inv.

SHA-1: fb4dea0c406931e5238d5cc75ddf06e3c68deba5
(0080417)
git (administrator)
2018-10-28 16:13

Branch CR30119_1 has been deleted by inv.

SHA-1: f856ee605986c81b59f3857728b98ab248816147
(0080428)
git (administrator)
2018-10-28 16:14

Branch CR30119 has been deleted by inv.

SHA-1: 7a6f109f987b0a879b592a756d7f5b81f4e0dc99

- Related Changesets
occt: master 3b4c6945
Timestamp: 2018-09-07 07:18:46
Author: mnv
Committer: apn
Details ] Diff ]
0030119: Visualization, OpenGl_ShaderManager - implement mechanism generating in/out section of shader programs

Added functionality which generate in/out part of shaders source code from prepared list of variables.
mod - src/OpenGl/OpenGl_ShaderManager.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_ShaderObject.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_ShaderObject.hxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2018-09-10 11:48 mnv New Issue
2018-09-10 11:48 mnv Assigned To => kgv
2018-09-10 11:48 mnv Assigned To kgv => mnv
2018-09-10 11:48 mnv Status new => assigned
2018-09-10 11:58 git Note Added: 0079079
2018-09-10 14:42 git Note Added: 0079085
2018-09-10 15:34 git Note Added: 0079089
2018-09-11 08:56 mnv Note Added: 0079108
2018-09-11 08:56 mnv Assigned To mnv => kgv
2018-09-11 08:56 mnv Status assigned => resolved
2018-09-11 08:56 mnv Steps to Reproduce Updated View Revisions
2018-09-11 11:02 kgv Note Added: 0079111
2018-09-11 11:02 kgv Assigned To kgv => mnv
2018-09-11 11:02 kgv Status resolved => assigned
2018-09-26 14:36 git Note Added: 0079409
2018-09-26 15:03 git Note Added: 0079411
2018-09-27 08:55 git Note Added: 0079428
2018-09-27 13:42 mnv Note Added: 0079441
2018-09-27 13:42 mnv Assigned To mnv => kgv
2018-09-27 13:42 mnv Status assigned => resolved
2018-09-27 13:59 kgv Severity minor => feature
2018-09-27 13:59 kgv Summary Visualization - implement mechanism for generating in/out section of shader programs. => Visualization, OpenGl_ShaderManager - implement mechanism generating in/out section of shader programs
2018-10-11 14:02 git Note Added: 0079886
2018-10-11 14:15 git Note Added: 0079887
2018-10-11 14:21 git Note Added: 0079888
2018-10-15 15:56 git Note Added: 0079965
2018-10-22 20:07 git Note Added: 0080208
2018-10-22 22:04 git Note Added: 0080209
2018-10-22 23:45 kgv Note Added: 0080210
2018-10-22 23:45 kgv Assigned To kgv => bugmaster
2018-10-22 23:45 kgv Status resolved => reviewed
2018-10-22 23:45 kgv Relationship added related to 0029076
2018-10-23 11:08 apn Test case number => Not needed
2018-10-23 11:08 apn Note Added: 0080220
2018-10-23 11:08 apn Status reviewed => tested
2018-10-28 13:20 apn Changeset attached => occt master 3b4c6945
2018-10-28 13:20 apn Assigned To bugmaster => apn
2018-10-28 13:20 apn Status tested => verified
2018-10-28 13:20 apn Resolution open => fixed
2018-10-28 16:13 git Note Added: 0080416
2018-10-28 16:13 git Note Added: 0080417
2018-10-28 16:14 git Note Added: 0080428


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker