1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Fix ubsan reported errors in rendering

This allows the TPS demo to run without an ubsan reports from any of the
rendering code.
This commit is contained in:
HP van Braam
2024-12-13 19:03:37 +01:00
parent 7f5c469292
commit 062d74bb9c
12 changed files with 81 additions and 76 deletions

View File

@@ -843,7 +843,7 @@ Error RenderingContextDriverVulkan::_initialize_devices() {
Device &driver_device = driver_devices[i];
driver_device.name = String::utf8(props.deviceName);
driver_device.vendor = Vendor(props.vendorID);
driver_device.vendor = props.vendorID;
driver_device.type = DeviceType(props.deviceType);
driver_device.workarounds = Workarounds();
@@ -880,7 +880,7 @@ void RenderingContextDriverVulkan::_check_driver_workarounds(const VkPhysicalDev
// This bug was fixed in driver version 512.503.0, so we only enabled it on devices older than this.
//
r_device.workarounds.avoid_compute_after_draw =
r_device.vendor == VENDOR_QUALCOMM &&
r_device.vendor == Vendor::VENDOR_QUALCOMM &&
p_device_properties.deviceID >= 0x6000000 && // Adreno 6xx
p_device_properties.driverVersion < VK_MAKE_VERSION(512, 503, 0) &&
r_device.name.find("Turnip") < 0;