Creating geometry shaders works better if you pass the right SPIR-V...

This commit is contained in:
baldurk
2016-02-07 18:46:13 +01:00
parent 15ec34d3fd
commit 5c97b1b802
2 changed files with 2 additions and 7 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ RESOURCE_genericvs_spv TYPE_EMBED "spv/genericvs.spv"
RESOURCE_genericfs_spv TYPE_EMBED "spv/genericfs.spv"
RESOURCE_fixedcolfs_spv TYPE_EMBED "spv/fixedcolfs.spv"
RESOURCE_meshvs_spv TYPE_EMBED "spv/meshvs.spv"
RESOURCE_meshgs_spv TYPE_EMBED "spv/meshfs.spv"
RESOURCE_meshgs_spv TYPE_EMBED "spv/meshgs.spv"
RESOURCE_meshfs_spv TYPE_EMBED "spv/meshfs.spv"
#ifndef APSTUDIO_INVOKED
+1 -6
View File
@@ -2274,14 +2274,9 @@ MeshDisplayPipelines VulkanDebugManager::CacheMeshDisplayPipelines(const MeshFor
RDCASSERT(vkr == VK_SUCCESS);
}
// seems to not be working at the moment, just make a solid-shaded pipeline
vertAttrs[1].binding = 0;
vi.bindingCount = 1;
#if 1
vkr = vt->CreateGraphicsPipelines(Unwrap(m_Device), VK_NULL_HANDLE, 1, &pipeInfo, &cache.pipes[MeshDisplayPipelines::ePipe_Lit]);
RDCASSERT(vkr == VK_SUCCESS);
#else
// flat lit pipeline, needs geometry shader to calculate face normals
stages[0].shader = Unwrap(m_MeshShaders[0]);
stages[0].stage = VK_SHADER_STAGE_VERTEX;
@@ -2289,10 +2284,10 @@ MeshDisplayPipelines VulkanDebugManager::CacheMeshDisplayPipelines(const MeshFor
stages[1].stage = VK_SHADER_STAGE_GEOMETRY;
stages[2].shader = Unwrap(m_MeshShaders[2]);
stages[2].stage = VK_SHADER_STAGE_FRAGMENT;
pipeInfo.stageCount = 3;
vkr = vt->CreateGraphicsPipelines(Unwrap(m_Device), VK_NULL_HANDLE, 1, &pipeInfo, &cache.pipes[MeshDisplayPipelines::ePipe_Lit]);
RDCASSERT(vkr == VK_SUCCESS);
#endif
for(uint32_t i=0; i < MeshDisplayPipelines::ePipe_Count; i++)
if(cache.pipes[i] != VK_NULL_HANDLE)