lots of updates
This commit is contained in:
@@ -3,16 +3,20 @@ CVkMaterial::CVkMaterial( IShader *pShader )
|
||||
{
|
||||
m_pVkShader = (CVkShader*)pShader;
|
||||
|
||||
VkDescriptorPoolSize pools[1] =
|
||||
VkDescriptorPoolSize pools[2] =
|
||||
{
|
||||
{
|
||||
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
|
||||
128,
|
||||
},
|
||||
{
|
||||
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
|
||||
128,
|
||||
}
|
||||
};
|
||||
VkDescriptorPoolCreateInfo stPool = {};
|
||||
stPool.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
|
||||
stPool.poolSizeCount = 1;
|
||||
stPool.poolSizeCount = 2;
|
||||
stPool.pPoolSizes = pools;
|
||||
stPool.maxSets = 1;
|
||||
stPool.flags = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT;
|
||||
@@ -37,6 +41,7 @@ CVkMaterial::CVkMaterial( IShader *pShader )
|
||||
switch (b.eDescriptorType)
|
||||
{
|
||||
case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER:
|
||||
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER:
|
||||
write.pBufferInfo = new VkDescriptorBufferInfo;
|
||||
break;
|
||||
default:
|
||||
@@ -88,6 +93,6 @@ void CVkMaterial::SetShaderResource( uint32_t uRegister, uint32_t uSet, IRenderi
|
||||
((VkDescriptorBufferInfo*)m_writes[uRegister].pBufferInfo)->buffer = pBuffer->m_buffer;
|
||||
((VkDescriptorBufferInfo*)m_writes[uRegister].pBufferInfo)->range = pBuffer->m_nSize;
|
||||
}
|
||||
Frame();
|
||||
vkUpdateDescriptorSets(m_pVkShader->m_hDevice, 1, &m_writes[uRegister], 0, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user