mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-14 18:46:48 +00:00
Add list of shader subroutine values
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
//
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user