VkQuake says:
ERROR-OUT BEGIN
QUAKE ERROR: Couldn't create window: Installed Vulkan doesn't implement the VK_KHR_surface extension
vulkaninfo
confirms
==========
VULKANINFO
==========
Vulkan Instance Version: 1.0.236
Instance Extensions: count = 7
==============================
VK_EXT_debug_report : extension revision 10
VK_EXT_debug_utils : extension revision 2
VK_KHR_device_group_creation : extension revision 1
VK_KHR_external_fence_capabilities : extension revision 1
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_surface.html
Nevermind, the issue was isolated to my home-rolled yocto shenanigans, it works on the starfive debian
6 Likes
How is the performance?
I compiled with Debian image 69, but it’s like watching a slide show.
Yes, it runs like a potato, GPU drivers or Mesa need a fix most likely.
1 Like
I had some better results with TyrQuake, as long as you don’t play full screen.
But that probably isn’t using Vulkan.
2 Likes
omac777
February 14, 2023, 7:15pm
6
Thank you for mentioning vkQuake.
I was able to successfully build it on Debian Sid with the mentioned packages and some additional ones listed here:
opened 06:59PM - 14 Feb 23 UTC
bug
Not really a bug. Just a few notes to help build vkQuake on VF2 board.
```
… sudo apt-get install git meson gcc glslang-tools spirv-tools libsdl2-dev libvulkan-dev libvorbis-dev libmad0-dev libx11-xcb-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
git is already the newest version (1:2.39.1-0.1).
gcc is already the newest version (4:12.2.0-3).
gcc set to manually installed.
The following additional packages will be installed:
gir1.2-ibus-1.0 libasound2-dev libblkid-dev libdbus-1-dev libdecor-0-dev libdrm-dev libegl-dev libgbm-dev libgl-dev libgles-dev libgles1 libglib2.0-dev libglib2.0-dev-bin libglx-dev libibus-1.0-5 libibus-1.0-dev libice-dev libmad0
libmount-dev libogg-dev libpciaccess-dev libpcre2-16-0 libpcre2-32-0 libpcre2-dev libpcre2-posix3 libpthread-stubs0-dev libpulse-dev libsamplerate0-dev libselinux1-dev libsepol-dev libsm-dev libsndio-dev libudev-dev libwayland-bin
libwayland-dev libx11-dev libxau-dev libxcb1-dev libxcursor-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxrender-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev ninja-build
python3-distutils python3-lib2to3 python3-setuptools uuid-dev x11proto-dev xorg-sgml-doctools xtrans-dev zlib1g-dev
Suggested packages:
libasound2-doc libgirepository1.0-dev libglib2.0-doc libxml2-utils libice-doc libsm-doc libwayland-doc libx11-doc libxcb-doc libxext-doc libxt-doc python-setuptools-doc
The following NEW packages will be installed:
gir1.2-ibus-1.0 glslang-tools libasound2-dev libblkid-dev libdbus-1-dev libdecor-0-dev libdrm-dev libegl-dev libgbm-dev libgl-dev libgles-dev libgles1 libglib2.0-dev libglib2.0-dev-bin libglx-dev libibus-1.0-5 libibus-1.0-dev
libice-dev libmad0 libmad0-dev libmount-dev libogg-dev libpciaccess-dev libpcre2-16-0 libpcre2-32-0 libpcre2-dev libpcre2-posix3 libpthread-stubs0-dev libpulse-dev libsamplerate0-dev libsdl2-dev libselinux1-dev libsepol-dev libsm-dev
libsndio-dev libudev-dev libvorbis-dev libvulkan-dev libwayland-bin libwayland-dev libx11-dev libx11-xcb-dev libxau-dev libxcb1-dev libxcursor-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbcommon-dev
libxrandr-dev libxrender-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev meson ninja-build python3-distutils python3-lib2to3 python3-setuptools spirv-tools uuid-dev x11proto-dev xorg-sgml-doctools xtrans-dev zlib1g-dev
0 upgraded, 68 newly installed, 0 to remove and 39 not upgraded.
```
Discovered when running meson build:
```
sudo apt-get install cmake libflac-dev libopus-dev libopusfile-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
cmake-data libarchive13 libjsoncpp25 libopusfile0 librhash0
Suggested packages:
cmake-doc cmake-format elpa-cmake-mode lrzip
The following NEW packages will be installed:
cmake cmake-data libarchive13 libflac-dev libjsoncpp25 libopus-dev libopusfile-dev libopusfile0 librhash0
```
meson build passes now:
```
meson setup --reconfigure build
The Meson build system
Version: 1.0.0
Source dir: /home/davidm/vkQuake
Build dir: /home/davidm/vkQuake/build
Build type: native build
Project name: vkquake
Project version: undefined
C compiler for the host machine: cc (gcc 12.2.0 "cc (Debian 12.2.0-14) 12.2.0")
C linker for the host machine: cc ld.bfd 2.40
Host machine cpu family: riscv64
Host machine cpu: riscv64
Program glslangValidator found: YES (/usr/bin/glslangValidator)
Program spirv-opt found: YES (/usr/bin/spirv-opt)
Program spirv-remap found: YES (/usr/bin/spirv-remap)
Library m found: YES
Library dl found: YES
Dependency threads found: YES unknown (cached)
Dependency sdl2 found: YES 2.26.2 (cached)
Dependency vulkan found: YES 1.3.239 (cached)
Dependency mad found: YES 0.15.1b (cached)
Found pkg-config: /usr/bin/pkg-config (1.8.1)
Run-time dependency flac found: YES 1.4.2
Dependency ogg found: YES 1.3.5 (cached)
Dependency vorbisfile found: YES 1.3.7 (cached)
Dependency vorbis found: YES 1.3.7 (cached)
Run-time dependency opus found: YES 1.3.1
Run-time dependency opusfile found: YES 0.12
Build targets in project: 33
Found ninja-1.11.1 at /usr/bin/ninja
```
meson setup --wipe build
meson setup --reconfigure build
time ninja -C build
real 1m11.146s
user 4m6.225s
sys 0m12.787s
meson setup --reconfigure build
The Meson build system
Version: 1.0.0
Source dir: /home/davidm/vkQuake
Build dir: /home/davidm/vkQuake/build
Build type: native build
Project name: vkquake
Project version: undefined
C compiler for the host machine: cc (gcc 12.2.0 "cc (Debian 12.2.0-14) 12.2.0")
C linker for the host machine: cc ld.bfd 2.40
Host machine cpu family: riscv64
Host machine cpu: riscv64
Program glslangValidator found: YES (/usr/bin/glslangValidator)
Program spirv-opt found: YES (/usr/bin/spirv-opt)
Program spirv-remap found: YES (/usr/bin/spirv-remap)
Library m found: YES
Library dl found: YES
Dependency threads found: YES unknown (cached)
Dependency sdl2 found: YES 2.26.2 (cached)
Dependency vulkan found: YES 1.3.239 (cached)
Dependency mad found: YES 0.15.1b (cached)
Found pkg-config: /usr/bin/pkg-config (1.8.1)
Run-time dependency flac found: YES 1.4.2
Dependency ogg found: YES 1.3.5 (cached)
Dependency vorbisfile found: YES 1.3.7 (cached)
Dependency vorbis found: YES 1.3.7 (cached)
Run-time dependency opus found: YES 1.3.1
Run-time dependency opusfile found: YES 0.12
Build targets in project: 33
Found ninja-1.11.1 at /usr/bin/ninja
meson setup --wipe build
meson setup --reconfigure build
time ninja -C build
real 1m11.146s
user 4m6.225s
sys 0m12.787s
I didn’t try running the game itself yet since I don’t have an extra hdmi monitor handy.
I’ll try building TryQuake.
git clone git://disenchant.net/tyrquake
cd tyrquake
time make
Compile Options:
. DEBUG = N
. TARGET_OS = UNIX
. TARGET_UNIX = linux
. USE_X86_ASM = N
. CD_TARGET = linux
. SND_TARGET = pulseaudio
. VID_TARGET = x11
. IN_TARGET = x11
real 9m0.085s
user 8m27.869s
sys 0m29.394s
2 Likes
Godzil
February 20, 2023, 11:05am
7
If you haven’t done, I would recommend to install the package vulkan-tools
and check with vulkaninfo
that the device you are using is not Mesa Software but the GPU…
Had that happening to me on another unrelated device where the GPU driver were not properly installed, and it was runing using mesa emulation using all the CPU cores and it was running slideshowey (about 15-16fps at 800x600 which was still impressive for pure software)
So check that you are actually uisng the GPU and GPU driver
The output should have this:
Layers:
=======
Device Groups:
==============
Group 0:
Properties:
physicalDevices: count = 1
PowerVR B-Series BXE-4-32 (ID: 0)
subsetAllocation = 0
Present Capabilities:
PowerVR B-Series BXE-4-32 (ID: 0):
Can present images from the following devices: count = 1
PowerVR B-Series BXE-4-32 (ID: 0)
Present modes: count = 1
DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
omac777
February 20, 2023, 12:11pm
8
I installed vulkan-tools:
root@vf2-image69:/home/user# apt-get install vulkan-tools
Get:1 https://snapshot.debian.org/archive/debian-ports/20220616T194833Z unstable/main riscv64 vulkan-tools riscv64 1.3.204.0+dfsg1-1 [209 kB]
Preparing to unpack .../vulkan-tools_1.3.204.0+dfsg1-1_riscv64.deb ...
Unpacking vulkan-tools (1.3.204.0+dfsg1-1) ...
Setting up vulkan-tools (1.3.204.0+dfsg1-1) ...
I ran vulkaninfo. Full output is here: Starfive VisionFive 2 vulkaninfo full output - Pastebin.com
This forum doesn’t allow posts greater than 50k characters so here’s some of the output:
root@vf2-image69:/home/user# vulkaninfo
'DISPLAY' environment variable not set... skipping surface info
error: XDG_RUNTIME_DIR not set in the environment.
==========
VULKANINFO
==========
Vulkan Instance Version: 1.0.204
Instance Extensions: count = 11
===============================
VK_EXT_debug_report : extension revision 10
VK_EXT_debug_utils : extension revision 2
VK_KHR_device_group_creation : extension revision 1
VK_KHR_external_fence_capabilities : extension revision 1
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_xcb_surface : extension revision 6
VK_KHR_xlib_surface : extension revision 6
Layers:
=======
Device Groups:
==============
Group 0:
Properties:
physicalDevices: count = 1
PowerVR B-Series BXE-4-32 (ID: 0)
subsetAllocation = 0
Present Capabilities:
PowerVR B-Series BXE-4-32 (ID: 0):
Can present images from the following devices: count = 1
PowerVR B-Series BXE-4-32 (ID: 0)
Present modes: count = 1
DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
Device Properties and Extensions:
=================================
GPU0:
VkPhysicalDeviceProperties:
---------------------------
apiVersion = 4206796 (1.3.204)
driverVersion = 6210866 (0x5ec532)
vendorID = 0x1010
deviceID = 0x36054182
deviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
deviceName = PowerVR B-Series BXE-4-32
pipelineCacheUUID = 32c55e00-2432-0036-00b6-002082326300
VkPhysicalDeviceLimits:
-----------------------
maxImageDimension1D = 8192
maxImageDimension2D = 8192
maxImageDimension3D = 2048
maxImageDimensionCube = 8192
maxImageArrayLayers = 2048
maxTexelBufferElements = 65536
maxUniformBufferRange = 134217728
maxStorageBufferRange = 134217728
maxPushConstantsSize = 256
maxMemoryAllocationCount = 4294967295
maxSamplerAllocationCount = 4294967295
bufferImageGranularity = 0x00000001
sparseAddressSpaceSize = 0x4000000000
maxBoundDescriptorSets = 4
maxPerStageDescriptorSamplers = 32
maxPerStageDescriptorUniformBuffers = 64
maxPerStageDescriptorStorageBuffers = 36
maxPerStageDescriptorSampledImages = 48
maxPerStageDescriptorStorageImages = 8
maxPerStageDescriptorInputAttachments = 8
maxPerStageResources = 224
maxDescriptorSetSamplers = 256
maxDescriptorSetUniformBuffers = 256
maxDescriptorSetUniformBuffersDynamic = 8
maxDescriptorSetStorageBuffers = 256
maxDescriptorSetStorageBuffersDynamic = 8
maxDescriptorSetSampledImages = 256
maxDescriptorSetStorageImages = 256
maxDescriptorSetInputAttachments = 256
maxVertexInputAttributes = 16
maxVertexInputBindings = 16
maxVertexInputAttributeOffset = 65535
maxVertexInputBindingStride = 2147483648
maxVertexOutputComponents = 68
maxTessellationGenerationLevel = 0
maxTessellationPatchSize = 0
maxTessellationControlPerVertexInputComponents = 0
maxTessellationControlPerVertexOutputComponents = 0
maxTessellationControlPerPatchOutputComponents = 0
maxTessellationControlTotalOutputComponents = 0
maxTessellationEvaluationInputComponents = 0
maxTessellationEvaluationOutputComponents = 0
maxGeometryShaderInvocations = 0
maxGeometryInputComponents = 0
maxGeometryOutputComponents = 0
maxGeometryOutputVertices = 0
maxGeometryTotalOutputComponents = 0
maxFragmentInputComponents = 68
maxFragmentOutputAttachments = 8
maxFragmentDualSrcAttachments = 0
maxFragmentCombinedOutputResources = 52
maxComputeSharedMemorySize = 16384
maxComputeWorkGroupCount: count = 3
65536
65536
65536
maxComputeWorkGroupInvocations = 512
maxComputeWorkGroupSize: count = 3
512
512
64
subPixelPrecisionBits = 4
subTexelPrecisionBits = 8
mipmapPrecisionBits = 8
maxDrawIndexedIndexValue = 4294967295
maxDrawIndirectCount = 2147483648
maxSamplerLodBias = 15
maxSamplerAnisotropy = 16
maxViewports = 1
maxViewportDimensions: count = 2
8192
8192
viewportBoundsRange: count = 2
-16384
16384
viewportSubPixelBits = 0
minMemoryMapAlignment = 64
minTexelBufferOffsetAlignment = 0x00000010
minUniformBufferOffsetAlignment = 0x00000004
minStorageBufferOffsetAlignment = 0x00000004
minTexelOffset = -8
maxTexelOffset = 7
minTexelGatherOffset = -8
maxTexelGatherOffset = 7
minInterpolationOffset = -0.5
maxInterpolationOffset = 0.5
subPixelInterpolationOffsetBits = 4
maxFramebufferWidth = 8192
maxFramebufferHeight = 8192
maxFramebufferLayers = 2048
framebufferColorSampleCounts: count = 3
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_2_BIT
SAMPLE_COUNT_4_BIT
framebufferDepthSampleCounts: count = 3
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_2_BIT
SAMPLE_COUNT_4_BIT
framebufferStencilSampleCounts: count = 3
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_2_BIT
SAMPLE_COUNT_4_BIT
framebufferNoAttachmentsSampleCounts: count = 3
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_2_BIT
SAMPLE_COUNT_4_BIT
maxColorAttachments = 8
sampledImageColorSampleCounts: count = 3
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_2_BIT
SAMPLE_COUNT_4_BIT
sampledImageIntegerSampleCounts: count = 3
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_2_BIT
SAMPLE_COUNT_4_BIT
sampledImageDepthSampleCounts: count = 3
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_2_BIT
SAMPLE_COUNT_4_BIT
sampledImageStencilSampleCounts: count = 3
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_2_BIT
SAMPLE_COUNT_4_BIT
storageImageSampleCounts: count = 3
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_2_BIT
SAMPLE_COUNT_4_BIT
maxSampleMaskWords = 1
timestampComputeAndGraphics = false
timestampPeriod = 0
maxClipDistances = 8
maxCullDistances = 8
maxCombinedClipAndCullDistances = 8
discreteQueuePriorities = 2
pointSizeRange: count = 2
1
511
lineWidthRange: count = 2
0.0625
16
pointSizeGranularity = 0.0625
lineWidthGranularity = 0.0625
strictLines = false
standardSampleLocations = true
optimalBufferCopyOffsetAlignment = 0x00000004
optimalBufferCopyRowPitchAlignment = 0x00000004
nonCoherentAtomSize = 0x00000001
VkPhysicalDeviceSparseProperties:
---------------------------------
residencyStandard2DBlockShape = false
residencyStandard2DMultisampleBlockShape = false
residencyStandard3DBlockShape = false
residencyAlignedMipSize = false
residencyNonResidentStrict = false
VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT:
----------------------------------------------------
advancedBlendMaxColorAttachments = 8
advancedBlendIndependentBlend = true
advancedBlendNonPremultipliedSrcColor = false
advancedBlendNonPremultipliedDstColor = false
advancedBlendCorrelatedOverlap = false
advancedBlendAllOperations = false
VkPhysicalDeviceCustomBorderColorPropertiesEXT:
-----------------------------------------------
maxCustomBorderColorSamplers = 59
VkPhysicalDeviceDepthStencilResolveProperties:
----------------------------------------------
supportedDepthResolveModes: count = 1
RESOLVE_MODE_SAMPLE_ZERO_BIT
supportedStencilResolveModes: count = 1
RESOLVE_MODE_SAMPLE_ZERO_BIT
independentResolveNone = true
independentResolve = true
VkPhysicalDeviceDescriptorIndexingProperties:
---------------------------------------------
maxUpdateAfterBindDescriptorsInAllPools = 0
shaderUniformBufferArrayNonUniformIndexingNative = false
shaderSampledImageArrayNonUniformIndexingNative = false
shaderStorageBufferArrayNonUniformIndexingNative = false
shaderStorageImageArrayNonUniformIndexingNative = false
shaderInputAttachmentArrayNonUniformIndexingNative = false
robustBufferAccessUpdateAfterBind = false
quadDivergentImplicitLod = false
maxPerStageDescriptorUpdateAfterBindSamplers = 0
maxPerStageDescriptorUpdateAfterBindUniformBuffers = 0
maxPerStageDescriptorUpdateAfterBindStorageBuffers = 0
maxPerStageDescriptorUpdateAfterBindSampledImages = 0
maxPerStageDescriptorUpdateAfterBindStorageImages = 0
maxPerStageDescriptorUpdateAfterBindInputAttachments = 0
maxPerStageUpdateAfterBindResources = 0
maxDescriptorSetUpdateAfterBindSamplers = 0
maxDescriptorSetUpdateAfterBindUniformBuffers = 0
maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = 0
maxDescriptorSetUpdateAfterBindStorageBuffers = 0
maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = 0
maxDescriptorSetUpdateAfterBindSampledImages = 0
maxDescriptorSetUpdateAfterBindStorageImages = 0
maxDescriptorSetUpdateAfterBindInputAttachments = 0
VkPhysicalDeviceDriverProperties:
---------------------------------
driverID = DRIVER_ID_IMAGINATION_PROPRIETARY
driverName = PowerVR B-Series Vulkan Driver
driverInfo = 1.17@6210866
conformanceVersion = 1.3.1.0
VkPhysicalDeviceIDProperties:
-----------------------------
deviceUUID = 33362035-3020-3534-2031-383200000000
driverUUID = 36323130-3836-3600-0000-000000000000
deviceNodeMask = 0
deviceLUIDValid = false
VkPhysicalDeviceMultiviewProperties:
------------------------------------
maxMultiviewViewCount = 6
maxMultiviewInstanceIndex = 134217727
VkPhysicalDeviceVulkan11Properties:
-----------------------------------
deviceUUID = 33362035-3020-3534-2031-383200000000
driverUUID = 36323130-3836-3600-0000-000000000000
deviceNodeMask = 0
deviceLUIDValid = false
subgroupSize = 1
subgroupSupportedStages: count = 5
SHADER_STAGE_VERTEX_BIT
SHADER_STAGE_FRAGMENT_BIT
SHADER_STAGE_COMPUTE_BIT
SHADER_STAGE_ALL_GRAPHICS
SHADER_STAGE_ALL
subgroupSupportedOperations: count = 6
SUBGROUP_FEATURE_BASIC_BIT
SUBGROUP_FEATURE_VOTE_BIT
SUBGROUP_FEATURE_ARITHMETIC_BIT
SUBGROUP_FEATURE_BALLOT_BIT
SUBGROUP_FEATURE_SHUFFLE_BIT
SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT
subgroupQuadOperationsInAllStages = false
pointClippingBehavior = POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY
maxMultiviewViewCount = 6
maxMultiviewInstanceIndex = 134217727
protectedNoFault = true
maxPerSetDescriptors = 1024
maxMemoryAllocationSize = 0x1000000000
VkPhysicalDeviceVulkan12Properties:
-----------------------------------
driverID = DRIVER_ID_IMAGINATION_PROPRIETARY
driverName = PowerVR B-Series Vulkan Driver
driverInfo = 1.17@6210866
conformanceVersion = 1.3.1.0
Device Extensions: count = 78
VK_EXT_blend_operation_advanced : extension revision 2
VK_EXT_buffer_device_address : extension revision 2
VK_EXT_conditional_rendering : extension revision 2
VK_EXT_custom_border_color : extension revision 12
VK_EXT_debug_marker : extension revision 4
VK_EXT_depth_clip_control : extension revision 1
VK_EXT_device_memory_report : extension revision 2
VK_EXT_extended_dynamic_state : extension revision 1
VK_EXT_extended_dynamic_state2 : extension revision 1
VK_EXT_external_memory_dma_buf : extension revision 1
VK_EXT_host_query_reset : extension revision 1
VK_EXT_image_drm_format_modifier : extension revision 2
VK_EXT_image_robustness : extension revision 1
VK_EXT_index_type_uint8 : extension revision 1
VK_EXT_inline_uniform_block : extension revision 1
VK_EXT_pipeline_creation_cache_control : extension revision 3
VK_EXT_pipeline_creation_feedback : extension revision 1
VK_EXT_primitive_topology_list_restart : extension revision 1
VK_EXT_private_data : extension revision 1
VK_EXT_provoking_vertex : extension revision 1
VK_EXT_queue_family_foreign : extension revision 1
VK_EXT_scalar_block_layout : extension revision 1
VK_EXT_separate_stencil_usage : extension revision 1
VK_EXT_shader_demote_to_helper_invocation : extension revision 1
VK_EXT_subgroup_size_control : extension revision 2
VK_EXT_texel_buffer_alignment : extension revision 1
VK_EXT_tooling_info : extension revision 1
VK_EXT_vertex_attribute_divisor : extension revision 3
VK_KHR_16bit_storage : extension revision 1
VK_KHR_8bit_storage : extension revision 1
VK_KHR_bind_memory2 : extension revision 1
VK_KHR_buffer_device_address : extension revision 1
VK_KHR_copy_commands2 : extension revision 1
VK_KHR_create_renderpass2 : extension revision 1
VK_KHR_dedicated_allocation : extension revision 3
VK_KHR_depth_stencil_resolve : extension revision 1
VK_KHR_descriptor_update_template : extension revision 1
VK_KHR_device_group : extension revision 4
VK_KHR_draw_indirect_count : extension revision 1
VK_KHR_driver_properties : extension revision 1
VK_KHR_dynamic_rendering : extension revision 1
VK_KHR_external_fence : extension revision 1
VK_KHR_external_fence_fd : extension revision 1
VK_KHR_external_memory : extension revision 1
VK_KHR_external_memory_fd : extension revision 1
VK_KHR_external_semaphore : extension revision 1
VK_KHR_external_semaphore_fd : extension revision 1
VK_KHR_format_feature_flags2 : extension revision 1
VK_KHR_get_memory_requirements2 : extension revision 1
VK_KHR_image_format_list : extension revision 1
VK_KHR_imageless_framebuffer : extension revision 1
VK_KHR_maintenance1 : extension revision 2
VK_KHR_maintenance2 : extension revision 1
VK_KHR_maintenance3 : extension revision 1
VK_KHR_maintenance4 : extension revision 2
VK_KHR_multiview : extension revision 1
VK_KHR_push_descriptor : extension revision 2
VK_KHR_relaxed_block_layout : extension revision 1
VK_KHR_sampler_mirror_clamp_to_edge : extension revision 3
VK_KHR_sampler_ycbcr_conversion : extension revision 14
VK_KHR_separate_depth_stencil_layouts : extension revision 1
VK_KHR_shader_draw_parameters : extension revision 1
VK_KHR_shader_float16_int8 : extension revision 1
VK_KHR_shader_float_controls : extension revision 4
VK_KHR_shader_integer_dot_product : extension revision 1
VK_KHR_shader_non_semantic_info : extension revision 1
VK_KHR_shader_subgroup_extended_types : extension revision 1
VK_KHR_shader_terminate_invocation : extension revision 1
VK_KHR_spirv_1_4 : extension revision 1
VK_KHR_storage_buffer_storage_class : extension revision 1
VK_KHR_swapchain : extension revision 70
VK_KHR_swapchain_mutable_format : extension revision 1
VK_KHR_synchronization2 : extension revision 1
VK_KHR_timeline_semaphore : extension revision 2
VK_KHR_uniform_buffer_standard_layout : extension revision 1
VK_KHR_variable_pointers : extension revision 1
VK_KHR_vulkan_memory_model : extension revision 3
VK_KHR_zero_initialize_workgroup_memory : extension revision 1
Godzil
February 20, 2023, 5:14pm
9
Just ran the vkQuake here, and I’m sure the GPU driver is properly loaded and running. The framerate is clearly not normal, from the GPU in there I would expect more than that, maybe not 60fps, but not 5-10 fps.
Will try to find another platform with a similar PVR GPU and see what we get there. One possible issue could be vkQuake itself not being well optimised. Quake was originally a pure software renderer and OpenGL running on Pentium class CPU, I would expect a modern CPU/GPU to perform much better than that!
Edit: yeah something is not normal here. Running on another board (not with a RISC-V CPU, just a dual core A72) with a GPU without drivers for Vulkan so rendering in pure software do actually have a better framerate than on the VF2.
Something is off. It is possible that the PowerVR’s Vulkan driver have issues on RISC-V?
You won’t get GPU acceleration running without a display (i.e. just SSH terminal.) To get it to work, I found that I needed:
HDMI plugged in to a device (this is truly unfortunate)
Either with keyboard/mouse connected or VNC
Didn’t try X forwarding, though, may work.
Godzil:
The framerate is clearly not normal, from the GPU in there I would expect more than that, maybe not 60fps, but not 5-10 fps.
I have the same problem in another app. I reduced the code to mostly just basic init and drawing a few UI things, but it still happens. In my case, vkQueueSubmit() and vkQueuePresentKHR() get progressively slower each frame until they are each taking between 200-300ms.
Reached out to Imagination about it, but they asked me to submit traces using their Android-only debug tools that are compiled to run from x86_64 linux. Sigh.
It seems like vkQuake is using a similar pattern, as expected.
err = vkEndCommandBuffer (command_buffer);
if (err != VK_SUCCESS)
Sys_Error ("vkEndCommandBuffer failed");
ZEROED_STRUCT (VkSubmitInfo, submit_info);
submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
submit_info.commandBufferCount = 1;
submit_info.pCommandBuffers = &command_buffer;
err = vkQueueSubmit (vulkan_globals.queue, 1, &submit_info, VK_NULL_HANDLE);
if (err != VK_SUCCESS)
Sys_Error ("vkQueueSubmit failed");
err = vkDeviceWaitIdle (vulkan_globals.device);
if (err != VK_SUCCESS)
Sys_Error ("vkDeviceWaitIdle failed");
void *buffer_ptr;
vkMapMemory (vulkan_globals.device, memory.handle, 0, glwidth * glheight * 4, 0, &buffer_ptr);
submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
submit_info.commandBufferCount = PCBX_NUM;
submit_info.pCommandBuffers = submit_cbs;
submit_info.waitSemaphoreCount = swapchain_acquired ? 1 : 0;
submit_info.pWaitSemaphores = &image_aquired_semaphores[cb_index];
submit_info.signalSemaphoreCount = swapchain_acquired ? 1 : 0;
submit_info.pSignalSemaphores = &draw_complete_semaphores[cb_index];
VkPipelineStageFlags wait_dst_stage_mask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
submit_info.pWaitDstStageMask = &wait_dst_stage_mask;
err = vkQueueSubmit (vulkan_globals.queue, 1, &submit_info, command_buffer_fences[cb_index]);
if (err != VK_SUCCESS)
Sys_Error ("vkQueueSubmit failed");
}
vulkan_globals.device_idle = false;
if (swapchain_acquired == true)
{
ZEROED_STRUCT (VkPresentInfoKHR, present_info);
present_info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
vulkan_globals.device_idle = false;
if (swapchain_acquired == true)
{
ZEROED_STRUCT (VkPresentInfoKHR, present_info);
present_info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
present_info.swapchainCount = 1;
present_info.pSwapchains = &vulkan_swapchain, present_info.pImageIndices = ¤t_swapchain_buffer;
present_info.waitSemaphoreCount = 1;
present_info.pWaitSemaphores = &draw_complete_semaphores[cb_index];
err = fpQueuePresentKHR (vulkan_globals.queue, &present_info);
#if defined(VK_EXT_full_screen_exclusive)
if ((err == VK_ERROR_OUT_OF_DATE_KHR) || (err == VK_ERROR_SURFACE_LOST_KHR) || (err == VK_SUBOPTIMAL_KHR) ||
(err == VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT))
#else
if ((err == VK_ERROR_OUT_OF_DATE_KHR) || (err == VK_ERROR_SURFACE_LOST_KHR) || (err == VK_SUBOPTIMAL_KHR))
#endif
{
vid.restart_next_frame = true;
}
else if (err != VK_SUCCESS)
I will say, these samples ran pretty well:
Even reducing my code, I didn’t figure out the difference that makes those samples run fine. For reference in case it is useful, here’s my reduced branch:
In my case, GLES is at least running okay (after recompiling SDL with support for GLES, and importantly, not with support for OpenGL or it tries to use GLX even for GLES.)
-[Unknown]
Godzil
February 21, 2023, 11:07am
11
So been able to run vkQuake on different device with a slightly older PowerVR GPU (though it does not necessarily mean slower) the framerate is super smooth, 60 or more FPS I would say. Weird texture are there too, but looking closely it seems to be an issue with the shaders used for the lighting, could be anything. But look like an overflow problem.
The GPU in the SF2 could be slower, but I would not expect 10 (or more) time slower.
Not sure what is happening with the VF2 and Vulkan. Only StarFive & Imagination could tell.
1 Like
Godzil
February 24, 2023, 5:35pm
12
just had a look, this version only biuld GL and Sofware rendering Quake, that’s why it run slow-ish, you have no GPU acceleration there.
I can only find one OpenGL ES build of Quake and it is for android. Porting should not be too hard, but it is not just download and build.
If someone want to play with:
GitHub - jackpal/glesquake: GL ES Quake: A port of Quake to OpenGL ES and the Android platform
1 Like
Godzil
February 27, 2023, 11:05am
13
As expected, the weird texture issue is a shader.
I’ve bluntly disabled the shader code in update_lightmap.inc in the “main()” function to return directly without doing anything, this of course disable all dynamic lights, but also remove all of the weird lighting issues there is.
Sadly it have no impact on the performances. I sadly know little about shaders so that’s as far as I can go here on that aspect.
To replicated, just open the Shaders/update_lightmap.inc
file go to line 133 where the function main
start, and just after the opening curly brace, add a new line with just return ;
This will disable the whole dynamic lighting and the game will render with a bit more normal texture, just losing the dynamic lightings.
1 Like
Godzil
February 27, 2023, 11:16am
14
Just to make sure, your own example, what do you use for window creation and inputs?
Are you using SDL as backend or something else?
I start to wonder if SDL could not be the culprit here in some way. As Willems’ examples are not using SDL and they work ok, and PPSSPP seems to use SDL as for vkQuake
2 Likes
Perhaps. PPSSPP is my own example. This is a good idea worth trying - maybe SDL is creating the window in a bad way, somehow. I’m planning to look again sometime after the next image is released.
-[Unknown]
Godzil
March 1, 2023, 3:32pm
16
All I can say is that up so far, the new Debian image seems worse than the previous release in term of GPU & Vulkan support.
vkQuake sitll do the same thing, vulkaninfo now segfault (for unclear reasons) other things I wanted to try still not work.
StarFive: you/Imagination must be aware of these issues, and I hope you are both working on solving them, that would make it an even better platform
In the release notes it says Vulkan support is in the What’s Next - WIP section.
https://rvspace.org/en/project/VisionFive2_Debian_Wiki_202302_Release
4 Likes
Godzil
May 9, 2023, 11:32am
19
Now that there is a new image release a good and a bad news.
The good is that vulkaninfo works again, yeah!
The bad is the vulkan driver still seens to be broken
All the app I’ve tested do segfault when loading the vulkan stack and I haven’t managed to get something to display yet…
2 Likes
Godzil
May 19, 2023, 2:47pm
20
I still can’t get my finger on what is really happening, but the segfautl may not be fully driver related.
The app I’m trying to run (here an export template from Godot) do segfault when it dlopen libvulkan.
At first I though it was a problem in the libraries that come with the driver, but I recently tried with hand build mesa with software raster and it crash in a similar way.
From the backtrace it is either a problem with libpthread or somethign with the stdc++ lib, something feel wrong and debugging that is really hard. I know a lot about linux and yet there I feel I don’t know enough and that really bug me.
For the curious and trying to have a look, I’m building from Godot git’s master branch using this command line:
scons target=template_debug arch=rv64 use_llvm=true
GCC is broken on some aspect (there are known issues with libatomic and. Hasn’t been fixed in months) and Godot can only be built with clang.
For dependencies, have a look at Godot’s documentation: Compiling for Linux, *BSD — Godot Engine (stable) documentation in English
Also it take a very long time to build on the platform, but that prevent the need to have a cross compiling environment, which can be tricky at times.
Once build, to run the executable, you’ll need to have a project running, so for that create a simple project and export it as a PCK file.
1 Like