If the user picks an explicit vulkan device, attempt to ignore any issues from vulkan not reporting any render queues that can present to the screen. This allows us to start up with mesa's software vulkan implementation.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5843 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
b4b4653b68
commit
440a8e7b53
1 changed files with 22 additions and 6 deletions
|
@ -4542,6 +4542,7 @@ qboolean VK_Init(rendererstate_t *info, const char **sysextnames, qboolean (*cre
|
||||||
const char *extensions[8];
|
const char *extensions[8];
|
||||||
uint32_t extensions_count = 0;
|
uint32_t extensions_count = 0;
|
||||||
|
|
||||||
|
qboolean ignorequeuebugs = false;
|
||||||
qboolean okay;
|
qboolean okay;
|
||||||
vrsetup_t vrsetup = {sizeof(vrsetup)};
|
vrsetup_t vrsetup = {sizeof(vrsetup)};
|
||||||
|
|
||||||
|
@ -4798,12 +4799,20 @@ qboolean VK_Init(rendererstate_t *info, const char **sysextnames, qboolean (*cre
|
||||||
break; //okay, this one should be usable
|
break; //okay, this one should be usable
|
||||||
}
|
}
|
||||||
if (j == queue_count)
|
if (j == queue_count)
|
||||||
|
{
|
||||||
|
if ((wantdev >= 0 && i==wantdev) || (wantdev==-1 && *info->subrenderer && !Q_strcasecmp(props.deviceName, info->subrenderer)))
|
||||||
|
{
|
||||||
|
Con_Printf(CON_WARNING"vulkan: attempting to use device \"%s\" despite no device queues being able to present to window surface\n", props.deviceName);
|
||||||
|
ignorequeuebugs = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
//no queues can present to that surface, so I guess we can't use that device
|
//no queues can present to that surface, so I guess we can't use that device
|
||||||
Con_DLPrintf((wantdev != i)?1:0, "vulkan: ignoring device \"%s\" as it can't present to window\n", props.deviceName);
|
Con_DLPrintf((wantdev != i)?1:0, "vulkan: ignoring device \"%s\" as it can't present to window\n", props.deviceName);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Con_DPrintf("Found Vulkan Device \"%s\"\n", props.deviceName);
|
Con_DPrintf("Found Vulkan Device \"%s\"\n", props.deviceName);
|
||||||
|
|
||||||
if (!vk.gpu)
|
if (!vk.gpu)
|
||||||
|
@ -4980,12 +4989,19 @@ qboolean VK_Init(rendererstate_t *info, const char **sysextnames, qboolean (*cre
|
||||||
|
|
||||||
|
|
||||||
if (vk.queuefam[0] == ~0u || vk.queuefam[1] == ~0u)
|
if (vk.queuefam[0] == ~0u || vk.queuefam[1] == ~0u)
|
||||||
|
{
|
||||||
|
if (ignorequeuebugs && queue_count>0)
|
||||||
|
{
|
||||||
|
vk.queuefam[0] = vk.queuefam[1] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
free(queueprops);
|
free(queueprops);
|
||||||
Con_Printf(CON_ERROR"vulkan: unable to find suitable queues\n");
|
Con_Printf(CON_ERROR"vulkan: unable to find suitable queues\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
uint32_t extcount = 0, i;
|
uint32_t extcount = 0, i;
|
||||||
|
|
Loading…
Reference in a new issue