Skip to content

Fix remote pipeline shader reflection retrieval - #2

Open
samtou-arm wants to merge 1 commit into
v1.xfrom
feat/RENDERDOC-716/fix_shader_source_2
Open

Fix remote pipeline shader reflection retrieval#2
samtou-arm wants to merge 1 commit into
v1.xfrom
feat/RENDERDOC-716/fix_shader_source_2

Conversation

@samtou-arm

Copy link
Copy Markdown
Owner

Serialise remote ShaderReflection pointers as opaque uint64 values and resolve them through a proxy-local RPC. Cache the resulting reflections by pointer value, avoiding reconstruction of backend-specific GetShader parameters and correctly handling shader replacements across APIs.

This PR aims to address the maintainer's comment on this upstream PR: baldurk#3879

Basically, my understanding of the approach is:

  • Whenever we save the Pipeline State, just before serialising, we add the pointer value in an array (as a uint64_t).
  • We create a duplicate map keyed by that value that we will use for cache purposes.
  • When it comes to retrieve the shader, we query that new reflection cache and if we don't find the value that we stored in our vector of shader stages, we go and query the remote to serialise the entire reflection shader to create a local copy on the host, stored in the reflection cache.

Point of attention:

  • Not 100% sure of the transfer to the DummyDriver and the Clearing in the destructor
  • Not sure about the D3D11 special case handling for the input assembly stage

It's all tested on Windows + Linux (D3D11, D3D12, Vulkan and OpenGL) in both ways (Windows remote server then Linux remote server).

Serialize remote ShaderReflection pointers as opaque uint64 values and
resolve them through a proxy-local RPC. Cache the resulting reflections
by pointer value, avoiding reconstruction of backend-specific GetShader
parameters and correctly handling shader replacements across APIs.
@samtou-arm
samtou-arm changed the base branch from v1.x to feat/RENDERDOC-716/fix_shader_source August 7, 2026 15:34
@samtou-arm
samtou-arm changed the base branch from feat/RENDERDOC-716/fix_shader_source to v1.x August 7, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant