View Issue Details

IDProjectCategoryView StatusLast Update
0030631Open CASCADEOCCT:Visualizationpublic2023-08-01 15:09
Reporterkgv Assigned Tovpozdyayev 
PrioritynormalSeverityfeature 
Status newResolutionopen 
Target VersionUnscheduled 
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 Files

  • vk_amd.txt (6,576 bytes)
  • vk_geforce.txt (6,516 bytes)
  • vk_intel.txt (6,456 bytes)
  • vk.log (110,566 bytes)

Relationships

related to 0025282 closedbugmaster Open CASCADE Visualization, OpenGl_PrimitiveArray - provide built-in GLSL programs as alternative to FFP 
related to 0024838 closedbugmaster Open CASCADE Visualization, TKOpenGl - make general rendering path compatible with OpenGL 3.1+ core profiles 
parent of 0030635 closedapn Open CASCADE Visualization - move OpenGl_Layer to Graphic3d_Layer 
parent of 0030126 assignedngavrilo Open CASCADE Visualization, Graphic3d_ShaderManager - define standard Lighting & Clipping within custom GLSL programs as template functions 
parent of 0031581 newvpozdyayev Open CASCADE Visualization, Graphic3d - add dedicated structure defining rasterization Pipeline parameters 
parent of 0031705 closedbugmaster Open CASCADE Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage 
parent of 0032152 closedbugmaster Open CASCADE Visualization - move out GLSL program generator from OpenGl_ShaderManager to Graphic3d_ShaderManager 
parent of 0032203 closedbugmaster Open CASCADE Draw Harness, ViewerTest - drop dependency from OpenGL 
related to 0030700 closedapn Open CASCADE Visualization, TKOpenGl - support PBR Metallic-Roughness shading model 
related to 0031021 closedapn Community Coding Rules - Deprecation warnings on OSX within Draw_Window_1.mm 
child of 0030640 closedbugmaster 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.

Activities

git

2019-04-04 23:26

administrator   ~0083421

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

git

2019-04-05 20:07

administrator   ~0083447

Branch CR30631 has been updated forcibly by kgv.

SHA-1: cecbfee484f796000677f3d1b80abc7356c6ccac

git

2019-04-06 16:55

administrator   ~0083452

Branch CR30631 has been updated forcibly by kgv.

SHA-1: c3790fbe2bf8d9acbba691aa8225cd6cf7ef4432

git

2019-04-06 17:02

administrator   ~0083453

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 75535d8b484a45e9db41998373d334382474ec00

git

2019-04-06 18:24

administrator   ~0083454

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 65e29450ef872cbefd62c328b10570cd0c579a28

git

2019-04-06 21:39

administrator   ~0083455

Branch CR30631 has been updated forcibly by kgv.

SHA-1: ee12be16b37b0fa9c2b01df05212844252d1870f

git

2019-04-06 23:20

administrator   ~0083456

Branch CR30631 has been updated forcibly by kgv.

SHA-1: e9b60673efcd8c375ab2076b071ecced2cf505b3

git

2019-04-07 01:18

administrator   ~0083457

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 34aa0c9b1a9fda1b47cb2727993d7cc738bc13a2

git

2019-04-07 01:53

administrator   ~0083458

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 9564b859c66bbafd28b3573303d7df193ca8e9b3

git

2019-04-07 02:04

administrator   ~0083459

Branch CR30631 has been updated forcibly by kgv.

SHA-1: ca392675e1137ff333a789b524f9d9815e1a9bfc

git

2019-04-07 03:09

administrator   ~0083460

Branch CR30631 has been updated forcibly by kgv.

SHA-1: fba13979e16691b03d03099897c0fc87af9afcda

git

2019-04-07 14:54

administrator   ~0083461

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 20d190b100b36864cb8386d799bf074e58400899

git

2019-04-07 18:48

administrator   ~0083462

Branch CR30631 has been updated forcibly by kgv.

