mirror of
https://github.com/w23/xash3d-fwgs
synced 2025-01-18 14:50:05 +01:00
Revert "fix C90"
This reverts commit 4e761ee4854b13b62a1f9e69a0f7ca9231125245.
This commit is contained in:
parent
a55b260905
commit
84b358b096
@ -432,7 +432,23 @@ static qboolean createDevice( void ) {
|
||||
|
||||
for (int i = 0; i < num_available_devices; ++i) {
|
||||
const vk_available_device_t *candidate_device = available_devices + i;
|
||||
|
||||
// Skip non-target device
|
||||
Q_snprintf( unique_deviceID, sizeof( unique_deviceID ), "%04x:%04x", candidate_device->props.vendorID, candidate_device->props.deviceID );
|
||||
if (is_target_device && !is_target_device_found && Q_stricmp(vk_device_target_id->string, unique_deviceID)) {
|
||||
if (i == num_available_devices-1) {
|
||||
gEngine.Con_Printf("Not found device %s, start on %s. Please set a valid device.\n", vk_device_target_id->string, unique_deviceID);
|
||||
} else {
|
||||
gEngine.Con_Printf("Skip device %s, because selected %s\n", unique_deviceID, vk_device_target_id->string);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
is_target_device_found = true;
|
||||
}
|
||||
|
||||
if (candidate_device->ray_tracing && !CVAR_TO_BOOL(vk_only)) {
|
||||
vk_core.rtx = true;
|
||||
}
|
||||
|
||||
VkPhysicalDeviceAccelerationStructureFeaturesKHR accel_feature = {
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR,
|
||||
.pNext = NULL,
|
||||
@ -497,28 +513,6 @@ static qboolean createDevice( void ) {
|
||||
.ppEnabledExtensionNames = device_extensions,
|
||||
};
|
||||
|
||||
// Skip non-target device
|
||||
Q_snprintf( unique_deviceID, sizeof( unique_deviceID ), "%04x:%04x", candidate_device->props.vendorID, candidate_device->props.deviceID );
|
||||
// default_device_id for vk_device_target_id
|
||||
if (i == 0) { // TODO: select device with RTX by default
|
||||
//Q_strncpy( vk_core.default_device_id, unique_deviceID, sizeof( vk_core.default_device_id ));
|
||||
gEngine.Cvar_Set("vk_device_target_id", unique_deviceID);
|
||||
}
|
||||
if (is_target_device && !is_target_device_found && Q_stricmp(vk_device_target_id->string, unique_deviceID)) {
|
||||
if (i == num_available_devices-1) {
|
||||
gEngine.Con_Printf("Not found device %s, start on %s. Please set a valid device.\n", vk_device_target_id->string, unique_deviceID);
|
||||
} else {
|
||||
gEngine.Con_Printf("Skip device %s, because selected %s\n", unique_deviceID, vk_device_target_id->string);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
is_target_device_found = true;
|
||||
}
|
||||
|
||||
if (candidate_device->ray_tracing && !CVAR_TO_BOOL(vk_only)) {
|
||||
vk_core.rtx = true;
|
||||
}
|
||||
|
||||
// FIXME do only once
|
||||
vkGetPhysicalDeviceMemoryProperties(candidate_device->device, &vk_core.physical_device.memory_properties);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user