[pve-devel] [PATCH pve-manager v1 2/2] ui: qemu: add Vulkan option in DisplayEdit
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Nov 10 15:30:10 CET 2025
Am 10.11.25 um 12:40 schrieb Markus Frank:
> The 'isVirgl' formula deactivates the Vulkan option if the type is not
> 'virtio-gl'. However, it does not reset the option to its default.
> Therefore, also add a listener function to reset the Vulkan option.
>
> Signed-off-by: Markus Frank <m.frank at proxmox.com>
> ---
> www/manager6/qemu/DisplayEdit.js | 42 +++++++++++++++++++++++++++++++-
> 1 file changed, 41 insertions(+), 1 deletion(-)
>
> diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/DisplayEdit.js
> index a2c28ba7..c9a404c4 100644
> --- a/www/manager6/qemu/DisplayEdit.js
> +++ b/www/manager6/qemu/DisplayEdit.js
> @@ -11,12 +11,30 @@ 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('vulkan', '__default__');
> + vm.notify();
> + }
> + },
> + },
> +
> viewModel: {
> data: {
> type: '__default__',
> clipboard: '__default__',
> + vulkan: '__default__',
> },
> formulas: {
> + isVirgl: function (get) {
> + return get('type') === 'virtio-gl';
> + },
> matchNonGUIOption: function (get) {
> return get('type').match(/^(serial\d|none)$/);
> },
> @@ -58,10 +76,32 @@ Ext.define('PVE.qemu.DisplayInputPanel', {
> }
> return true;
> },
> + listeners: { change: 'onTypeChange' },
> bind: {
> value: '{type}',
> },
> },
> + {
> + xtype: 'proxmoxKVComboBox',
> + name: 'vulkan',
> + deleteEmpty: false,
> + fieldLabel: gettext('Vulkan'),
> + comboItems: [
> + [
> + '__default__',
> + Proxmox.Utils.defaultText + ' (' + Proxmox.Utils.disabledText + ')',
> + ],
> + ['venus-512', 'Venus (512 MiB memory window)'],
> + ['venus-1024', 'Venus (1024 MiB memory window)'],
> + ['venus-2048', 'Venus (2048 MiB memory window)'],
> + ['venus-4096', 'Venus (4096 MiB memory window)'],
> + ['venus-8192', 'Venus (8192 MiB memory window)'],
> + ],
might be nicer to virtually split the option into two here, i.e. a checkbox
for vulkan/venus and a dedicated combobox for the memory window size (or
just leave that out for now if it doesn't make a measurable difference anyway.
> + bind: {
> + value: '{vulkan}',
> + disabled: '{!isVirgl}',
> + },
> + },
> {
> xtype: 'proxmoxintegerfield',
> emptyText: Proxmox.Utils.defaultText,
> @@ -139,7 +179,7 @@ Ext.define('PVE.qemu.DisplayEdit', {
> vmconfig: undefined,
>
> subject: gettext('Display'),
> - width: 350,
> + width: 370,
>
> items: [
> {
More information about the pve-devel
mailing list