Commit 7379451a authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Add a supported extensions array to the wined3d_vk_info structure.

parent a42808b5
...@@ -4313,8 +4313,8 @@ static HRESULT adapter_gl_create_device(struct wined3d *wined3d, const struct wi ...@@ -4313,8 +4313,8 @@ static HRESULT adapter_gl_create_device(struct wined3d *wined3d, const struct wi
if (!(device_gl = heap_alloc_zero(sizeof(*device_gl)))) if (!(device_gl = heap_alloc_zero(sizeof(*device_gl))))
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
if (FAILED(hr = wined3d_device_init(&device_gl->d, wined3d, adapter->ordinal, device_type, if (FAILED(hr = wined3d_device_init(&device_gl->d, wined3d, adapter->ordinal, device_type, focus_window,
focus_window, flags, surface_alignment, levels, level_count, device_parent))) flags, surface_alignment, levels, level_count, adapter->gl_info.supported, device_parent)))
{ {
WARN("Failed to initialize device, hr %#x.\n", hr); WARN("Failed to initialize device, hr %#x.\n", hr);
heap_free(device_gl); heap_free(device_gl);
......
...@@ -477,8 +477,8 @@ static HRESULT adapter_vk_create_device(struct wined3d *wined3d, const struct wi ...@@ -477,8 +477,8 @@ static HRESULT adapter_vk_create_device(struct wined3d *wined3d, const struct wi
goto fail; goto fail;
} }
if (FAILED(hr = wined3d_device_init(&device_vk->d, wined3d, adapter->ordinal, device_type, if (FAILED(hr = wined3d_device_init(&device_vk->d, wined3d, adapter->ordinal, device_type, focus_window,
focus_window, flags, surface_alignment, levels, level_count, device_parent))) flags, surface_alignment, levels, level_count, vk_info->supported, device_parent)))
{ {
WARN("Failed to initialize device, hr %#x.\n", hr); WARN("Failed to initialize device, hr %#x.\n", hr);
wined3d_allocator_cleanup(&device_vk->allocator); wined3d_allocator_cleanup(&device_vk->allocator);
...@@ -1745,6 +1745,9 @@ static BOOL wined3d_init_vulkan(struct wined3d_vk_info *vk_info) ...@@ -1745,6 +1745,9 @@ static BOOL wined3d_init_vulkan(struct wined3d_vk_info *vk_info)
if (!enable_vulkan_instance_extensions(&instance_info.enabledExtensionCount, enabled_instance_extensions, vk_info)) if (!enable_vulkan_instance_extensions(&instance_info.enabledExtensionCount, enabled_instance_extensions, vk_info))
goto fail; goto fail;
memset(vk_info->supported, 0, sizeof(vk_info->supported));
vk_info->supported[WINED3D_VK_EXT_NONE] = TRUE;
if ((vr = VK_CALL(vkCreateInstance(&instance_info, NULL, &instance))) < 0) if ((vr = VK_CALL(vkCreateInstance(&instance_info, NULL, &instance))) < 0)
{ {
WARN("Failed to create Vulkan instance, vr %s.\n", wined3d_debug_vkresult(vr)); WARN("Failed to create Vulkan instance, vr %s.\n", wined3d_debug_vkresult(vr));
......
...@@ -5676,7 +5676,7 @@ static BOOL wined3d_select_feature_level(const struct wined3d_adapter *adapter, ...@@ -5676,7 +5676,7 @@ static BOOL wined3d_select_feature_level(const struct wined3d_adapter *adapter,
HRESULT wined3d_device_init(struct wined3d_device *device, struct wined3d *wined3d, HRESULT wined3d_device_init(struct wined3d_device *device, struct wined3d *wined3d,
unsigned int adapter_idx, enum wined3d_device_type device_type, HWND focus_window, unsigned int flags, unsigned int adapter_idx, enum wined3d_device_type device_type, HWND focus_window, unsigned int flags,
BYTE surface_alignment, const enum wined3d_feature_level *levels, unsigned int level_count, BYTE surface_alignment, const enum wined3d_feature_level *levels, unsigned int level_count,
struct wined3d_device_parent *device_parent) const BOOL *supported_extensions, struct wined3d_device_parent *device_parent)
{ {
struct wined3d_adapter *adapter = wined3d->adapters[adapter_idx]; struct wined3d_adapter *adapter = wined3d->adapters[adapter_idx];
const struct wined3d_fragment_pipe_ops *fragment_pipeline; const struct wined3d_fragment_pipe_ops *fragment_pipeline;
...@@ -5716,7 +5716,7 @@ HRESULT wined3d_device_init(struct wined3d_device *device, struct wined3d *wined ...@@ -5716,7 +5716,7 @@ HRESULT wined3d_device_init(struct wined3d_device *device, struct wined3d *wined
if (vertex_pipeline->vp_states && fragment_pipeline->states if (vertex_pipeline->vp_states && fragment_pipeline->states
&& FAILED(hr = compile_state_table(device->state_table, device->multistate_funcs, && FAILED(hr = compile_state_table(device->state_table, device->multistate_funcs,
&adapter->d3d_info, adapter->gl_info.supported, vertex_pipeline, &adapter->d3d_info, supported_extensions, vertex_pipeline,
fragment_pipeline, adapter->misc_state_template))) fragment_pipeline, adapter->misc_state_template)))
{ {
ERR("Failed to compile state table, hr %#x.\n", hr); ERR("Failed to compile state table, hr %#x.\n", hr);
......
...@@ -2483,8 +2483,8 @@ static HRESULT adapter_no3d_create_device(struct wined3d *wined3d, const struct ...@@ -2483,8 +2483,8 @@ static HRESULT adapter_no3d_create_device(struct wined3d *wined3d, const struct
if (!(device_no3d = heap_alloc_zero(sizeof(*device_no3d)))) if (!(device_no3d = heap_alloc_zero(sizeof(*device_no3d))))
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
if (FAILED(hr = wined3d_device_init(&device_no3d->d, wined3d, adapter->ordinal, device_type, if (FAILED(hr = wined3d_device_init(&device_no3d->d, wined3d, adapter->ordinal, device_type, focus_window,
focus_window, flags, surface_alignment, levels, level_count, device_parent))) flags, surface_alignment, levels, level_count, adapter->gl_info.supported, device_parent)))
{ {
WARN("Failed to initialize device, hr %#x.\n", hr); WARN("Failed to initialize device, hr %#x.\n", hr);
heap_free(device_no3d); heap_free(device_no3d);
......
...@@ -3572,7 +3572,7 @@ void wined3d_device_destroy_default_samplers(struct wined3d_device *device, ...@@ -3572,7 +3572,7 @@ void wined3d_device_destroy_default_samplers(struct wined3d_device *device,
HRESULT wined3d_device_init(struct wined3d_device *device, struct wined3d *wined3d, HRESULT wined3d_device_init(struct wined3d_device *device, struct wined3d *wined3d,
unsigned int adapter_idx, enum wined3d_device_type device_type, HWND focus_window, unsigned int flags, unsigned int adapter_idx, enum wined3d_device_type device_type, HWND focus_window, unsigned int flags,
BYTE surface_alignment, const enum wined3d_feature_level *levels, unsigned int level_count, BYTE surface_alignment, const enum wined3d_feature_level *levels, unsigned int level_count,
struct wined3d_device_parent *device_parent) DECLSPEC_HIDDEN; const BOOL *supported_extensions, struct wined3d_device_parent *device_parent) DECLSPEC_HIDDEN;
LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode, LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode,
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN; UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN;
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN; void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
......
...@@ -181,6 +181,12 @@ struct vulkan_ops ...@@ -181,6 +181,12 @@ struct vulkan_ops
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr;
}; };
enum wined3d_vk_extension
{
WINED3D_VK_EXT_NONE,
WINED3D_VK_EXT_COUNT,
};
struct wined3d_vk_info struct wined3d_vk_info
{ {
struct vulkan_ops vk_ops; struct vulkan_ops vk_ops;
...@@ -188,6 +194,7 @@ struct wined3d_vk_info ...@@ -188,6 +194,7 @@ struct wined3d_vk_info
VkInstance instance; VkInstance instance;
unsigned int api_version; unsigned int api_version;
BOOL supported[WINED3D_VK_EXT_COUNT];
#ifdef USE_WIN32_VULKAN #ifdef USE_WIN32_VULKAN
HMODULE vulkan_lib; HMODULE vulkan_lib;
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment