MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030631Open CASCADE[OCCT] OCCT:Visualizationpublic2019-04-04 21:572019-05-07 14:27
Reporterkgv 
Assigned Tokgv 
PrioritynormalSeverityfeature 
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0030631: Visualization - Vulkan graphic driver prototype
DescriptionIt is proposed writing a Vulkan graphic driver prototype as alternative to OpenGl_GraphicDriver.

TODO:
- [0030635] Move functionality, not specific to OpenGL from TKOpenGl to TKV3d.
  This might include OpenGl_Layer and partial of OpenGl_ShaderManager.
- [0030640] Handle [0,1] depth range used by Vulkan, different from [-1,1] used by OpenGL. Note that NDC [-1,1] range is also pre-considered by various OCCT algorithms using Graphic3d_Camera (projection routines), including selection.
- Handle right-hand coordinate system in Vulkan (contrary to left-hand in OpenGL); (0,0) means top-left viewport corner in Vulkan rather than bottom-left corner in OpenGL. Since OCCT follows OpenGL coordinate system (including 2D presentations), it is undesirable changing convention and instead - flip image vertically during rendering.
- Migrate uniforms to uniform blocks within GLSL programs with embedded bindings and locations required by SPIR-V. This might include Matrix block, Standard Material block, Standard Light Sources block, PBR Material Block, Clipping Planes block, etc. GPU Resource manager should allocate large UBOs for multiple aspects, so that dynamic variables will be passed via offset in UBO to pipeline. SynchronizeAspects should access UBOs via sharable interface, probably generating map keys for reusing equal materials / transformations in the same way as TKOpenGl shares textures.
- Graphic3d_Buffer can be allocated directly accessible for GPU, when integrated GPU is used to avoid extra memory copies. This should be optional (application should NOT modify this memory while rendering), but algorithms like StdPrs_ShadedShape are designed to create Graphic3d_Buffer on-the-fly, so that these presentation builders can benefit on integrated GPUs.
- Retrieve Vulkan function pointers table.
  AMD publications claim that CPU overhead due to proxy vulkan-1.dll is not negligible (1-5%).
- Implement vulkan-1.dll loader to handle obsolete systems without Vulkan drivers.
- Vulkan_Device to search for known OpenGL context device.
  It could be particularly useful retrieving memory requirements using Vulkan API even while working with OpenGL API (where this information is unavailable) to estimate properly GPU memory usage by resources taking into account also various hardware-specific alignment limits.
- Redesign Shader Manager to be able generating standard GLSL programs without building OCCT through Tcl/CMake scripts. Generate SPIR-V shaders using this mechanism during OCCT project generation (to avoid bloating OCCT git with binaries).
- Is it possible loading the same Vulkan device as automatically returned by OpenGL (e.g. device connected to the main display)?
Steps To Reproduce
dtracelevel warn
pload MODELING VISUALIZATION
box b0 0 0 0 1 2 3
box b1 3 0 0 2 1 3
vclear
vinit View1 -disp vulkan
vglinfo
vdisplay -dispMode 0 b0
vdisplay -dispMode 1 b1
vfit
TagsNo tags attached.
Test case number
Attached Filestxt file icon vk_amd.txt (6,576 bytes) 2019-04-13 16:21
txt file icon vk_geforce.txt (6,516 bytes) 2019-04-13 16:21
txt file icon vk_intel.txt (6,456 bytes) 2019-04-13 16:22
log file icon vk.log (110,566 bytes) 2019-04-13 16:22

- Relationships
related to 0025282closedbugmaster Open CASCADE Visualization, OpenGl_PrimitiveArray - provide built-in GLSL programs as alternative to FFP 
related to 0024838closedbugmaster Open CASCADE Visualization, TKOpenGl - make general rendering path compatible with OpenGL 3.1+ core profiles 
parent of 0030635verifiedapn Open CASCADE Visualization - move OpenGl_Layer to Graphic3d_Layer 
parent of 0030126newkgv Open CASCADE Visualization, OpenGl_ShaderManager - define standard Lighting & Clipping within custom GLSL programs as template functions 
related to 0030700assignediko Open CASCADE Visualization, TKOpenGl - support PBR Metallic-Roughness shading model 
child of 0030640newkgv Open CASCADE Visualization, Graphic3d_Camera - add option creating Projection matrix with [0,1] depth range 
Not all the children of this issue are yet resolved or closed.

