added GetGranularity at RenderPass
This commit is contained in:
parent
3bf1f53d4f
commit
1217edccf3
@ -19,6 +19,8 @@ class RenderPass
|
||||
List<VkFormat> color_formats;
|
||||
VkFormat depth_format;
|
||||
|
||||
VkExtent2D granularity;
|
||||
|
||||
protected:
|
||||
|
||||
ObjectList<Pipeline> pipeline_list;
|
||||
@ -27,14 +29,7 @@ private:
|
||||
|
||||
friend class DeviceRenderPassManage;
|
||||
|
||||
RenderPass(VkDevice d,VkPipelineCache pc,VkRenderPass rp,const List<VkFormat> &cf,VkFormat df)
|
||||
{
|
||||
device=d;
|
||||
pipeline_cache=pc;
|
||||
render_pass=rp;
|
||||
color_formats=cf;
|
||||
depth_format=df;
|
||||
}
|
||||
RenderPass(VkDevice d,VkPipelineCache pc,VkRenderPass rp,const List<VkFormat> &cf,VkFormat df);
|
||||
|
||||
public:
|
||||
|
||||
@ -53,6 +48,8 @@ public:
|
||||
}
|
||||
const VkFormat GetDepthFormat()const{return depth_format;}
|
||||
|
||||
const VkExtent2D & GetGranularity()const{return granularity;}
|
||||
|
||||
public:
|
||||
|
||||
Pipeline *CreatePipeline(const Material *, PipelineData *);
|
||||
|
@ -5,6 +5,17 @@
|
||||
#include<hgl/graph/VKMaterial.h>
|
||||
#include<hgl/graph/VKMaterialInstance.h>
|
||||
VK_NAMESPACE_BEGIN
|
||||
RenderPass::RenderPass(VkDevice d,VkPipelineCache pc,VkRenderPass rp,const List<VkFormat> &cf,VkFormat df)
|
||||
{
|
||||
device=d;
|
||||
pipeline_cache=pc;
|
||||
render_pass=rp;
|
||||
color_formats=cf;
|
||||
depth_format=df;
|
||||
|
||||
vkGetRenderAreaGranularity(device,render_pass,&granularity);
|
||||
}
|
||||
|
||||
RenderPass::~RenderPass()
|
||||
{
|
||||
pipeline_list.Clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user