Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/context_vk.c | 4 ++++ dlls/wined3d/device.c | 13 +++++++++++++ dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 18 insertions(+)
diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c index 83b1d081514..43b806a19b5 100644 --- a/dlls/wined3d/context_vk.c +++ b/dlls/wined3d/context_vk.c @@ -2620,6 +2620,10 @@ static bool wined3d_shader_resource_bindings_add_null_srv_binding(struct wined3d return wined3d_shader_descriptor_writes_vk_add_write(writes, vk_descriptor_set, binding_idx, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, NULL, &v->vk_info_cube, NULL);
+ case WINED3D_SHADER_RESOURCE_TEXTURE_1DARRAY: + return wined3d_shader_descriptor_writes_vk_add_write(writes, vk_descriptor_set, + binding_idx, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, NULL, &v->vk_info_1d_array, NULL); + case WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY: return wined3d_shader_descriptor_writes_vk_add_write(writes, vk_descriptor_set, binding_idx, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, NULL, &v->vk_info_2d_array, NULL); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 813ee773478..13cf4c8ddf3 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -778,6 +778,16 @@ bool wined3d_device_vk_create_null_views(struct wined3d_device_vk *device_vk, st v->vk_info_1d.imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; TRACE("Created 1D image view 0x%s.\n", wine_dbgstr_longlong(v->vk_info_1d.imageView));
+ view_desc.viewType = VK_IMAGE_VIEW_TYPE_1D_ARRAY; + if ((vr = VK_CALL(vkCreateImageView(device_vk->vk_device, &view_desc, NULL, &v->vk_info_1d_array.imageView))) < 0) + { + ERR("Failed to create 1D image view, vr %s.\n", wined3d_debug_vkresult(vr)); + goto fail; + } + v->vk_info_1d_array.sampler = VK_NULL_HANDLE; + v->vk_info_1d_array.imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; + TRACE("Created 1D array image view 0x%s.\n", wine_dbgstr_longlong(v->vk_info_1d_array.imageView)); + view_desc.image = r->image_2d.vk_image; view_desc.viewType = VK_IMAGE_VIEW_TYPE_2D; if ((vr = VK_CALL(vkCreateImageView(device_vk->vk_device, &view_desc, NULL, &v->vk_info_2d.imageView))) < 0) @@ -858,6 +868,8 @@ fail: VK_CALL(vkDestroyImageView(device_vk->vk_device, v->vk_info_2dms.imageView, NULL)); if (v->vk_info_2d.imageView) VK_CALL(vkDestroyImageView(device_vk->vk_device, v->vk_info_2d.imageView, NULL)); + if (v->vk_info_1d_array.imageView) + VK_CALL(vkDestroyImageView(device_vk->vk_device, v->vk_info_1d_array.imageView, NULL)); if (v->vk_info_1d.imageView) VK_CALL(vkDestroyImageView(device_vk->vk_device, v->vk_info_1d.imageView, NULL)); if (v->vk_view_buffer_float) @@ -877,6 +889,7 @@ void wined3d_device_vk_destroy_null_views(struct wined3d_device_vk *device_vk, s wined3d_context_vk_destroy_vk_image_view(context_vk, v->vk_info_3d.imageView, id); wined3d_context_vk_destroy_vk_image_view(context_vk, v->vk_info_2dms.imageView, id); wined3d_context_vk_destroy_vk_image_view(context_vk, v->vk_info_2d.imageView, id); + wined3d_context_vk_destroy_vk_image_view(context_vk, v->vk_info_1d_array.imageView, id); wined3d_context_vk_destroy_vk_image_view(context_vk, v->vk_info_1d.imageView, id);
wined3d_context_vk_destroy_vk_buffer_view(context_vk, v->vk_view_buffer_float, id); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0ef6e89f1f1..f58841fec73 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3914,6 +3914,7 @@ struct wined3d_null_views_vk VkDescriptorImageInfo vk_info_2dms; VkDescriptorImageInfo vk_info_3d; VkDescriptorImageInfo vk_info_cube; + VkDescriptorImageInfo vk_info_1d_array; VkDescriptorImageInfo vk_info_2d_array; VkDescriptorImageInfo vk_info_2dms_array; };