From ea2d25888abf44c6e9c28811ab11c14a59c0f24f Mon Sep 17 00:00:00 2001 From: Mark Janes Date: Tue, 30 May 2017 16:05:22 -0700 Subject: StateTrack: track glBindProgramPipeline --- retrace/daemon/glframe_state.cpp | 11 +++++++++++ retrace/daemon/glframe_state.hpp | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'retrace') diff --git a/retrace/daemon/glframe_state.cpp b/retrace/daemon/glframe_state.cpp index 3df2c6f1..0a057a97 100644 --- a/retrace/daemon/glframe_state.cpp +++ b/retrace/daemon/glframe_state.cpp @@ -77,6 +77,7 @@ StateTrack::TrackMap::TrackMap() { lookup["glGetUniformBlockIndex"] = &StateTrack::trackGetUniformBlockIndex; lookup["glUniformBlockBinding"] = &StateTrack::trackUniformBlockBinding; lookup["glBindFragDataLocation"] = &StateTrack::trackBindFragDataLocation; + lookup["glBindProgramPipeline"] = &StateTrack::trackBindProgramPipeline; } bool @@ -757,6 +758,16 @@ StateTrack::trackBindFragDataLocation(const trace::Call &call) { m_program_to_frag_data_location[program][name] = call_location; } +void +StateTrack::trackBindProgramPipeline(const trace::Call &call) { + int call_pipeline = call.args[0].value->toDouble(); + if (!call_pipeline) + current_pipeline = 0; + else + current_pipeline = getRetracedPipeline(call_pipeline); +} + + void StateTrack::onAssembly(ShaderType st, AssemblyType at, const std::string &assembly) { diff --git a/retrace/daemon/glframe_state.hpp b/retrace/daemon/glframe_state.hpp index 3684462a..2b2fe5b2 100644 --- a/retrace/daemon/glframe_state.hpp +++ b/retrace/daemon/glframe_state.hpp @@ -148,9 +148,10 @@ class StateTrack { void trackGetUniformBlockIndex(const trace::Call &); void trackUniformBlockBinding(const trace::Call &); void trackBindFragDataLocation(const trace::Call &); + void trackBindProgramPipeline(const trace::Call &); OutputPoller *m_poller; - int current_program; + int current_program, current_pipeline; std::map shader_to_source; std::map shader_to_type; std::map source_to_shader; -- cgit v1.2.3