From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id E96FE1FF14C for ; Fri, 26 Jun 2026 15:55:44 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 396D014064; Fri, 26 Jun 2026 15:55:42 +0200 (CEST) From: Markus Frank To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v2 2/2] ui: qemu: add VirGl feature selection in DisplayEdit Date: Fri, 26 Jun 2026 15:54:38 +0200 Message-ID: <20260626135527.299939-3-m.frank@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260626135527.299939-1-m.frank@proxmox.com> References: <20260626135527.299939-1-m.frank@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1782482131515 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.008 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: M7MZYLEWGYW4PO5YRJSSUPMXERTWBLO3 X-Message-ID-Hash: M7MZYLEWGYW4PO5YRJSSUPMXERTWBLO3 X-MailFrom: m.frank@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The user can choose which feature set to use: - the default option with OpenGL 4.3 support - a option with OpenGL 4.6 support - a option with both OpenGL 4.6 and Vulkan support As the feature sets other than the default require a VirGL memory window, the user can change the size of the default window in a different combo box. Add a controller to reset the combo boxes when they cannot be used and add formulars to disable them. Signed-off-by: Markus Frank --- www/manager6/qemu/DisplayEdit.js | 72 +++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/DisplayEdit.js index 3f583adb..98c62efb 100644 --- a/www/manager6/qemu/DisplayEdit.js +++ b/www/manager6/qemu/DisplayEdit.js @@ -11,12 +11,42 @@ Ext.define('PVE.qemu.DisplayInputPanel', { return { vga: ret }; }, + controller: { + xclass: 'Ext.app.ViewController', + + onTypeChange: function (type) { + let me = this; + let vm = me.getViewModel(); + + if (type.getValue() !== 'virtio-gl') { + vm.set('virglMemoryWindow', '__default__'); + vm.set('virglFeatures', '__default__'); + vm.notify(); + } + }, + + onFeaturesChange: function (features) { + let me = this; + let vm = me.getViewModel(); + + if (features.getValue() === '__default__') { + vm.set('virglMemoryWindow', '__default__'); + vm.notify(); + } + } + }, + viewModel: { data: { type: '__default__', clipboard: '__default__', + virglFeatures: '__default__', + virglMemoryWindow: '__default__', }, formulas: { + isVirgl: function (get) { + return get('type') === 'virtio-gl'; + }, matchNonGUIOption: function (get) { return get('type').match(/^(serial\d|none)$/); }, @@ -35,6 +65,7 @@ Ext.define('PVE.qemu.DisplayInputPanel', { return Proxmox.Utils.defaultText; } }, + virglIsDefault: (get) => get('virglFeatures') === '__default__', isVNC: (get) => get('clipboard') === 'vnc', hideDefaultHint: (get) => get('isVNC') || get('matchNonGUIOption'), hideVNCHint: (get) => !get('isVNC') || get('matchNonGUIOption'), @@ -58,6 +89,7 @@ Ext.define('PVE.qemu.DisplayInputPanel', { } return true; }, + listeners: { change: 'onTypeChange' }, bind: { value: '{type}', }, @@ -78,6 +110,40 @@ Ext.define('PVE.qemu.DisplayInputPanel', { ], advancedItems: [ + { + xtype: 'proxmoxKVComboBox', + name: 'virgl-features', + deleteEmpty: false, + fieldLabel: gettext('VirGL Features'), + listeners: { change: 'onFeaturesChange' }, + comboItems: [ + ['__default__', Proxmox.Utils.defaultText + ' (OpenGL 4.3)'], + ['opengl4.6', 'OpenGL 4.6 support'], + ['opengl4.6+vulkan', 'OpenGL 4.6 and Vulkan support'], + ], + bind: { + value: '{virglFeatures}', + disabled: '{!isVirgl}', + }, + }, + { + xtype: 'proxmoxKVComboBox', + name: 'virgl-memory-window', + deleteEmpty: false, + fieldLabel: gettext('VirGL Host Memory Window'), + comboItems: [ + ['__default__', Proxmox.Utils.defaultText + ' (2048 MiB)'], + ['512', '512 MiB'], + ['1024', '1024 MiB'], + ['2048', '2048 MiB'], + ['4096', '4096 MiB'], + ['8192', '8192 MiB'], + ], + bind: { + value: '{virglMemoryWindow}', + disabled: '{virglIsDefault}', + }, + }, { xtype: 'proxmoxKVComboBox', name: 'clipboard', @@ -141,7 +207,11 @@ Ext.define('PVE.qemu.DisplayEdit', { vmconfig: undefined, subject: gettext('Display'), - width: 350, + width: 450, + + fieldDefaults: { + labelWidth: 180, + }, items: [ { -- 2.47.3