mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 12:10:00 +00:00
winevulkan: Fail on explicit layer usage.
Fixes failure in dEQP-VK.api.device_init.create_instance_layer_name_abuse which expects all layers passed in as part of test to cause instance creation to fail. A quirk bit WINEVULKAN_QUIRK_IGNORE_EXPLICIT_LAYERS has been added to optionally restore the previous functionality. Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com> Signed-off-by: Daniel Koch <dkoch@nvidia.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f65fb09dff
commit
e447e86ae2
|
@ -335,7 +335,7 @@ static void wine_vk_init_once(void)
|
||||||
* driver is responsible for handling e.g. surface extensions.
|
* driver is responsible for handling e.g. surface extensions.
|
||||||
*/
|
*/
|
||||||
static VkResult wine_vk_instance_convert_create_info(const VkInstanceCreateInfo *src,
|
static VkResult wine_vk_instance_convert_create_info(const VkInstanceCreateInfo *src,
|
||||||
VkInstanceCreateInfo *dst)
|
VkInstanceCreateInfo *dst, struct VkInstance_T *object)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
VkResult res;
|
VkResult res;
|
||||||
|
@ -351,8 +351,14 @@ static VkResult wine_vk_instance_convert_create_info(const VkInstanceCreateInfo
|
||||||
/* ICDs don't support any layers, so nothing to copy. Modern versions of the loader
|
/* ICDs don't support any layers, so nothing to copy. Modern versions of the loader
|
||||||
* filter this data out as well.
|
* filter this data out as well.
|
||||||
*/
|
*/
|
||||||
dst->enabledLayerCount = 0;
|
if (object->quirks & WINEVULKAN_QUIRK_IGNORE_EXPLICIT_LAYERS) {
|
||||||
dst->ppEnabledLayerNames = NULL;
|
dst->enabledLayerCount = 0;
|
||||||
|
dst->ppEnabledLayerNames = NULL;
|
||||||
|
WARN("Ignoring explicit layers!\n");
|
||||||
|
} else if (dst->enabledLayerCount) {
|
||||||
|
FIXME("Loading explicit layers is not supported by winevulkan!\n");
|
||||||
|
return VK_ERROR_LAYER_NOT_PRESENT;
|
||||||
|
}
|
||||||
|
|
||||||
TRACE("Enabled %u instance extensions.\n", dst->enabledExtensionCount);
|
TRACE("Enabled %u instance extensions.\n", dst->enabledExtensionCount);
|
||||||
for (i = 0; i < dst->enabledExtensionCount; i++)
|
for (i = 0; i < dst->enabledExtensionCount; i++)
|
||||||
|
@ -673,7 +679,7 @@ VkResult WINAPI wine_vkCreateInstance(const VkInstanceCreateInfo *create_info,
|
||||||
}
|
}
|
||||||
object->base.loader_magic = VULKAN_ICD_MAGIC_VALUE;
|
object->base.loader_magic = VULKAN_ICD_MAGIC_VALUE;
|
||||||
|
|
||||||
res = wine_vk_instance_convert_create_info(create_info, &create_info_host);
|
res = wine_vk_instance_convert_create_info(create_info, &create_info_host, object);
|
||||||
if (res != VK_SUCCESS)
|
if (res != VK_SUCCESS)
|
||||||
{
|
{
|
||||||
wine_vk_instance_free(object);
|
wine_vk_instance_free(object);
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
|
|
||||||
#define WINEVULKAN_QUIRK_GET_DEVICE_PROC_ADDR 0x00000001
|
#define WINEVULKAN_QUIRK_GET_DEVICE_PROC_ADDR 0x00000001
|
||||||
#define WINEVULKAN_QUIRK_ADJUST_MAX_IMAGE_COUNT 0x00000002
|
#define WINEVULKAN_QUIRK_ADJUST_MAX_IMAGE_COUNT 0x00000002
|
||||||
|
#define WINEVULKAN_QUIRK_IGNORE_EXPLICIT_LAYERS 0x00000004
|
||||||
|
|
||||||
struct vulkan_func
|
struct vulkan_func
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue