add BindingMapping instead Map<uint32_t,int>

This commit is contained in:
hyzboy 2020-11-30 17:56:40 +08:00
parent 70715e93e8
commit e398a85e65
3 changed files with 7 additions and 4 deletions

View File

@ -1,9 +1,10 @@
#ifndef HGL_GRAPH_VULKAN_INCLUDE
#define HGL_GRAPH_VULKAN_INCLUDE
#include<hgl/type/List.h>
#include<hgl/math/Math.h>
#include<hgl/type/List.h>
#include<hgl/type/String.h>
#include<hgl/type/Map.h>
#include<iostream>
#include<hgl/graph/VKNamespace.h>
#include<hgl/graph/VKFormat.h>
@ -14,6 +15,7 @@
VK_NAMESPACE_BEGIN
using CharPointerList=hgl::List<const char *>;
using BindingMapping=Map<uint32_t,int>;
class VulkanInstance;
class GPUPhysicalDevice;

View File

@ -11,7 +11,7 @@ class DescriptorSets
VkDevice device;
int count;
VkDescriptorSet desc_set;
const Map<uint32_t,int> *index_by_binding;
const BindingMapping *index_by_binding;
VkPipelineLayout pipeline_layout;
@ -23,7 +23,7 @@ private:
friend class DescriptorSetLayoutCreater;
DescriptorSets(VkDevice dev,const int c,VkPipelineLayout pl,VkDescriptorSet ds,const Map<uint32_t,int> *bi):index_by_binding(bi)
DescriptorSets(VkDevice dev,const int c,VkPipelineLayout pl,VkDescriptorSet ds,const BindingMapping *bi):index_by_binding(bi)
{
device=dev;
count=c;

View File

@ -1,5 +1,6 @@
#pragma once
#include<hgl/graph/VK.h>
#include<hgl/graph/shader/ShaderResource.h>
#include<hgl/type/Map.h>
VK_NAMESPACE_BEGIN
@ -15,7 +16,7 @@ class DescriptorSetLayoutCreater
List<VkDescriptorSetLayoutBinding> layout_binding_list;
VkDescriptorSetLayout dsl=VK_NULL_HANDLE;
Map<uint32_t,int> index_by_binding;
BindingMapping index_by_binding;
VkPipelineLayout pipeline_layout=VK_NULL_HANDLE;