fix: use Common Pipeline State API for cross-API compatibility in get_pipeline_state#4
Open
lou-gege wants to merge 1 commit intohalby24:mainfrom
Open
fix: use Common Pipeline State API for cross-API compatibility in get_pipeline_state#4lou-gege wants to merge 1 commit intohalby24:mainfrom
lou-gege wants to merge 1 commit intohalby24:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: get_pipeline_state returns incomplete data on OpenGL/Vulkan captures
Problem
get_pipeline_stateonly returnedevent_id,api, andshadersfieldson OpenGL/Vulkan captures. All other pipeline state (viewports, render targets,
depth target, input assembly) was silently lost.
Root cause: The code used D3D-specific methods (
GetViewportScissor(),GetOutputMerger(),GetIAState()) that don't exist in the Common PipelineState Abstraction. These calls threw exceptions on GL/VK, which were caught
by
except Exception: passand silently discarded.Solution
Replaced all D3D-specific API calls with RenderDoc's Common Pipeline State
Abstraction (
PipeState) methods that work across all graphics APIs:pipe.GetViewportScissor()pipe.GetViewport(index)pipe.GetOutputMerger().renderTargetspipe.GetOutputTargets()pipe.GetOutputMerger().depthTargetpipe.GetDepthTarget()pipe.GetIAState().topologypipe.GetPrimitiveTopology()except Exception: passexcept Exception as e: info["*_error"] = str(e)Changes
renderdoc_extension/services/pipeline_service.py(1 file, +41/-39)Testing
Verified on real captures via MCP IPC:
Before fix (OpenGL):
{"event_id": 204, "api": "GraphicsAPI.OpenGL"}— only 2 fieldsAfter fix (OpenGL): all 7 fields returned (
event_id,api,shaders,viewports,render_targets,depth_target,input_assembly)