-  Notes
(0083421)
git (administrator)
2019-04-04 23:26

Branch CR30631 has been created by kgv.

SHA-1: bbbbed037f840eb2c08a7b1581ebaec22b9546f1


Detailed log of new commits:

Author: kgv
Date: Thu Apr 4 23:20:45 2019 +0300

    0030631: Visualization - Vulkan graphic driver prototype
(0083447)
git (administrator)
2019-04-05 20:07

Branch CR30631 has been updated forcibly by kgv.

SHA-1: cecbfee484f796000677f3d1b80abc7356c6ccac
(0083452)
git (administrator)
2019-04-06 16:55

Branch CR30631 has been updated forcibly by kgv.

SHA-1: c3790fbe2bf8d9acbba691aa8225cd6cf7ef4432
(0083453)
git (administrator)
2019-04-06 17:02

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 75535d8b484a45e9db41998373d334382474ec00
(0083454)
git (administrator)
2019-04-06 18:24

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 65e29450ef872cbefd62c328b10570cd0c579a28
(0083455)
git (administrator)
2019-04-06 21:39

Branch CR30631 has been updated forcibly by kgv.

SHA-1: ee12be16b37b0fa9c2b01df05212844252d1870f
(0083456)
git (administrator)
2019-04-06 23:20

Branch CR30631 has been updated forcibly by kgv.

SHA-1: e9b60673efcd8c375ab2076b071ecced2cf505b3
(0083457)
git (administrator)
2019-04-07 01:18

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 34aa0c9b1a9fda1b47cb2727993d7cc738bc13a2
(0083458)
git (administrator)
2019-04-07 01:53

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 9564b859c66bbafd28b3573303d7df193ca8e9b3
(0083459)
git (administrator)
2019-04-07 02:04

Branch CR30631 has been updated forcibly by kgv.

SHA-1: ca392675e1137ff333a789b524f9d9815e1a9bfc
(0083460)
git (administrator)
2019-04-07 03:09

Branch CR30631 has been updated forcibly by kgv.

SHA-1: fba13979e16691b03d03099897c0fc87af9afcda
(0083461)
git (administrator)
2019-04-07 14:54

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 20d190b100b36864cb8386d799bf074e58400899
(0083462)
git (administrator)
2019-04-07 18:48

Branch CR30631 has been updated forcibly by kgv.

SHA-1: b3511f008a9cb3ec3a4b6a89992d775fc8b6b2b2
(0083463)
git (administrator)
2019-04-07 20:48

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 4236edf853281a5505c2d4dcdf640ade48307192
(0083464)
git (administrator)
2019-04-07 22:27

Branch CR30631 has been updated forcibly by kgv.

SHA-1: f7f877354726b7e31e377e2c4605e7ef0ee51a88
(0083465)
git (administrator)
2019-04-07 22:56

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 32ea24e2d72a558e4919a1c7e7168636ee366d48
(0083469)
git (administrator)
2019-04-08 01:19

Branch CR30631 has been updated forcibly by kgv.

SHA-1: bda89b53bc26d8952c8d3074bceb3e42c990820a
(0083470)
git (administrator)
2019-04-08 02:21

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 4e025bb8e10544224cdeec20950a400faa0b6e6c
(0083541)
git (administrator)
2019-04-08 20:16

Branch CR30631_1 has been created by kgv.

SHA-1: 25cd7cda0be320170cfa341974b58860661b4671


Detailed log of new commits:

Author: kgv
Date: Thu Apr 4 23:20:45 2019 +0300

    0030631: Visualization - Vulkan graphic driver prototype

Author: kgv
Date: Mon Apr 8 19:47:20 2019 +0300

    0030640: Visualization, Graphic3d_Camera - add option creating Projection matrix with [0,1] depth range
    
    Added new property Graphic3d_Camera::IsZeroToOneDepth() and OpenGl_Caps::useZeroToOneDepth
    for activating [0,1] depth range instead of [-1,1] range using glClipControl() within OpenGL 4.5+.
