#include "VkDeviceMemory.hpp"
#include "VkEvent.hpp"
#include "VkFence.hpp"
+#include "VkImage.hpp"
#include "VkInstance.hpp"
#include "VkPipeline.hpp"
#include "VkPipelineLayout.hpp"
--- /dev/null
+// Copyright 2018 The SwiftShader Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "VkImage.hpp"
+
+namespace vk
+{
+
+Image::Image(const VkImageCreateInfo* pCreateInfo, void* mem)
+{
+}
+
+void Image::destroy(const VkAllocationCallbacks* pAllocator)
+{
+}
+
+size_t Image::ComputeRequiredAllocationSize(const VkImageCreateInfo* pCreateInfo)
+{
+ return 0;
+}
+
+} // namespace vk
\ No newline at end of file
--- /dev/null
+// Copyright 2018 The SwiftShader Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef VK_IMAGE_HPP_
+#define VK_IMAGE_HPP_
+
+#include "VkObject.hpp"
+
+namespace vk
+{
+
+class Image : public Object<Image, VkImage>
+{
+public:
+ Image(const VkImageCreateInfo* pCreateInfo, void* mem);
+ ~Image() = delete;
+ void destroy(const VkAllocationCallbacks* pAllocator);
+
+ static size_t ComputeRequiredAllocationSize(const VkImageCreateInfo* pCreateInfo);
+
+private:
+};
+
+static inline Image* Cast(VkImage object)
+{
+ return reinterpret_cast<Image*>(object);
+}
+
+} // namespace vk
+
+#endif // VK_IMAGE_HPP_
\ No newline at end of file
#include "VkEvent.hpp"
#include "VkFence.hpp"
#include "VkGetProcAddress.h"
+#include "VkImage.hpp"
#include "VkInstance.hpp"
#include "VkPhysicalDevice.hpp"
#include "VkPipeline.hpp"
TRACE("(VkDevice device = 0x%X, const VkImageCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkImage* pImage = 0x%X)",
device, pCreateInfo, pAllocator, pImage);
- UNIMPLEMENTED();
+ if(pCreateInfo->pNext)
+ {
+ UNIMPLEMENTED();
+ }
- return VK_SUCCESS;
+ return vk::Image::Create(pAllocator, pCreateInfo, pImage);
}
VKAPI_ATTR void VKAPI_CALL vkDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator)
TRACE("(VkDevice device = 0x%X, VkImage image = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
device, image, pAllocator);
- UNIMPLEMENTED();
+ vk::destroy(image, pAllocator);
}
VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout)
<ClCompile Include="VkDevice.cpp" />\r
<ClCompile Include="VkDeviceMemory.cpp" />\r
<ClCompile Include="VkGetProcAddress.cpp" />\r
+ <ClCompile Include="VkImage.cpp" />\r
<ClCompile Include="VkInstance.cpp" />\r
<ClCompile Include="VkMemory.cpp" />\r
<ClCompile Include="VkPhysicalDevice.cpp" />\r
<ClInclude Include="VkEvent.hpp" />\r
<ClInclude Include="VkFence.hpp" />\r
<ClInclude Include="VkGetProcAddress.h" />\r
+ <ClInclude Include="VkImage.hpp" />\r
<ClInclude Include="VkInstance.hpp" />\r
<ClInclude Include="VkMemory.h" />\r
<ClInclude Include="VkObject.hpp" />\r
<ClCompile Include="VkPipelineLayout.cpp">\r
<Filter>Source Files\Vulkan</Filter>\r
</ClCompile>\r
+ <ClCompile Include="VkImage.cpp">\r
+ <Filter>Source Files\Vulkan</Filter>\r
+ </ClCompile>\r
<ClCompile Include="VkPromotedExtensions.cpp">\r
<Filter>Source Files\Vulkan</Filter>\r
</ClCompile>\r
<ClInclude Include="VkGetProcAddress.h">\r
<Filter>Header Files\Vulkan</Filter>\r
</ClInclude>\r
+ <ClInclude Include="VkImage.hpp">\r
+ <Filter>Header Files\Vulkan</Filter>\r
+ </ClInclude>\r
<ClInclude Include="VkInstance.hpp">\r
<Filter>Header Files\Vulkan</Filter>\r
</ClInclude>\r