| Summary: | tu_device.c:900:4: error: initializer element is not constant | ||
|---|---|---|---|
| Product: | Mesa | Reporter: | Vinson Lee <vlee> |
| Component: | Drivers/Gallium/Freedreno | Assignee: | Rob Clark <robclark> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | medium | ||
| Version: | git | ||
| Hardware: | x86-64 (AMD64) | ||
| OS: | Linux (All) | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
It's part of a bigger initializer so we don't need to use a compound initializer for minImageTransferGranularity. Can you verify that it works if you delete "(VkExtent3D)"? (In reply to Kristian Høgsberg from comment #1) > It's part of a bigger initializer so we don't need to use a compound > initializer for minImageTransferGranularity. Can you verify that it works if > you delete "(VkExtent3D)"? Yes, it works. This patch fixes the build error. diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index 2e930d9841fe..fdb9e1e0a1e2 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -897,7 +897,7 @@ static const VkQueueFamilyProperties tu_queue_family_properties = { VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT | VK_QUEUE_TRANSFER_BIT, .queueCount = 1, .timestampValidBits = 64, - .minImageTransferGranularity = (VkExtent3D) { 1, 1, 1 }, + .minImageTransferGranularity = { 1, 1, 1 }, }; commit d4e70be7396b5330fca5b5ece2327a3e1c42b6e7 Author: Vinson Lee <vlee@freedesktop.org> Date: Thu May 30 14:47:37 2019 -0700 freedreno: Fix GCC build error. ../src/freedreno/vulkan/tu_device.c:900:4: error: initializer element is not constant .minImageTransferGranularity = (VkExtent3D) { 1, 1, 1 }, ^ Suggested-by: Kristian Høgsberg <krh@bitplanet.net> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110698 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Rob Clark <robdclark@gmail.com> |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
In file included from ../src/freedreno/ir3/ir3_shader.h:33:0, from ../src/freedreno/ir3/ir3_compiler.h:30, from ../src/freedreno/vulkan/tu_private.h:56, from ../src/freedreno/vulkan/tu_device.c:28: ../src/compiler/nir/nir.h:2059:1: warning: ‘__returns_nonnull__’ attribute directive ignored [-Wattributes] { ^ ../src/compiler/nir/nir.h:2065:1: warning: ‘__returns_nonnull__’ attribute directive ignored [-Wattributes] { ^ ../src/freedreno/vulkan/tu_device.c:900:4: error: initializer element is not constant .minImageTransferGranularity = (VkExtent3D) { 1, 1, 1 }, ^