(0083542)
git (administrator)
2019-04-08 20:19

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 861e4f6be5fa09b4dfafabfb1bb2abb67a4be442
(0083577)
git (administrator)
2019-04-09 14:39

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 6aa970af41ea25e058480653aab15d5c80058bbb
(0083592)
git (administrator)
2019-04-10 10:29

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 85adfb43bf000a511e417b5440a48f3dc1cd85d6
(0083601)
git (administrator)
2019-04-10 12:58

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: a4ab0add400d2ce745f665234097d48f64aae95f
(0083607)
git (administrator)
2019-04-10 15:32

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: a5537a8b0172fd19f4a1b1402b3d642f33555c94
(0083614)
git (administrator)
2019-04-10 19:17

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 2bc1423506fcf57df57d197426b7a4b854d1d014
(0083615)
git (administrator)
2019-04-10 19:36

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 5dcedaa06796e1f23d9b17aa551a62f6f15eed31
(0083616)
git (administrator)
2019-04-10 21:31

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 97bad4e8e82e823c01395847c611a3730173a0bc
(0083617)
git (administrator)
2019-04-10 22:07

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 67c073593959ef724681bf64b7492b3499377d03
(0083618)
git (administrator)
2019-04-10 22:49

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 499e140059492f80bd6f54a2b059e86dfa5c0ad1
(0083619)
git (administrator)
2019-04-10 22:52

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 9750e15b8d2c573bfd6bec79aed5efd265396cf6
(0083620)
git (administrator)
2019-04-11 00:12

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 1223afc170da78c32adbb07de7eeb057101b1949
(0083621)
git (administrator)
2019-04-11 00:26

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: abc22d780bf03890215a77e856c379f07c774659
(0083622)
git (administrator)
2019-04-11 01:06

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 0d0f8b594d0fe387f863d402e52ab3e411aa1934
(0083623)
git (administrator)
2019-04-11 02:03

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: f08c7349eda732fee79fce729bbd5341bfaa509d
(0083624)
git (administrator)
2019-04-11 03:35

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: e1a55d97c9b5ff36c6300956443ec5facbf15616
(0083636)
git (administrator)
2019-04-11 14:20

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 37d42d76020714f35c3e9827bdf33837344e97f8
(0083639)
git (administrator)
2019-04-11 15:26

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 7a9e8701da80b91e3647f6a5345f28ded9f92df0
(0083640)
git (administrator)
2019-04-11 15:32

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: fd346528a7f11b024301676e29461d4ce4bf9123
(0083641)
git (administrator)
2019-04-11 15:44

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 9c8c73bfcae938ff789a6dfe759e078c4c2bcccd
(0083690)
git (administrator)
2019-04-13 15:20

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: cd98a7033e46d8e03139e7d6c16d721a2042800f
(0083691)
git (administrator)
2019-04-13 16:17

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 680840c57a618b8fe4812ea448d59cfd3c08c016
(0083692)
git (administrator)
2019-04-13 17:49

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: aba6b97d44cad1a92569a63a741bbc019c4d6e43
(0083693)
git (administrator)
2019-04-13 18:00

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: f2c6125636eda8d9d11ab3146a685acaef2460a6
(0083694)
git (administrator)
2019-04-13 18:19

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 6a481a8ad76a868b679dbe680758ce9c464d710d
(0083695)
git (administrator)
2019-04-13 19:14

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 3e3e298670ed8ac37a7a56eac058a58444abdd30
(0083696)
git (administrator)
2019-04-13 19:28

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 72f51a7ea4f2397ad4fe627db9cd7aab7afbfd3c
(0083697)
git (administrator)
2019-04-13 19:36

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 22e94bbe2a47fa00aeb1f0fb530293408583f8b2
(0083698)
git (administrator)
2019-04-13 23:34

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 2db94f360bba4628e2ad646c2058a6681266e20d
(0083699)
git (administrator)
2019-04-14 00:21

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: e5097ed49441c712944e6c056945fa056981e69d
(0083700)
git (administrator)
2019-04-14 00:36

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 1a67767e781befecbba1af036845c791a493de81
(0083730)
git (administrator)
2019-04-14 19:36

