Commit b16f9897 by Alexis Hetu Committed by Alexis Hétu

Initial implementation of RenderPass

Basic shell class for RenderPass Bug b/119620965 Change-Id: Ice98943587f363f8cf03eddd3cc4c504b899d682 Reviewed-on: https://swiftshader-review.googlesource.com/c/22612Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 8f631c82
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "VkQueue.hpp" #include "VkQueue.hpp"
#include "VkSemaphore.hpp" #include "VkSemaphore.hpp"
#include "VkShaderModule.hpp" #include "VkShaderModule.hpp"
#include "VkRenderPass.hpp"
namespace vk namespace vk
{ {
......
// 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 "VkRenderPass.hpp"
namespace vk
{
RenderPass::RenderPass(const VkRenderPassCreateInfo* pCreateInfo, void* mem)
{
}
void RenderPass::destroy(const VkAllocationCallbacks* pAllocator)
{
}
size_t RenderPass::ComputeRequiredAllocationSize(const VkRenderPassCreateInfo* pCreateInfo)
{
return 0;
}
} // namespace vk
\ No newline at end of file
// 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_RENDER_PASS_HPP_
#define VK_RENDER_PASS_HPP_
#include "VkObject.hpp"
namespace vk
{
class RenderPass : public Object<RenderPass, VkRenderPass>
{
public:
RenderPass(const VkRenderPassCreateInfo* pCreateInfo, void* mem);
~RenderPass() = delete;
void destroy(const VkAllocationCallbacks* pAllocator);
static size_t ComputeRequiredAllocationSize(const VkRenderPassCreateInfo* pCreateInfo);
private:
};
static inline RenderPass* Cast(VkRenderPass object)
{
return reinterpret_cast<RenderPass*>(object);
}
} // namespace vk
#endif // VK_RENDER_PASS_HPP_
\ No newline at end of file
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "VkQueue.hpp" #include "VkQueue.hpp"
#include "VkSemaphore.hpp" #include "VkSemaphore.hpp"
#include "VkShaderModule.hpp" #include "VkShaderModule.hpp"
#include "VkRenderPass.hpp"
#include <algorithm> #include <algorithm>
#include <cstring> #include <cstring>
...@@ -988,9 +989,12 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass(VkDevice device, const VkRende ...@@ -988,9 +989,12 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass(VkDevice device, const VkRende
TRACE("(VkDevice device = 0x%X, const VkRenderPassCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkRenderPass* pRenderPass = 0x%X)", TRACE("(VkDevice device = 0x%X, const VkRenderPassCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkRenderPass* pRenderPass = 0x%X)",
device, pCreateInfo, pAllocator, pRenderPass); device, pCreateInfo, pAllocator, pRenderPass);
UNIMPLEMENTED(); if(pCreateInfo->pNext || pCreateInfo->flags)
{
UNIMPLEMENTED();
}
return VK_SUCCESS; return vk::RenderPass::Create(pAllocator, pCreateInfo, pRenderPass);
} }
VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator) VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator)
...@@ -998,7 +1002,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass(VkDevice device, VkRenderPass ren ...@@ -998,7 +1002,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass(VkDevice device, VkRenderPass ren
TRACE("(VkDevice device = 0x%X, VkRenderPass renderPass = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)", TRACE("(VkDevice device = 0x%X, VkRenderPass renderPass = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
device, renderPass, pAllocator); device, renderPass, pAllocator);
UNIMPLEMENTED(); vk::destroy(renderPass, pAllocator);
} }
VKAPI_ATTR void VKAPI_CALL vkGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity) VKAPI_ATTR void VKAPI_CALL vkGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity)
......
...@@ -115,6 +115,7 @@ copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platfor ...@@ -115,6 +115,7 @@ copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platfor
<ClCompile Include="VkPipelineLayout.cpp" /> <ClCompile Include="VkPipelineLayout.cpp" />
<ClCompile Include="VkPromotedExtensions.cpp" /> <ClCompile Include="VkPromotedExtensions.cpp" />
<ClCompile Include="VkQueue.cpp" /> <ClCompile Include="VkQueue.cpp" />
<ClCompile Include="VkRenderPass.cpp" />
<ClCompile Include="VkShaderModule.cpp" /> <ClCompile Include="VkShaderModule.cpp" />
<ClCompile Include="..\Device\Blitter.cpp" /> <ClCompile Include="..\Device\Blitter.cpp" />
<ClCompile Include="..\Device\Clipper.cpp" /> <ClCompile Include="..\Device\Clipper.cpp" />
...@@ -207,6 +208,7 @@ copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platfor ...@@ -207,6 +208,7 @@ copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platfor
<ClInclude Include="VkPipeline.hpp" /> <ClInclude Include="VkPipeline.hpp" />
<ClInclude Include="VkPipelineLayout.hpp" /> <ClInclude Include="VkPipelineLayout.hpp" />
<ClInclude Include="VkQueue.hpp" /> <ClInclude Include="VkQueue.hpp" />
<ClInclude Include="VkRenderPass.hpp" />
<ClInclude Include="VkSemaphore.hpp" /> <ClInclude Include="VkSemaphore.hpp" />
<ClInclude Include="VkShaderModule.hpp" /> <ClInclude Include="VkShaderModule.hpp" />
<ClInclude Include="..\Device\Blitter.hpp" /> <ClInclude Include="..\Device\Blitter.hpp" />
......
...@@ -243,6 +243,9 @@ ...@@ -243,6 +243,9 @@
<ClCompile Include="VkFramebuffer.cpp"> <ClCompile Include="VkFramebuffer.cpp">
<Filter>Source Files\Vulkan</Filter> <Filter>Source Files\Vulkan</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="VkRenderPass.cpp">
<Filter>Source Files\Vulkan</Filter>
</ClCompile>
<ClCompile Include="VkShaderModule.cpp"> <ClCompile Include="VkShaderModule.cpp">
<Filter>Source Files\Vulkan</Filter> <Filter>Source Files\Vulkan</Filter>
</ClCompile> </ClCompile>
...@@ -305,6 +308,9 @@ ...@@ -305,6 +308,9 @@
<ClInclude Include="VkQueue.hpp"> <ClInclude Include="VkQueue.hpp">
<Filter>Header Files\Vulkan</Filter> <Filter>Header Files\Vulkan</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="VkRenderPass.hpp">
<Filter>Header Files\Vulkan</Filter>
</ClInclude>
<ClInclude Include="VkSemaphore.hpp"> <ClInclude Include="VkSemaphore.hpp">
<Filter>Header Files\Vulkan</Filter> <Filter>Header Files\Vulkan</Filter>
</ClInclude> </ClInclude>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment