From patchwork Tue Oct 29 12:10:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 839331 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:4593:b0:37d:45d0:187 with SMTP id gb19csp329249wrb; Tue, 29 Oct 2024 05:12:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWVb3obOBpY/JWf+HhgcPVOg7ghuNBEIGkqlVVspeHxUoV7WPJD8A1c4z7Eq0giVgXW1ghLQg==@linaro.org X-Google-Smtp-Source: AGHT+IHnYRJtf2QT65DKjc0233QBZOhT5U9SbEYLy3UKX25b1BqSM/vqLVqX2TQEcZ95JOkE+I4B X-Received: by 2002:a05:6122:1697:b0:50d:3ec1:1534 with SMTP id 71dfb90a1353d-51015071471mr8533700e0c.7.1730203956639; Tue, 29 Oct 2024 05:12:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730203956; cv=none; d=google.com; s=arc-20240605; b=euwb68X2KMSrt+wlBIxvKCkpNxD1RAvKGdkOlidjrOnjg0hudLqkaoDbiaikmdZQpj pRJdR3S3NscmkrmpLcz27ILR8AEEftVZoDiX7jMoZ7nmFCmiitCdrt3OjaJLJc+zEnZt l2vV5mYYEcRakrXW6RVRsyPLb80fKex52kz6U1xCtoMecdlejNKvjh2nOAxUlTWtoa8e Jdp54dAXFn1yAeWGs+h9vx0qLHxdcaFFNISac2nK4NAaPimMSmfK6x1rszhYbzNIl5uM YB3aDn6iMv8h5azgPeDCjA07TDblIXX87JFfOxoU92N6KfHZSNEJ6GOmL4jzGg7cI4BT Dj7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TcXCjHXJMHI5YxkHU4VEpqalzCQd34FPSXySjBFHomU=; fh=HkS3dZuNkhC4vC6jGG25nmZ+vRS2KhOuvY23O507sQ8=; b=RUDlSSNVi7LbmNUEXzfOxAq7qEXBTViLkr8eHt4/huzpJqnZs31UFkAvjURH8U6wxA 9FldInANc1uwiZ3H5/4Ci02wy19Iv/VCmfLF5aDGkjRkiXpzdUUlkLjBJATMAM8RTeMg 4D2CXT7Qer2UPwUlbW4fqjyNQr4USJI+dFI8yDeyrrG9pMvhTKYwkZwMUhr3aGZSudNM 3+lE7Upuwr98skI0N0IjhcanTYx+xg6yq9nRe+8KI20CCqLbD7uW0o0Wle0AVMz2W1C7 hpkdZLcNtrCyCu+/0YEtFDb4vIsdXFeyuZjUy99xqmoxhX28IWk+ZwygGSFV6c6Qa3OA fZEQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OsRZdESB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 71dfb90a1353d-5100430d019si2342661e0c.40.2024.10.29.05.12.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Oct 2024 05:12:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OsRZdESB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5l3n-0004f6-9Y; Tue, 29 Oct 2024 08:10:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5l3Y-0004aJ-6M for qemu-devel@nongnu.org; Tue, 29 Oct 2024 08:10:40 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5l3W-0007Sr-HM for qemu-devel@nongnu.org; Tue, 29 Oct 2024 08:10:39 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4314fa33a35so51562255e9.1 for ; Tue, 29 Oct 2024 05:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730203837; x=1730808637; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TcXCjHXJMHI5YxkHU4VEpqalzCQd34FPSXySjBFHomU=; b=OsRZdESB1ZV8N7vlZGYCtqrNL0japx/T/JeCoviMDoF7UeHiEJWSo18qrvaeTJ4TW5 8hyW2gdJ6Ih0d2VnarTAFeRlvZSkcY7cekpceYMOexH1KmLOi/4TjKGVyGA8IF/RElPj ykqADmTtSRCoBhXfF0FB6LAJ5OffJAh1KdNT4oEBuWypVUvShXbxpmt7oNkLRb1DRox7 imu0MY2uJbmlZCZbndRjlIiqu+CsnBg+0WrBqFkibm7UytsXtNwIn7yo+q8Poyx1vwXy JpT0mejofDF1+0DW5GV01fN5qCfefUXXZAMuF46AjiHoCVI0VG/1BsLNQMQhaYECHDu1 jFBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730203837; x=1730808637; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TcXCjHXJMHI5YxkHU4VEpqalzCQd34FPSXySjBFHomU=; b=Z/tQ28cMz352bE0PGCUsPoy+H/aqoZWwtzye6Ak/17YBxlMqNIaJTvBw2ynblnPKgu tqbB/sXuh18JjSl2v834Ue1QXiTv6cu9pEilwqApcsEIjhM1pGklbL8OU6V84wXZbkxg 1Oi0I5QyfkuKMctOuQKf5LckSb39JiaRBUUA0VXZBvqrMda+K+DzX+g42He/W61vZLzo IuGDjpYu8tOwq/O5HUQb/oLLpBqd7/7trptA5V7czU/A1Vd6uI8oIdGvgC0DN8S1qAYC b06RTzB9AQs30fN6DFccwWCloZJUxclDRm6zQpLDRtTHLh76r1IWOyMKO1U6/mJJyxDG Bzsw== X-Gm-Message-State: AOJu0Yw5bze9gYEerG+hUlRleROju49tK9JhVDUNK8iZl/pQtGEzV313 2dR5ONSB1HJsPQmOZNQ4bmdFj9GLsefw3bOEQ5rdZc0qX+fTguD+FyWAIpyc7Gw= X-Received: by 2002:a05:600c:3512:b0:431:588a:4498 with SMTP id 5b1f17b1804b1-4319ac9ad1bmr114123305e9.14.1730203836823; Tue, 29 Oct 2024 05:10:36 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b567fe8sm171774435e9.28.2024.10.29.05.10.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 05:10:34 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 0B3245FABF; Tue, 29 Oct 2024 12:10:31 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Dmitry Osipenko , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , "Michael S. Tsirkin" , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= Subject: [PULL 06/13] virtio-gpu: Use pkgconfig version to decide which virgl features are available Date: Tue, 29 Oct 2024 12:10:23 +0000 Message-Id: <20241029121030.4007014-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241029121030.4007014-1-alex.bennee@linaro.org> References: <20241029121030.4007014-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Dmitry Osipenko New virglrerenderer features were stabilized with release of v1.0.0. Presence of symbols in virglrenderer.h doesn't guarantee ABI compatibility with pre-release development versions of libvirglerender. Use virglrenderer version to decide reliably which virgl features are available. Reviewed-by: Alex Bennée Signed-off-by: Dmitry Osipenko Message-Id: <20241024210311.118220-7-dmitry.osipenko@collabora.com> Signed-off-by: Alex Bennée diff --git a/meson.build b/meson.build index 85594fd3f1..8dc53c12fb 100644 --- a/meson.build +++ b/meson.build @@ -2437,10 +2437,7 @@ config_host_data.set('CONFIG_VNC', vnc.found()) config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) config_host_data.set('CONFIG_VNC_SASL', sasl.found()) if virgl.found() - config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT', - cc.has_member('struct virgl_renderer_resource_info_ext', 'd3d_tex2d', - prefix: '#include ', - dependencies: virgl)) + config_host_data.set('VIRGL_VERSION_MAJOR', virgl.version().split('.')[0]) endif config_host_data.set('CONFIG_VIRTFS', have_virtfs) config_host_data.set('CONFIG_VTE', vte.found()) diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c index a63d1f540f..ca6f4d6cbb 100644 --- a/hw/display/virtio-gpu-virgl.c +++ b/hw/display/virtio-gpu-virgl.c @@ -171,7 +171,7 @@ static void virgl_cmd_set_scanout(VirtIOGPU *g, struct virgl_renderer_resource_info info; void *d3d_tex2d = NULL; -#ifdef HAVE_VIRGL_D3D_INFO_EXT +#if VIRGL_VERSION_MAJOR >= 1 struct virgl_renderer_resource_info_ext ext; memset(&ext, 0, sizeof(ext)); ret = virgl_renderer_resource_get_info_ext(ss.resource_id, &ext);