Branch CR30631_2 has been created by kgv.

SHA-1: 16a00cd08ae64454d85161d6d4522d481f5ad5a9


Detailed log of new commits:

Author: kgv
Date: Thu Apr 4 23:20:45 2019 +0300

    0030631: Visualization - Vulkan graphic driver prototype
(0083731)
git (administrator)
2019-04-14 20:09

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 38bb36af05db4a29c951a852c2a1e2da21013de6
(0083732)
git (administrator)
2019-04-14 20:37

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: fdace77f07abb141a9fbd2e30b0a87804343b6fa
(0083733)
git (administrator)
2019-04-14 21:02

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 3796634363a024cfa3a3b51270c6b33b875ea580
(0083734)
git (administrator)
2019-04-14 21:15

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 0144ac98cf79f0886d8540995fd5365791a963a0
(0083735)
git (administrator)
2019-04-14 21:34

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: f6c8b4183dde362cb3a9df825acc2e425657dd5c
(0083736)
git (administrator)
2019-04-14 23:21

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 745b75b6bea41f3d4297ac8dfa076cbcc207d960
(0083737)
git (administrator)
2019-04-14 23:55

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 509939712a7ddd0f3d1c126c4908100c14f63efc
(0083738)
git (administrator)
2019-04-15 00:01

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: c02d08647274c938c87b59cb70da6b063024ed7a
(0083739)
kgv (developer)
2019-04-15 01:09
edited on: 2019-04-15 11:05

Naive incomplete Vulkan prototype, 25k boxes, VSync is ON.

pload MODELING VISUALIZATION
set nx 50; set ny 50; set nz 10;
set bb {}
for {set x 1} {$x <= $nx} {incr x} { for {set y 1} {$y <= $ny} {incr y} { for {set z 1} {$z <= 
$nz} {incr z} { box b${x}_${y}_${z} $x $y $z 0.5 0.5 0.5; lappend bb b${x}_${y}_${z} } } }
for {set x 1} {$x <= $nx} {incr x} { for {set y 1} {$y <= $ny} {incr y} { for {set z 1} {$z <= 
$nz} {incr z} { box b${x}_${y}_${z} $x $y $z 0.5 0.5 0.5; incmesh b${x}_${y}_${z} 0.001 } } }

vclear
vinit View1 -disp vulkan
#vinit View1
vrenderparams -frustumCulling off -shadingModel phong
vdisplay -dispMode 1 {*}$bb
vfit


Radeon RX Vega, OpenGL:
FPS: 19.9
CPU: 43.5 msec


Radeon RX Vega, Vulkan:
FPS: 46.3
CPU: 19.3 msec


GeForce GTX 1060, OpenGL:
FPS: 30.0
CPU: 40.3 msec


GeForce GTX 1060, Vulkan:
FPS: 30.0
CPU: 17.5 msec


Intel(R) HD Graphics 630, OpenGL:
FPS: 17.9
CPU: 54.8 msec


Intel(R) HD Graphics 630, Vulkan:
FPS: 18.9
CPU: 22.1 msec


R9 380, OpenGL:
FPS: 19.9
CPU: 39.8 msec


R9 380, Vulkan:
FPS: 54.6
CPU: 16.2 msec



