【已解决】4.1-Release版本rk3568上移植的Qt应用使用opengl绘制异常问题
SamSong8610 2024-07-29 10:50:49
1、问题描述
使用qt sig发布的alpha_v6 Qt5.15.12 OpenHamrony armeabi-v7a SDK开发了一个opengl的demo程序,在rk3568开发板上运行时,出现残影问题,现象可以参见附件视频。
版本信息
# begetctl dump api
Begin dump syspara
=======================
DeviceType:default
Manufacture:default
Brand:default
MarketName:OpenHarmony 3.2
ProductSeries:default
ProductModel:ohos
SoftwareModel:default
HardwareModel:default
Serial:7001005458323933328a26cf4c283900
OSFullName:OpenHarmony-4.1.7.5
DisplayVersion:OpenHarmony 4.1.7.5
BootloaderVersion:bootloader
GetSecurityPatchTag:2024/04/01
AbiList:default
IncrementalVersion:default
VersionId:default/default/default/default/OpenHarmony-4.1.7.5/ohos/default/11/default/default
BuildType:default
BuildUser:default
BuildHost:default
BuildTime:default
BuildRootHash:default
GetOsReleaseType:Release
GetHardwareProfile:default
FirstApiVersion:1
GetSerial:7001005458323933328a26cf4c283900
acl serial:
GetDevUdid:4AADEE88F7185102CFFC4A16CCD5B92AD679A5E7AB5835F9D1119FFC6743AEAC
Acl devUdid:
Version:4.1.7.5
GetSdkApiVersion:11
GetSystemCommitId:1905
=======================
End dump syspara
2、问题分析
使用以下命令开启rosen的dump功能,采集各个图层(输出目录/data),使用PixelViewer查看确认各个图层绘制是正常的,因此猜测是合成导致的。
setenforce 0
param set rosen.dumplayer.enabled 1
使用hidumper查看surface信息如下
# hidumper -s 10 -a surface
-- LayerInfo
surface [openharmony_qt_mainwindowSurface] NodeId[2688649527312] LayerId[8]:
zOrder = 0, visibleNum = 1, transformType = 0 <no rotation>, compositionType = 1 <device composistion>, blendType = 3 <SRC_OVER blending>, layerAlpha = [enGlobalAlpha(1), enPixelAlpha(0), alpha0(0), alpha1(0), gAlpha(255)].
layerRect = [0, 0, 720, 1280], cropRect = [0, 0, 720, 1280],visibleRegions[0] = [0, 0, 720, 1280], dirtyRegions[0] = [0, 0, 720, 1280], BufferQueue:
default-size = [720x1280], FIFO = 5, name = openharmony_qt_mainwindowSurface, uniqueId = 2688649527312, usedBufferListLen = 5, freeBufferListLen = 0, dirtyBufferListLen = 3, totalBuffersMemSize = 18000.00(KiB).
bufferQueueCache:
sequence = 42, state = 1 <requested>, timestamp = 0, damagesRect = [0] = [0, 0, 720, 1280], config = [720x1280, 8, 12, 9, 3000], bufferWith = 720, bufferHeight = 1280, bufferMemSize = 3600.00(KiB).
sequence = 43, state = 2 <flushed>, timestamp = 0, damagesRect = [0] = [0, 0, 720, 1280], config = [720x1280, 8, 12, 9, 3000], bufferWith = 720, bufferHeight = 1280, bufferMemSize = 3600.00(KiB).
sequence = 44, state = 2 <flushed>, timestamp = 0, damagesRect = [0] = [0, 0, 720, 1280], config = [720x1280, 8, 12, 9, 3000], bufferWith = 720, bufferHeight = 1280, bufferMemSize = 3600.00(KiB).
sequence = 45, state = 2 <flushed>, timestamp = 0, damagesRect = [0] = [0, 0, 720, 1280], config = [720x1280, 8, 12, 9, 3000], bufferWith = 720, bufferHeight = 1280, bufferMemSize = 3600.00(KiB).
sequence = 46, state = 3 <acquired>, timestamp = 0, damagesRect = [0] = [0, 0, 720, 1280], config = [720x1280, 8, 12, 9, 3000], bufferWith = 720, bufferHeight = 1280, bufferMemSize = 3600.00(KiB).
surface [myapplication0] NodeId[2688649527310] LayerId[7]:
zOrder = 1, visibleNum = 1, transformType = 0 <no rotation>, compositionType = 1 <device composistion>, blendType = 3 <SRC_OVER blending>, layerAlpha = [enGlobalAlpha(1), enPixelAlpha(0), alpha0(0), alpha1(0), gAlpha(255)].
layerRect = [0, 0, 720, 1280], cropRect = [0, 0, 720, 1280],visibleRegions[0] = [0, 0, 720, 1280], dirtyRegions[0] = [0, 0, 720, 1280], BufferQueue:
default-size = [720x1280], FIFO = 3, name = myapplication0, uniqueId = 2688649527310, usedBufferListLen = 2, freeBufferListLen = 1, dirtyBufferListLen = 0, totalBuffersMemSize = 7200.00(KiB).
bufferQueueCache:
sequence = 40, state = 3 <acquired>, timestamp = 45569324481, damagesRect = [0] = [0, 0, 720, 1280], config = [720x1280, 8, 12, 9, 3000], bufferWith = 720, bufferHeight = 1280, bufferMemSize = 3600.00(KiB).
sequence = 41, state = 0 <released>, timestamp = 43744463783, damagesRect = [0] = [0, 0, 720, 1280], config = [720x1280, 8, 12, 9, 3000], bufferWith = 720, bufferHeight = 1280, bufferMemSize = 3600.00(KiB).
surface [SystemUi_PrivacyIndicator] NodeId[2688649527305] LayerId[4]:
zOrder = 3, visibleNum = 1, transformType = 0 <no rotation>, compositionType = 1 <device composistion>, blendType = 3 <SRC_OVER blending>, layerAlpha = [enGlobalAlpha(1), enPixelAlpha(0), alpha0(0), alpha1(0), gAlpha(255)].
layerRect = [0, 0, 720, 32], cropRect = [0, 0, 720, 32],visibleRegions[0] = [0, 0, 720, 32], dirtyRegions[0] = [0, 0, 720, 32], BufferQueue:
default-size = [720x32], FIFO = 3, name = SystemUi_PrivacyIndicator, uniqueId = 2688649527305, usedBufferListLen = 3, freeBufferListLen = 2, dirtyBufferListLen = 0, totalBuffersMemSize = 270.00(KiB).
bufferQueueCache:
sequence = 30, state = 0 <released>, timestamp = 43527225592, damagesRect = [0] = [0, 0, 720, 32], config = [720x32, 8, 12, 9, 3000], bufferWith = 720, bufferHeight = 32, bufferMemSize = 90.00(KiB).
sequence = 32, state = 3 <acquired>, timestamp = 43527225592, damagesRect = [0] = [0, 0, 720, 32], config = [720x32, 8, 12, 9, 3000], bufferWith = 720, bufferHeight = 32, bufferMemSize = 90.00(KiB).
sequence = 34, state = 0 <released>, timestamp = 32274089048, damagesRect = [0] = [0, 0, 720, 32], config = [720x32, 8, 12, 9, 3000], bufferWith = 720, bufferHeight = 32, bufferMemSize = 90.00(KiB).
FrameBufferSurface
BufferQueue:
default-size = [0x0], FIFO = 3, name = FrameBuffer, uniqueId = 2688649527296, usedBufferListLen = 2, freeBufferListLen = 1, dirtyBufferListLen = 0, totalBuffersMemSize = 7200.00(KiB).
bufferQueueCache:
sequence = 21, state = 0 <released>, timestamp = 0, damagesRect = [0] = [0, 0, 720, 1280], config = [720x1280, 8, 12, 73, 3000], bufferWith = 720, bufferHeight = 1280, bufferMemSize = 3600.00(KiB).
sequence = 22, state = 3 <acquired>, timestamp = 0, damagesRect = [0] = [0, 0, 720, 1280], config = [720x1280, 8, 12, 73, 3000], bufferWith = 720, bufferHeight = 1280, bufferMemSize = 3600.00(KiB).
对比普通hap应用的surface信息,qt应用多了一层透明的图层(在demo中是myapplication0。
3、求助
该问题如何进一步定位解决?
您需要先 登录 才能评论/回答
全部评论(8)
glClear前,可尝试设置glClearColor,参考如下:
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
1
2024-07-29 16:48:34
能提供demo吗
赞
2024-07-29 11:15:23
我把编译好的hap上传到网盘了,可以直接下载安装到rk3568上
链接:https://pan.baidu.com/s/1vsAoX4Kb6on0kgYHPQixXg?pwd=8ehv
提取码:8ehv
赞