MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030166Open CASCADE[OCCT] OCCT:Visualizationpublic2018-09-27 09:472018-10-29 10:08
Reportermnv 
Assigned Toapn 
PrioritynormalSeverityfeature 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0030166: Visualization, TKOpenGl - add option OpenGl_Caps::glslDumpLevel dumping the source code of the shader program
DescriptionIt is desired to have possibility for outputting shader program, which was compiled and used for current presentation (GLSL code generated by Shader Manager first of all).
Steps To ReproduceNot required
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
parent of 0030317assignedmnv Open CASCADE Visualization, TKOpenGl - GLSL source code dump lacks program ID 
Not all the children of this issue are yet resolved or closed.

-  Notes
(0079693)
git (administrator)
2018-10-04 17:44

Branch CR30166 has been created by mnv.

SHA-1: 29700d86f8f0bff2c6eeef7d53acf2fd9745fbd7


Detailed log of new commits:

Author: mnv
Date: Thu Sep 27 16:30:48 2018 +0300

    0030166: Visualization, TKOpenGl - Implement the functionality for outputting the source code of the shader program.
    
    Added new option -glslcode for vgldebug command.
    This option have folowing parameters:
    off - disable glsl source code outputs
    short - outputs glsl source code in short format (except common declarations (global constants and Vertex Shader inputs))
    full - outputs glsl source code in full format.
(0079701)
kgv (developer)
2018-10-04 18:06

+Standard_Boolean ViewerTest::ParseGlslSourceFlag (Standard_CString       theArg,
+                                                  OpenGl_GlslSourceFlag& theFlag)

There is no use declaring a public function for a niche enumeration like OpenGl_GlslSourceFlag - please move it to .cxx.

+  OpenGl_GlslSourceFlag          myGlslCodeDebug;     //!< print GLSL programs source code

myDumpGlslLevel, OpenGl_ShaderProgramDumpLevel

+  else if (aTypeStr.IsIntegerValue())

Doesn't look useful (note that parsing other enumerations as integers in ViewerTest is usually done for compatibility with old syntax).
But it can be useful handling 0 and 1/on as aliases to "off" and "short".

+// Created on: 2018-10-04
+// Created by: MNV
+// Copyright (c) 2013-2018 OPEN CASCADE SAS

Looks incorrect.

+  OpenGl_GlslSourceOff,
+  OpenGl_GlslSourceShort,
+  OpenGl_GlslSourceFull

Description is missing.

