jamesh wrote: ↑Thu Jul 11, 2019 9:52 am
Legacy OpenVG is not supported on the Pi4.
Sorry.
Please, can you explain, how you know that?
I have Raspberry Pi 4 Model B (rasbian kernel 4.19.81-v7l+) (bullseye/sid) with this, Broadcom closed

source,
start4x.elf version:
Code: Select all
vcos_build_version = d1843b82bb73db6d518b8fda432261e47a45a512 (clean)
vcos_build_branch = bcm2711_2
vcos_build_date = Mar 26 2020
vcos_build_time = 17:19:59
vcos_build_user = dom
vcos_build_hostname = buildbot
When I run this (linked with -pthread -lrt -lvchostif -lvchiq_arm -lvcos -lbcm_host -lbrcmEGL -lbrcmGLESv2)
Code: Select all
VGPath testPath = VG_INVALID_HANDLE;
VGubyte cmds[] = {VG_MOVE_TO_ABS,VG_LINE_TO_ABS,VG_CLOSE_PATH};
VGfloat data[] = {0.0f,0.0f,1.0f,1.0f};
int segs = 2;
testPath = vgCreatePath(
VG_PATH_FORMAT_STANDARD,
VG_PATH_DATATYPE_F,
1.0f,
0.0f,
0,
0,
VG_PATH_CAPABILITY_APPEND_TO | VG_PATH_CAPABILITY_PATH_LENGTH);
vgAppendPathData(testPath, segs, cmds, data);
int callCount = 0;
while (active) {
int numSegments = vgGetParameteri(testPath,VG_PATH_NUM_SEGMENTS);
float pathLength = vgPathLength(testPath,0,numSegments);
fprintf(stderr,"#%d numSegments: %d pathLength: %.2f eglerr: 0x%04x vgerr: 0x%04x\n",callCount, numSegments, pathLength, eglGetError(), vgGetError());
vgAppendPathData(testPath, segs, cmds, data);
callCount++;
usleep(10000);
}
at "legacy" EGL context on dispmanx_window EGL surface, it will prints this:
Code: Select all
#0 numSegments: 2 pathLength: 1.41 eglerr: 0x3000 vgerr: 0x0000
#1 numSegments: 4 pathLength: 2.83 eglerr: 0x3000 vgerr: 0x0000
#2 numSegments: 6 pathLength: 4.24 eglerr: 0x3000 vgerr: 0x0000
#3 numSegments: 8 pathLength: 5.66 eglerr: 0x3000 vgerr: 0x0000
#4 numSegments: 10 pathLength: 7.07 eglerr: 0x3000 vgerr: 0x0000
#5 numSegments: 12 pathLength: 8.49 eglerr: 0x3000 vgerr: 0x0000
#6 numSegments: 14 pathLength: 9.90 eglerr: 0x3000 vgerr: 0x0000
#7 numSegments: 16 pathLength: 11.31 eglerr: 0x3000 vgerr: 0x0000
#8 numSegments: 18 pathLength: 12.73 eglerr: 0x3000 vgerr: 0x0000
#9 numSegments: 20 pathLength: 14.14 eglerr: 0x3000 vgerr: 0x0000
#10 numSegments: 22 pathLength: 15.56 eglerr: 0x3000 vgerr: 0x0000
#11 numSegments: 24 pathLength: 16.97 eglerr: 0x3000 vgerr: 0x0000
#12 numSegments: 26 pathLength: 18.38 eglerr: 0x3000 vgerr: 0x0000
#13 numSegments: 28 pathLength: 19.80 eglerr: 0x3000 vgerr: 0x0000
#14 numSegments: 30 pathLength: 21.21 eglerr: 0x3000 vgerr: 0x0000
#15 numSegments: 32 pathLength: 22.63 eglerr: 0x3000 vgerr: 0x0000
#16 numSegments: 34 pathLength: 24.04 eglerr: 0x3000 vgerr: 0x0000
#17 numSegments: 36 pathLength: 25.46 eglerr: 0x3000 vgerr: 0x0000
#18 numSegments: 38 pathLength: 26.87 eglerr: 0x3000 vgerr: 0x0000
#19 numSegments: 40 pathLength: 28.28 eglerr: 0x3000 vgerr: 0x0000
#20 numSegments: 42 pathLength: 29.70 eglerr: 0x3000 vgerr: 0x0000
#21 numSegments: 44 pathLength: 31.11 eglerr: 0x3000 vgerr: 0x0000
#22 numSegments: 46 pathLength: 32.53 eglerr: 0x3000 vgerr: 0x0000
#23 numSegments: 48 pathLength: 33.94 eglerr: 0x3000 vgerr: 0x0000
#24 numSegments: 50 pathLength: 35.36 eglerr: 0x3000 vgerr: 0x0000
#25 numSegments: 52 pathLength: 36.77 eglerr: 0x3000 vgerr: 0x0000
If I look to vg client implementation source at
https://github.com/raspberrypi/userland ... g_client.c
I get, that value of numSegments is calculated on ARM side, but
vgPathLength is doing RPC to vchiq !
Run
and you will see:
Code: Select all
'VG_PATH_T.segments'
'VG_PATH_T.coords'
'KHRN_IMAGE_T.storage'
'KHRN_IMAGE_T.storage'
'KHRN_IMAGE_T.storage'
'EGL_SERVER_SURFACE_T'
'VG_SERVER_STATE_T'
'KHRN_MAP_T.storage'
'khdispatch_readahead'
'khdispatch_workspace'
'khrn_hw_null_render'
'KHRN_MAP_64_T.storage'
'KHRN_MAP_T.storage'
'KHRN_PID_MAP_T.storage'
'KHRN_MAP_T.storage'
'KHRN_MAP_T.storage'
'KHRN_MAP_T.storage'
'dispmanx_resource'
'ILCS VC buffer pool'
'ARM FB'
'audioplus_tmp_buf'
'camera fast alloc arena'
Really is OpenVG not supported? Where is length of path calculated if OpenVG is not supported?
vchiq will freeze after egSwapBuffers or vgClear...it is possible to ask Broadcom people directly?
Take care!