At this stage after adding few more stubs driver fails at
authorVivek Pandya <vivekvpandya@gmail.com>
Sun, 6 Sep 2020 04:36:57 +0000 (10:06 +0530)
committerVivek Pandya <vivekvpandya@gmail.com>
Sun, 6 Sep 2020 04:36:57 +0000 (10:06 +0530)
libresoc_CreateGraphicsPipelines().

src/libre-soc/vulkan/libresoc_descriptor_set.c [new file with mode: 0644]
src/libre-soc/vulkan/libresoc_device.c
src/libre-soc/vulkan/libresoc_image.c
src/libre-soc/vulkan/libresoc_pass.c [new file with mode: 0644]
src/libre-soc/vulkan/meson.build

diff --git a/src/libre-soc/vulkan/libresoc_descriptor_set.c b/src/libre-soc/vulkan/libresoc_descriptor_set.c
new file mode 100644 (file)
index 0000000..5c0b5a5
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright © 2016 Red Hat.
+ * Copyright © 2016 Bas Nieuwenhuizen
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+#include "libresoc_private.h"
+
+VkResult libresoc_CreatePipelineLayout(
+       VkDevice                                    _device,
+       const VkPipelineLayoutCreateInfo*           pCreateInfo,
+       const VkAllocationCallbacks*                pAllocator,
+       VkPipelineLayout*                           pPipelineLayout)
+{
+       //TODO: stub
+       return VK_SUCCESS;
+}
+
+void libresoc_DestroyPipelineLayout(
+       VkDevice                                    _device,
+       VkPipelineLayout                            _pipelineLayout,
+       const VkAllocationCallbacks*                pAllocator)
+{
+
+       //TODO: stub
+}
index 92a901657e9e1cd9a7a75997c6808de55a34af7b..0aadfe769a4027b864f41d35db3190b0b3fb2861 100644 (file)
@@ -1727,3 +1727,24 @@ VkResult libresoc_ResetFences(VkDevice _device,
        //TODO: stub
        return VK_SUCCESS;
 }
+
+VkResult libresoc_CreateFramebuffer(
+       VkDevice                                    _device,
+       const VkFramebufferCreateInfo*              pCreateInfo,
+       const VkAllocationCallbacks*                pAllocator,
+       VkFramebuffer*                              pFramebuffer)
+{
+       //TODO: stub
+       return VK_SUCCESS;
+}
+void libresoc_DestroyBuffer(
+       VkDevice                                    _device,
+       VkBuffer                                    _buffer,
+       const VkAllocationCallbacks*                pAllocator)
+{}
+
+void libresoc_DestroyFence(
+       VkDevice                                    _device,
+       VkFence                                     _fence,
+       const VkAllocationCallbacks*                pAllocator)
+{}
index 46b9acb200e8b95ff22a5757959bee6f9ebd8d62..4778d4cd47185918cbd415b1d637a50afe47bbbd 100644 (file)
@@ -157,3 +157,40 @@ void libresoc_GetImageSubresourceLayout(
 {
 //TODO: stub
 }
+
+VkResult
+libresoc_CreateImageView(VkDevice _device,
+                    const VkImageViewCreateInfo *pCreateInfo,
+                    const VkAllocationCallbacks *pAllocator,
+                    VkImageView *pView)
+{
+       //TODO: stub
+       return VK_SUCCESS;
+       // LIBRESOC_FROM_HANDLE(libresoc_device, device, _device);
+       // struct libresoc_image_view *view;
+
+       // view = vk_alloc2(&device->vk.alloc, pAllocator, sizeof(*view), 8,
+       //                 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
+       // if (view == NULL)
+       //      return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
+
+       // vk_object_base_init(&device->vk, &view->base,
+       //                  VK_OBJECT_TYPE_IMAGE_VIEW);
+
+       // libresoc_image_view_init(view, device, pCreateInfo, NULL);
+
+       // *pView = libresoc_image_view_to_handle(view);
+
+       // return VK_SUCCESS;
+}
+void
+libresoc_DestroyImage(VkDevice _device, VkImage _image,
+                 const VkAllocationCallbacks *pAllocator)
+{
+
+}
+
+void
+libresoc_DestroyImageView(VkDevice _device, VkImageView _iview,
+                     const VkAllocationCallbacks *pAllocator)
+{}
diff --git a/src/libre-soc/vulkan/libresoc_pass.c b/src/libre-soc/vulkan/libresoc_pass.c
new file mode 100644 (file)
index 0000000..c05f60f
--- /dev/null
@@ -0,0 +1,40 @@
+
+/*
+ * Copyright © 2016 Red Hat.
+ * Copyright © 2016 Bas Nieuwenhuizen
+ *
+ * based in part on anv driver which is:
+ * Copyright © 2015 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+#include "libresoc_private.h"
+
+#include "vk_util.h"
+
+VkResult libresoc_CreateRenderPass(
+       VkDevice                                    _device,
+       const VkRenderPassCreateInfo*               pCreateInfo,
+       const VkAllocationCallbacks*                pAllocator,
+       VkRenderPass*                               pRenderPass)
+{
+       //TODO: stub
+       return VK_SUCCESS;
+}
index d5e6f9baaebd4fe2c7f19c43463358f4f06b3e44..ee6541c79cca7c651d1459e7e576f5cd6745a3e7 100644 (file)
@@ -63,6 +63,8 @@ libresoc_vk_format_table_c = custom_target(
 
 liblibresoc_files = files(
   'libresoc_device.c',
+  'libresoc_descriptor_set.c',
+  'libresoc_pass.c',
   'libresoc_meta_clear.c',
   'libresoc_image.c',
   'libresoc_cmd_buffer.c',