forked from MoonsideGames/Refresh
fix null reference
parent
2a4811315b
commit
39ec13501a
|
@ -5022,13 +5022,13 @@ static void VULKAN_SetVertexSamplers(
|
|||
VulkanGraphicsPipeline *graphicsPipeline = (VulkanGraphicsPipeline*) pipeline;
|
||||
SamplerDescriptorSetData vertexSamplerDescriptorSetData;
|
||||
|
||||
samplerCount = graphicsPipeline->pipelineLayout->vertexSamplerDescriptorSetCache->samplerBindingCount;
|
||||
|
||||
if (samplerCount == 0)
|
||||
if (graphicsPipeline->pipelineLayout->vertexSamplerDescriptorSetCache == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
samplerCount = graphicsPipeline->pipelineLayout->vertexSamplerDescriptorSetCache->samplerBindingCount;
|
||||
|
||||
for (i = 0; i < samplerCount; i += 1)
|
||||
{
|
||||
currentTexture = (VulkanTexture*) pTextures[i];
|
||||
|
@ -5057,13 +5057,13 @@ static void VULKAN_SetFragmentSamplers(
|
|||
VulkanGraphicsPipeline *graphicsPipeline = (VulkanGraphicsPipeline*) pipeline;
|
||||
SamplerDescriptorSetData fragmentSamplerDescriptorSetData;
|
||||
|
||||
samplerCount = graphicsPipeline->pipelineLayout->fragmentSamplerDescriptorSetCache->samplerBindingCount;
|
||||
|
||||
if (samplerCount == 0)
|
||||
if (graphicsPipeline->pipelineLayout->vertexSamplerDescriptorSetCache == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
samplerCount = graphicsPipeline->pipelineLayout->fragmentSamplerDescriptorSetCache->samplerBindingCount;
|
||||
|
||||
for (i = 0; i < samplerCount; i += 1)
|
||||
{
|
||||
currentTexture = (VulkanTexture*) pTextures[i];
|
||||
|
|
Loading…
Reference in New Issue