mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Create map for pipeline objects to store child programs
This commit is contained in:
@@ -188,9 +188,25 @@ class WrappedOpenGL
|
||||
GLuint colOutProg;
|
||||
bool linked;
|
||||
};
|
||||
|
||||
struct PipelineData
|
||||
{
|
||||
PipelineData() {}
|
||||
|
||||
struct ProgramUse
|
||||
{
|
||||
ProgramUse(ResourceId id_, GLbitfield use_) : id(id_), use(use_) {}
|
||||
|
||||
ResourceId id;
|
||||
GLbitfield use;
|
||||
};
|
||||
|
||||
vector<ProgramUse> programs;
|
||||
};
|
||||
|
||||
map<ResourceId, ShaderData> m_Shaders;
|
||||
map<ResourceId, ProgramData> m_Programs;
|
||||
map<ResourceId, PipelineData> m_Pipelines;
|
||||
|
||||
GLuint m_FakeBB_FBO;
|
||||
GLuint m_FakeBB_Color;
|
||||
|
||||
@@ -551,8 +551,13 @@ bool WrappedOpenGL::Serialise_glUseProgramStages(GLuint pipeline, GLbitfield sta
|
||||
|
||||
if(m_State < WRITING)
|
||||
{
|
||||
ResourceId livePipeId = GetResourceManager()->GetLiveID(pipe);
|
||||
ResourceId liveProgId = GetResourceManager()->GetLiveID(prog);
|
||||
|
||||
m_Pipelines[livePipeId].programs.push_back(PipelineData::ProgramUse(liveProgId, Stages));
|
||||
|
||||
m_Real.glUseProgramStages(GetResourceManager()->GetLiveResource(pipe).name,
|
||||
stages,
|
||||
Stages,
|
||||
GetResourceManager()->GetLiveResource(prog).name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user