View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0030166 | Open CASCADE | OCCT:Visualization | public | 2018-09-27 09:47 | 2018-10-29 10:08 |
Reporter | Assigned To | apn | |||
Priority | normal | Severity | feature | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.4.0 | Fixed in Version | 7.4.0 | ||
Summary | 0030166: Visualization, TKOpenGl - add option OpenGl_Caps::glslDumpLevel dumping the source code of the shader program | ||||
Description | It 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 Reproduce | Not required | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
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. |
|
+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]; |
|
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. |
|
Patch is ready for review. http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR30166-master-MNV/view/ALL/ |
|
+Standard_Boolean parseGlslSourceFlag (Standard_CString theArg, + OpenGl_ShaderProgramDumpLevel& theGlslDumpLevel) static |
|
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. |
|
Branch CR30166_2 has been updated forcibly by mnv. SHA-1: c34f3bfb2871bb250cd2e25eb912fddcc6dd7f16 |
|
Patch is ready for review |
|
Branch CR30166_2 has been updated forcibly by kgv. SHA-1: 0e59279f712ca023fc151df633e277f1ce611df9 |
|
Please take the patch. |
|
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 |
|
Branch CR30166_2 has been deleted by inv. SHA-1: 0e59279f712ca023fc151df633e277f1ce611df9 |
|
Branch CR30166_1 has been deleted by inv. SHA-1: 6082c93b495ba26a767896862108d335d2c9e32f |
|
Branch CR30166 has been deleted by inv. SHA-1: 29700d86f8f0bff2c6eeef7d53acf2fd9745fbd7 |
occt: master 84e84755 2018-09-27 13:30:48
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. |
Affected Issues 0030166 |
|
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 |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-09-27 09:47 |
|
New Issue | |
2018-09-27 09:47 |
|
Assigned To | => kgv |
2018-09-27 09:47 |
|
Assigned To | kgv => mnv |
2018-09-27 09:47 |
|
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 |
|
Note Added: 0079734 | |
2018-10-05 17:27 |
|
Assigned To | mnv => kgv |
2018-10-05 17:27 |
|
Status | assigned => resolved |
2018-10-05 17:27 |
|
Steps to Reproduce Updated | |
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:55 | kgv | Description Updated | |
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 |
|
Note Added: 0079795 | |
2018-10-08 16:21 |
|
Assigned To | mnv => kgv |
2018-10-08 16:21 |
|
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 |