SHA-1: b3511f008a9cb3ec3a4b6a89992d775fc8b6b2b2

git

2019-04-07 20:48

administrator   ~0083463

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 4236edf853281a5505c2d4dcdf640ade48307192

git

2019-04-07 22:27

administrator   ~0083464

Branch CR30631 has been updated forcibly by kgv.

SHA-1: f7f877354726b7e31e377e2c4605e7ef0ee51a88

git

2019-04-07 22:56

administrator   ~0083465

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 32ea24e2d72a558e4919a1c7e7168636ee366d48

git

2019-04-08 01:19

administrator   ~0083469

Branch CR30631 has been updated forcibly by kgv.

SHA-1: bda89b53bc26d8952c8d3074bceb3e42c990820a

git

2019-04-08 02:21

administrator   ~0083470

Branch CR30631 has been updated forcibly by kgv.

SHA-1: 4e025bb8e10544224cdeec20950a400faa0b6e6c

git

2019-04-08 20:16

administrator   ~0083541

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+.

git

2019-04-08 20:19

administrator   ~0083542

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 861e4f6be5fa09b4dfafabfb1bb2abb67a4be442

git

2019-04-09 14:39

administrator   ~0083577

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 6aa970af41ea25e058480653aab15d5c80058bbb

git

2019-04-10 10:29

administrator   ~0083592

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 85adfb43bf000a511e417b5440a48f3dc1cd85d6

git

2019-04-10 12:58

administrator   ~0083601

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: a4ab0add400d2ce745f665234097d48f64aae95f

git

2019-04-10 15:32

administrator   ~0083607

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: a5537a8b0172fd19f4a1b1402b3d642f33555c94

git

2019-04-10 19:17

administrator   ~0083614

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 2bc1423506fcf57df57d197426b7a4b854d1d014

git

2019-04-10 19:36

administrator   ~0083615

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 5dcedaa06796e1f23d9b17aa551a62f6f15eed31

git

2019-04-10 21:31

administrator   ~0083616

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 97bad4e8e82e823c01395847c611a3730173a0bc

git

2019-04-10 22:07

administrator   ~0083617

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 67c073593959ef724681bf64b7492b3499377d03

git

2019-04-10 22:49

administrator   ~0083618

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 499e140059492f80bd6f54a2b059e86dfa5c0ad1

git

2019-04-10 22:52

administrator   ~0083619

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 9750e15b8d2c573bfd6bec79aed5efd265396cf6

git

2019-04-11 00:12

administrator   ~0083620

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 1223afc170da78c32adbb07de7eeb057101b1949

git

2019-04-11 00:26

administrator   ~0083621

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: abc22d780bf03890215a77e856c379f07c774659

git

2019-04-11 01:06

administrator   ~0083622

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 0d0f8b594d0fe387f863d402e52ab3e411aa1934

git

2019-04-11 02:03

administrator   ~0083623

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: f08c7349eda732fee79fce729bbd5341bfaa509d

git

2019-04-11 03:35

administrator   ~0083624

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: e1a55d97c9b5ff36c6300956443ec5facbf15616

git

2019-04-11 14:20

administrator   ~0083636

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 37d42d76020714f35c3e9827bdf33837344e97f8

git

2019-04-11 15:26

administrator   ~0083639

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 7a9e8701da80b91e3647f6a5345f28ded9f92df0

git

2019-04-11 15:32

administrator   ~0083640

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: fd346528a7f11b024301676e29461d4ce4bf9123

git

2019-04-11 15:44

administrator   ~0083641

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 9c8c73bfcae938ff789a6dfe759e078c4c2bcccd

git

2019-04-13 15:20

administrator   ~0083690

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: cd98a7033e46d8e03139e7d6c16d721a2042800f

git

2019-04-13 16:17

administrator   ~0083691

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 680840c57a618b8fe4812ea448d59cfd3c08c016

kgv

