From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 9A9E01FF142 for ; Fri, 03 Jul 2026 13:58:33 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id E6EDE2139D; Fri, 03 Jul 2026 13:58:32 +0200 (CEST) Message-ID: Date: Fri, 3 Jul 2026 13:57:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH pve-manager v3 2/2] ui: qemu: add VirGl feature selection in DisplayEdit To: Markus Frank , pve-devel@lists.proxmox.com References: <20260626141044.311778-1-m.frank@proxmox.com> <20260626141044.311778-3-m.frank@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20260626141044.311778-3-m.frank@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783079871024 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.052 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) 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: SIOHOVLNUTESMLS644VH5QKGQMBFL3SO X-Message-ID-Hash: SIOHOVLNUTESMLS644VH5QKGQMBFL3SO X-MailFrom: d.csapak@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: one nit inline, but not a blocker for me Reviewed-by: Dominik Csapak On 6/26/26 4:12 PM, Markus Frank wrote: > 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..e05f8f22 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'; > + }, this could be in the same one line style as the other below isVirgl: (get) => 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: [ > {