Vulkan Driver Broken? VK_KHR_SURFACE unsupported

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 :smiley:

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

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:

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

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

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


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.

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.

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]

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

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

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

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]

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 :slight_smile:

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

Missed that line!

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 :frowning:

All the app I’ve tested do segfault when loading the vulkan stack and I haven’t managed to get something to display yet… :frowning:

2 Likes

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