Add list of shader subroutine values

This commit is contained in:
baldurk
2015-01-17 21:27:45 +00:00
parent 82d262ad8b
commit 11c2d4bdcc
3 changed files with 19 additions and 0 deletions
+2
View File
@@ -68,6 +68,8 @@ struct GLPipelineState
ShaderBindpointMapping BindpointMapping;
ShaderStageType stage;
rdctype::array<uint32_t> Subroutines;
} m_VS, m_TCS, m_TES, m_GS, m_FS, m_CS;
struct FixedVertexProcessing
+14
View File
@@ -1156,6 +1156,20 @@ void GLReplay::SavePipelineState()
}
}
for(int i=0; i < 6; i++)
{
size_t num = RDCMIN(128, rs.Subroutines[i].numSubroutines);
if(num == 0)
{
RDCEraseEl(stages[i]->Subroutines);
}
else
{
create_array_uninit(stages[i]->Subroutines, num);
memcpy(stages[i]->Subroutines.elems, rs.Subroutines[i].Values, num);
}
}
// GL is ass-backwards in its handling of texture units. When a shader is active
// the types in the glsl samplers inform which targets are used from which texture units
//
+3
View File
@@ -88,6 +88,9 @@ namespace renderdoc
public ShaderBindpointMapping BindpointMapping;
public ShaderStageType stage;
[CustomMarshalAs(CustomUnmanagedType.TemplatedArray)]
public UInt32[] Subroutines;
};
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
public ShaderStage m_VS, m_TCS, m_TES, m_GS, m_FS, m_CS;