- Issue History
Date Modified Username Field Change
2019-04-04 21:57 kgv New Issue
2019-04-04 21:57 kgv Assigned To => kgv
2019-04-04 23:26 git Note Added: 0083421
2019-04-05 20:07 git Note Added: 0083447
2019-04-06 16:55 git Note Added: 0083452
2019-04-06 17:02 git Note Added: 0083453
2019-04-06 18:24 git Note Added: 0083454
2019-04-06 21:39 git Note Added: 0083455
2019-04-06 23:20 git Note Added: 0083456
2019-04-07 01:18 git Note Added: 0083457
2019-04-07 01:53 git Note Added: 0083458
2019-04-07 02:04 git Note Added: 0083459
2019-04-07 03:09 git Note Added: 0083460
2019-04-07 14:54 git Note Added: 0083461
2019-04-07 18:48 git Note Added: 0083462
2019-04-07 20:48 git Note Added: 0083463
2019-04-07 22:27 git Note Added: 0083464
2019-04-07 22:56 git Note Added: 0083465
2019-04-08 01:19 git Note Added: 0083469
2019-04-08 02:21 git Note Added: 0083470
2019-04-08 16:15 kgv Relationship added parent of 0030635
2019-04-08 19:31 kgv Relationship added child of 0030640
2019-04-08 20:16 git Note Added: 0083541
2019-04-08 20:19 git Note Added: 0083542
2019-04-09 14:39 git Note Added: 0083577
2019-04-10 10:29 git Note Added: 0083592
2019-04-10 12:58 git Note Added: 0083601
2019-04-10 15:32 git Note Added: 0083607
2019-04-10 19:17 git Note Added: 0083614
2019-04-10 19:36 git Note Added: 0083615
2019-04-10 21:31 git Note Added: 0083616
2019-04-10 22:07 git Note Added: 0083617
2019-04-10 22:49 git Note Added: 0083618
2019-04-10 22:52 git Note Added: 0083619
2019-04-11 00:12 git Note Added: 0083620
2019-04-11 00:26 git Note Added: 0083621
2019-04-11 01:06 git Note Added: 0083622
2019-04-11 02:03 git Note Added: 0083623
2019-04-11 03:35 git Note Added: 0083624
2019-04-11 14:20 git Note Added: 0083636
2019-04-11 15:26 git Note Added: 0083639
2019-04-11 15:32 git Note Added: 0083640
2019-04-11 15:44 git Note Added: 0083641
2019-04-13 12:43 kgv Description Updated View Revisions
2019-04-13 13:11 kgv Description Updated View Revisions
2019-04-13 15:20 git Note Added: 0083690
2019-04-13 16:17 git Note Added: 0083691
2019-04-13 16:21 kgv File Added: vk_amd.txt
2019-04-13 16:21 kgv File Added: vk_geforce.txt
2019-04-13 16:22 kgv File Added: vk_intel.txt
2019-04-13 16:22 kgv File Added: vk.log
2019-04-13 17:49 git Note Added: 0083692
2019-04-13 18:00 git Note Added: 0083693
2019-04-13 18:19 git Note Added: 0083694
2019-04-13 19:11 kgv Steps to Reproduce Updated View Revisions
2019-04-13 19:14 git Note Added: 0083695
2019-04-13 19:28 git Note Added: 0083696
2019-04-13 19:36 git Note Added: 0083697
2019-04-13 23:34 git Note Added: 0083698
2019-04-14 00:21 git Note Added: 0083699
2019-04-14 00:36 git Note Added: 0083700
2019-04-14 19:36 git Note Added: 0083730
2019-04-14 20:09 git Note Added: 0083731
2019-04-14 20:37 git Note Added: 0083732
2019-04-14 21:02 git Note Added: 0083733
2019-04-14 21:15 git Note Added: 0083734
2019-04-14 21:34 git Note Added: 0083735
2019-04-14 23:21 git Note Added: 0083736
2019-04-14 23:55 git Note Added: 0083737
2019-04-15 00:01 git Note Added: 0083738
2019-04-15 01:09 kgv Note Added: 0083739
2019-04-15 08:27 kgv Description Updated View Revisions
2019-04-15 08:30 kgv Description Updated View Revisions
2019-04-15 08:34 kgv Description Updated View Revisions
2019-04-15 11:05 kgv Note Edited: 0083739 View Revisions
2019-04-17 14:11 kgv Relationship added parent of 0030126
2019-04-17 14:11 kgv Relationship added related to 0025282
2019-04-17 14:11 kgv Relationship added related to 0024838
2019-04-17 14:17 kgv Relationship added related to 0028180
2019-05-07 14:27 kgv Relationship added related to 0030700


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker