mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 17:36:36 +00:00
Only read pImmutableSamplers pointer for sampler descriptors
This commit is contained in:
@@ -115,7 +115,9 @@ void DescSetLayout::Init(VulkanResourceManager *resourceMan, VulkanCreationInfo
|
||||
bindings[b].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)
|
||||
dynamicCount++;
|
||||
|
||||
if(pCreateInfo->pBindings[i].pImmutableSamplers)
|
||||
if((bindings[b].descriptorType == VK_DESCRIPTOR_TYPE_SAMPLER ||
|
||||
bindings[b].descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER) &&
|
||||
pCreateInfo->pBindings[i].pImmutableSamplers)
|
||||
{
|
||||
bindings[b].immutableSampler = new ResourceId[bindings[b].descriptorCount];
|
||||
|
||||
|
||||
@@ -3050,7 +3050,16 @@ void DoSerialise(SerialiserType &ser, VkDescriptorSetLayoutBinding &el)
|
||||
SERIALISE_MEMBER(descriptorType);
|
||||
SERIALISE_MEMBER(descriptorCount);
|
||||
SERIALISE_MEMBER_VKFLAGS(VkShaderStageFlags, stageFlags);
|
||||
SERIALISE_MEMBER_ARRAY(pImmutableSamplers, descriptorCount);
|
||||
|
||||
if(el.descriptorType == VK_DESCRIPTOR_TYPE_SAMPLER ||
|
||||
el.descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER)
|
||||
{
|
||||
SERIALISE_MEMBER_ARRAY(pImmutableSamplers, descriptorCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
SERIALISE_MEMBER_ARRAY_EMPTY(pImmutableSamplers);
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
@@ -45,7 +45,9 @@ VkDescriptorSetLayoutCreateInfo WrappedVulkan::UnwrapInfo(const VkDescriptorSetL
|
||||
{
|
||||
unwrapped[i] = info->pBindings[i];
|
||||
|
||||
if(unwrapped[i].pImmutableSamplers)
|
||||
if((unwrapped[i].descriptorType == VK_DESCRIPTOR_TYPE_SAMPLER ||
|
||||
unwrapped[i].descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER) &&
|
||||
unwrapped[i].pImmutableSamplers)
|
||||
{
|
||||
VkSampler *unwrappedSamplers = nextSampler;
|
||||
nextSampler += unwrapped[i].descriptorCount;
|
||||
|
||||
@@ -112,6 +112,7 @@ void main()
|
||||
|
||||
VkDescriptorSetLayout immutsetlayout = createDescriptorSetLayout(vkh::DescriptorSetLayoutCreateInfo({
|
||||
{0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_VERTEX_BIT, &validSampler},
|
||||
{99, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 1, VK_SHADER_STAGE_VERTEX_BIT, &invalidSampler},
|
||||
}));
|
||||
|
||||
VkDescriptorSetLayout pushlayout = VK_NULL_HANDLE;
|
||||
|
||||
Reference in New Issue
Block a user