#include "VkDeviceMemory.hpp"
#include "VkEvent.hpp"
#include "VkFence.hpp"
+#include "VkFramebuffer.hpp"
#include "VkImage.hpp"
#include "VkInstance.hpp"
#include "VkPipeline.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 "VkFramebuffer.hpp"
+
+namespace vk
+{
+
+Framebuffer::Framebuffer(const VkFramebufferCreateInfo* pCreateInfo, void* mem)
+{
+}
+
+void Framebuffer::destroy(const VkAllocationCallbacks* pAllocator)
+{
+}
+
+size_t Framebuffer::ComputeRequiredAllocationSize(const VkFramebufferCreateInfo* 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_FRAMEBUFFER_HPP_
+#define VK_FRAMEBUFFER_HPP_
+
+#include "VkObject.hpp"
+
+namespace vk
+{
+
+class Framebuffer : public Object<Framebuffer, VkFramebuffer>
+{
+public:
+ Framebuffer(const VkFramebufferCreateInfo* pCreateInfo, void* mem);
+ ~Framebuffer() = delete;
+ void destroy(const VkAllocationCallbacks* pAllocator);
+
+ static size_t ComputeRequiredAllocationSize(const VkFramebufferCreateInfo* pCreateInfo);
+
+private:
+};
+
+static inline Framebuffer* Cast(VkFramebuffer object)
+{
+ return reinterpret_cast<Framebuffer*>(object);
+}
+
+} // namespace vk
+
+#endif // VK_FRAMEBUFFER_HPP_
#include "VkDeviceMemory.hpp"
#include "VkEvent.hpp"
#include "VkFence.hpp"
+#include "VkFramebuffer.hpp"
#include "VkGetProcAddress.h"
#include "VkImage.hpp"
#include "VkInstance.hpp"
TRACE("(VkDevice device = 0x%X, const VkFramebufferCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkFramebuffer* pFramebuffer = 0x%X)",
device, pCreateInfo, pAllocator, pFramebuffer);
- UNIMPLEMENTED();
+ if(pCreateInfo->pNext || pCreateInfo->flags)
+ {
+ UNIMPLEMENTED();
+ }
- return VK_SUCCESS;
+ return vk::Framebuffer::Create(pAllocator, pCreateInfo, pFramebuffer);
}
VKAPI_ATTR void VKAPI_CALL vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator)
{
TRACE("(VkDevice device = 0x%X, VkFramebuffer framebuffer = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)");
- UNIMPLEMENTED();
+ vk::destroy(framebuffer, pAllocator);
}
VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass)
<ClCompile Include="VkDebug.cpp" />\r
<ClCompile Include="VkDevice.cpp" />\r
<ClCompile Include="VkDeviceMemory.cpp" />\r
+ <ClCompile Include="VkFramebuffer.cpp" />\r
<ClCompile Include="VkGetProcAddress.cpp" />\r
<ClCompile Include="VkImage.cpp" />\r
<ClCompile Include="VkInstance.cpp" />\r
<ClInclude Include="VkDeviceMemory.hpp" />\r
<ClInclude Include="VkEvent.hpp" />\r
<ClInclude Include="VkFence.hpp" />\r
+ <ClInclude Include="VkFramebuffer.hpp" />\r
<ClInclude Include="VkGetProcAddress.h" />\r
<ClInclude Include="VkImage.hpp" />\r
<ClInclude Include="VkInstance.hpp" />\r
<ClCompile Include="VkQueue.cpp">\r
<Filter>Source Files\Vulkan</Filter>\r
</ClCompile>\r
+ <ClCompile Include="VkFramebuffer.cpp">\r
+ <Filter>Source Files\Vulkan</Filter>\r
+ </ClCompile>\r
<ClCompile Include="VkShaderModule.cpp">\r
<Filter>Source Files\Vulkan</Filter>\r
</ClCompile>\r
<ClInclude Include="VkFence.hpp">\r
<Filter>Header Files\Vulkan</Filter>\r
</ClInclude>\r
+ <ClInclude Include="VkFramebuffer.hpp">\r
+ <Filter>Header Files\Vulkan</Filter>\r
+ </ClInclude>\r
<ClInclude Include="VkGetProcAddress.h">\r
<Filter>Header Files\Vulkan</Filter>\r
</ClInclude>\r