-    const TCollection_AsciiString aSource = aHeaderVer                     // #version   - header defining 
GLSL version, should be first
+    TCollection_AsciiString aSource = aHeaderVer                     // #version   - header defining 
GLSL version, should be first
...
+      if (theCtx->caps->glslSourceCode == OpenGl_GlslSourceShort)
+      {
+        aSource = aHeaderVer

I'm not sure that reusing aSource variable for a different purpose is useful.

+        case Graphic3d_TOS_COMPUTE:         { aShaderTypeMsg = "Compute shader source code:\n";                
break; }
+        case Graphic3d_TOS_VERTEX:          { aShaderTypeMsg = "Vertex shader source code:\n";                 
break; }
+        case Graphic3d_TOS_TESS_CONTROL:    { aShaderTypeMsg = "Tesselation control shader source 
code:\n";    break; }
+        case Graphic3d_TOS_TESS_EVALUATION: { aShaderTypeMsg = "Tesselation evaluation shader source 
code:\n"; break; }
+        case Graphic3d_TOS_GEOMETRY:        { aShaderTypeMsg = "Geometry shader source code:\n";               
break; }
+        case Graphic3d_TOS_FRAGMENT:        { aShaderTypeMsg = "Fragment shader source code:\n";               
break; }

static const char* THE_SHADER_DUMP_PREFIX[Graphic3d_TOS_NB];
(0079724)
git (administrator)
2018-10-05 15:17

Branch CR30166_1 has been created by mnv.

SHA-1: 6082c93b495ba26a767896862108d335d2c9e32f


Detailed log of new commits:

Author: mnv
Date: Thu Sep 27 16:30:48 2018 +0300

    0030166: Visualization, TKOpenGl - Implement the functionality for outputting the source code of the shader program.
    
    Added new option -glslcode for vgldebug command.
    This option have folowing parameters:
    off - disable glsl source code outputs
    short - outputs glsl source code in short format (except common declarations (global constants and Vertex Shader inputs))
    full - outputs glsl source code in full format.
(0079734)
mnv (developer)
2018-10-05 17:27

Patch is ready for review.
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR30166-master-MNV/view/ALL/ [^]
(0079735)
kgv (developer)
2018-10-05 17:33

+Standard_Boolean parseGlslSourceFlag (Standard_CString               theArg,
+                                      OpenGl_ShaderProgramDumpLevel& theGlslDumpLevel)

static
(0079767)
git (administrator)
2018-10-08 08:44

Branch CR30166_2 has been created by mnv.

SHA-1: a663c234d29206ce33ec50091af0c80860a86296


Detailed log of new commits:

Author: mnv
Date: Thu Sep 27 16:30:48 2018 +0300

    0030166: Visualization, TKOpenGl - Implement the functionality for outputting the source code of the shader program.
    
    Added new option -glslcode for vgldebug command.
    This option have folowing parameters:
    off - disable glsl source code outputs
    short - outputs glsl source code in short format (except common declarations (global constants and Vertex Shader inputs))
    full - outputs glsl source code in full format.
(0079784)
git (administrator)
2018-10-08 12:43

Branch CR30166_2 has been updated forcibly by mnv.

SHA-1: c34f3bfb2871bb250cd2e25eb912fddcc6dd7f16
(0079795)
mnv (developer)
2018-10-08 16:21

Patch is ready for review
(0079801)
git (administrator)
2018-10-08 19:00

Branch CR30166_2 has been updated forcibly by kgv.

SHA-1: 0e59279f712ca023fc151df633e277f1ce611df9
(0079802)
kgv (developer)
2018-10-08 19:00

Please take the patch.
(0079865)
apn (administrator)
2018-10-10 18:45

Combination -
OCCT branch : CR30166_2 SHA - 0e59279f712ca023fc151df633e277f1ce611df9
Products branch : master SHA - fa672296ba29ad12e59ba21c0c612c412b808a5d
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: 17344.83999999984 / 17385.999999999854 [-0.24%]
Products
Total CPU difference: 2526.109999999998 / 2521.999999999997 [+0.16%]
Windows-64-VC14:
OCCT
Total CPU difference: 17482.68886779846 / 17457.853508598404 [+0.14%]
Products
Total CPU difference: 8363.135609500016 / 8343.292282299992 [+0.24%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0079934)
git (administrator)
2018-10-14 13:56

Branch CR30166_2 has been deleted by inv.

SHA-1: 0e59279f712ca023fc151df633e277f1ce611df9
(0079938)
git (administrator)
2018-10-14 13:56

Branch CR30166_1 has been deleted by inv.

SHA-1: 6082c93b495ba26a767896862108d335d2c9e32f
(0079939)
git (administrator)
2018-10-14 13:56

Branch CR30166 has been deleted by inv.

SHA-1: 29700d86f8f0bff2c6eeef7d53acf2fd9745fbd7

- Related Changesets
occt: master 84e84755
Timestamp: 2018-09-27 13:30:48
Author: mnv
Committer: apn
Details ] Diff ]
0030166: Visualization, TKOpenGl - add option OpenGl_Caps::glslDumpLevel dumping the source code of the shader program

Added new option -glslcode for vgldebug command with the following values:
- off disables glsl source code dump;
- short to dump glsl source code in short format (except common declarations);
- full to dump glsl source code in full format.
mod - src/OpenGl/FILES Diff ] File ]
mod - src/OpenGl/OpenGl_Caps.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Caps.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_ShaderProgram.cxx Diff ] File ]
add - src/OpenGl/OpenGl_ShaderProgramDumpLevel.hxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2018-09-27 09:47 mnv New Issue
2018-09-27 09:47 mnv Assigned To => kgv
2018-09-27 09:47 mnv Assigned To kgv => mnv
2018-09-27 09:47 mnv Status new => assigned
2018-10-04 17:44 git Note Added: 0079693
2018-10-04 18:06 kgv Note Added: 0079701
2018-10-05 15:17 git Note Added: 0079724
2018-10-05 17:27 mnv Note Added: 0079734
2018-10-05 17:27 mnv Assigned To mnv => kgv
2018-10-05 17:27 mnv Status assigned => resolved
2018-10-05 17:27 mnv Steps to Reproduce Updated View Revisions
2018-10-05 17:33 kgv Note Added: 0079735
2018-10-05 17:33 kgv Assigned To kgv => mnv
2018-10-05 17:33 kgv Status resolved => assigned
2018-10-08 08:44 git Note Added: 0079767
2018-10-08 08:53 kgv Relationship added related to 0029810
2018-10-08 08:55 kgv Description Updated View Revisions
2018-10-08 08:55 kgv Summary Visualization, TKOpenGl - Implement the functionality for outputting the source code of the shader program. => Visualization, TKOpenGl - option for dumping the source code of the shader program
2018-10-08 08:56 kgv Summary Visualization, TKOpenGl - option for dumping the source code of the shader program => Visualization, OpenGl_Caps - option dumping the source code of the shader program
2018-10-08 08:56 kgv Summary Visualization, OpenGl_Caps - option dumping the source code of the shader program => Visualization, TKOpenGl - add option OpenGl_Caps::glslDumpLevel dumping the source code of the shader program
2018-10-08 12:43 git Note Added: 0079784
2018-10-08 16:21 mnv Note Added: 0079795
2018-10-08 16:21 mnv Assigned To mnv => kgv
2018-10-08 16:21 mnv Status assigned => resolved
2018-10-08 19:00 git Note Added: 0079801
2018-10-08 19:00 kgv Note Added: 0079802
2018-10-08 19:00 kgv Assigned To kgv => bugmaster
2018-10-08 19:00 kgv Status resolved => reviewed
2018-10-08 19:00 kgv Product Version 7.3.0 =>
2018-10-10 18:45 apn Test case number => Not needed
2018-10-10 18:45 apn Note Added: 0079865
2018-10-10 18:45 apn Status reviewed => tested
2018-10-13 16:01 apn Changeset attached => occt master 84e84755
2018-10-13 16:01 apn Assigned To bugmaster => apn
2018-10-13 16:01 apn Status tested => verified
2018-10-13 16:01 apn Resolution open => fixed
2018-10-14 13:56 git Note Added: 0079934
2018-10-14 13:56 git Note Added: 0079938
2018-10-14 13:56 git Note Added: 0079939
2018-10-29 10:08 kgv Relationship added parent of 0030317


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker