Henri Verbeet : wined3d: Implement Vulkan unordered access view counter descriptors.

Alexandre Julliard julliard at winehq.org
Thu May 14 16:17:44 CDT 2020


Module: wine
Branch: master
Commit: f1f3bb73549cfc87a3760e181a882c1470ddc1e4
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f1f3bb73549cfc87a3760e181a882c1470ddc1e4

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu May 14 17:51:43 2020 +0430

wined3d: Implement Vulkan unordered access view counter descriptors.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/context_vk.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c
index e37cbc787f..2f170b085b 100644
--- a/dlls/wined3d/context_vk.c
+++ b/dlls/wined3d/context_vk.c
@@ -1329,6 +1329,7 @@ static bool wined3d_context_vk_update_descriptors(struct wined3d_context_vk *con
     const struct wined3d_vk_info *vk_info = context_vk->vk_info;
     const struct wined3d_shader_resource_binding *binding;
     struct wined3d_shader_resource_bindings *bindings;
+    struct wined3d_unordered_access_view_vk *uav_vk;
     struct wined3d_unordered_access_view *uav;
     const VkDescriptorBufferInfo *buffer_info;
     struct wined3d_shader_resource_view *srv;
@@ -1434,6 +1435,20 @@ static bool wined3d_context_vk_update_descriptors(struct wined3d_context_vk *con
                     return false;
                 break;
 
+            case WINED3D_SHADER_DESCRIPTOR_TYPE_UAV_COUNTER:
+                if (!(uav = state->unordered_access_view[WINED3D_PIPELINE_COMPUTE][binding->resource_idx]))
+                {
+                    FIXME("NULL unordered access view counters not implemented.\n");
+                    return false;
+                }
+
+                uav_vk = wined3d_unordered_access_view_vk(uav);
+                if (!uav_vk->vk_counter_view || !wined3d_shader_descriptor_writes_vk_add_write(writes,
+                        vk_descriptor_set, binding->binding_idx, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER,
+                        NULL, NULL, &uav_vk->vk_counter_view))
+                    return false;
+                break;
+
             case WINED3D_SHADER_DESCRIPTOR_TYPE_SAMPLER:
                 if (!(sampler = state->sampler[binding->shader_type][binding->resource_idx]))
                     sampler = context_vk->c.device->null_sampler;
@@ -1443,7 +1458,7 @@ static bool wined3d_context_vk_update_descriptors(struct wined3d_context_vk *con
                 break;
 
             default:
-                FIXME("Unhandled descriptor type %#x.\n", binding->shader_descriptor_type);
+                ERR("Invalid descriptor type %#x.\n", binding->shader_descriptor_type);
                 return false;
         }
     }




More information about the wine-cvs mailing list