intel/dev: use GFX_VERx10 to detect genX compilation

Depending on the ordering of includes, GFX_VER may not defined for
intel_device_info.h.  The failure mode of this case is silent:
BITSET_TEST will be called when it could be compiled out.

GFX_VERx10 should be used in place of GFX_VER.  GFX_VERx10 is defined
by a compiler flag, and is always present for genX compilation units.

Fixes: 3c9a8f7a6d ("intel/dev: generate helpers to identify platform workarounds")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21908>
This commit is contained in:
Mark Janes
2023-03-15 13:45:22 -07:00
committed by Marge Bot
parent 8c78dd6320
commit 8eceff48cd
+1 -1
View File
@@ -575,7 +575,7 @@ void intel_device_info_update_cs_workgroup_threads(struct intel_device_info *dev
bool intel_device_info_compute_system_memory(struct intel_device_info *devinfo, bool update);
void intel_device_info_update_after_hwconfig(struct intel_device_info *devinfo);
#ifdef GFX_VER
#ifdef GFX_VERx10
#define intel_needs_workaround(devinfo, id) \
INTEL_WA_ ## id ## _GFX_VER && \
BITSET_TEST(devinfo->workarounds, INTEL_WA_##id)