2019-04-13 16:21

developer  

vk_amd.txt (6,576 bytes)

kgv

2019-04-13 16:21

developer  

vk_geforce.txt (6,516 bytes)

kgv

2019-04-13 16:22

developer  

vk_intel.txt (6,456 bytes)

kgv

2019-04-13 16:22

developer  

vk.log (110,566 bytes)

git

2019-04-13 17:49

administrator   ~0083692

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: aba6b97d44cad1a92569a63a741bbc019c4d6e43

git

2019-04-13 18:00

administrator   ~0083693

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: f2c6125636eda8d9d11ab3146a685acaef2460a6

git

2019-04-13 18:19

administrator   ~0083694

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 6a481a8ad76a868b679dbe680758ce9c464d710d

git

2019-04-13 19:14

administrator   ~0083695

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 3e3e298670ed8ac37a7a56eac058a58444abdd30

git

2019-04-13 19:28

administrator   ~0083696

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 72f51a7ea4f2397ad4fe627db9cd7aab7afbfd3c

git

2019-04-13 19:36

administrator   ~0083697

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 22e94bbe2a47fa00aeb1f0fb530293408583f8b2

git

2019-04-13 23:34

administrator   ~0083698

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 2db94f360bba4628e2ad646c2058a6681266e20d

git

2019-04-14 00:21

administrator   ~0083699

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: e5097ed49441c712944e6c056945fa056981e69d

git

2019-04-14 00:36

administrator   ~0083700

Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 1a67767e781befecbba1af036845c791a493de81

git

2019-04-14 19:36

administrator   ~0083730

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

git

2019-04-14 20:09

administrator   ~0083731

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 38bb36af05db4a29c951a852c2a1e2da21013de6

git

2019-04-14 20:37

administrator   ~0083732

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: fdace77f07abb141a9fbd2e30b0a87804343b6fa

git

2019-04-14 21:02

administrator   ~0083733

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 3796634363a024cfa3a3b51270c6b33b875ea580

git

2019-04-14 21:15

administrator   ~0083734

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 0144ac98cf79f0886d8540995fd5365791a963a0

git

2019-04-14 21:34

administrator   ~0083735

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: f6c8b4183dde362cb3a9df825acc2e425657dd5c

git

2019-04-14 23:21

administrator   ~0083736

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 745b75b6bea41f3d4297ac8dfa076cbcc207d960

git

2019-04-14 23:55

administrator   ~0083737

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 509939712a7ddd0f3d1c126c4908100c14f63efc

git

2019-04-15 00:01

administrator   ~0083738

Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: c02d08647274c938c87b59cb70da6b063024ed7a

kgv

2019-04-15 01:09

developer   ~0083739

Last edited: 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
2019-04-13 13:11 kgv Description Updated
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
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
2019-04-15 08:30 kgv Description Updated
2019-04-15 08:34 kgv Description Updated
2019-04-15 11:05 kgv Note Edited: 0083739
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-05-07 14:27 kgv Relationship added related to 0030700
2019-09-04 15:43 abv Target Version 7.4.0 => 7.5.0
2019-10-02 07:15 kgv Relationship added related to 0031021
2020-05-27 14:10 kgv Relationship added related to 0031581
2020-05-27 14:10 kgv Relationship replaced parent of 0031581
2020-08-11 09:43 kgv Relationship added parent of 0031705
2020-08-28 13:57 kgv Target Version 7.5.0 => 7.6.0
2021-02-21 15:34 kgv Relationship added parent of 0032152
2021-03-08 21:33 kgv Relationship added parent of 0032203
2021-08-24 14:19 kgv Target Version 7.6.0 => 7.7.0
2022-08-17 11:59 kgv Target Version 7.7.0 => 7.8.0
2022-10-19 15:49 smoskvin Assigned To kgv => vpozdyayev
2023-08-01 15:09 dpasukhi Target Version 7.8.0 => Unscheduled