Skip to content

igl | vulkan | Remove RenderPipelineDynamicState.renderPassIndex so that format-compatible render passes (same formats/samples, different load/store/layout) share one PSO. - #429

Open
vinsentli wants to merge 2 commits into
facebook:mainfrom
vinsentli:renderPassIndex

Conversation

@vinsentli

@vinsentli vinsentli commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Remove renderPassIndex so that format-compatible render passes(same formats/samples, different load/store/layout) share one PSO.
Per Vulkan spec:https://docs.vulkan.org/spec/latest/chapters/renderpass.html#renderpass-compatibility
Render pass compatibility only depends on format, samples,and flags -- NOT on loadOp/storeOp/initialLayout/finalLayout.
This is safe because desc_.targetDesc already pins the format expectations for this RenderPipelineState, so all render passes it encounters are compatible.

@meta-cla meta-cla Bot added the cla signed label Aug 10, 2026
Comment thread src/igl/vulkan/RenderPipelineState.cpp Outdated
// and flags -- NOT on loadOp/storeOp/initialLayout/finalLayout.
// This is safe because desc_.targetDesc already pins the format expectations
// for this RenderPipelineState, so all render passes it encounters are compatible.
cacheKey.renderPassIndex = 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be removed completely?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

# Conflicts:
#	src/igl/vulkan/RenderPipelineState.h
@vinsentli vinsentli changed the title igl | vulkan | Normalize renderPassIndex so that format-compatible render passes (same formats/samples, different load/store/layout) share one PSO. igl | vulkan | RenderPipelineDynamicState.renderPassIndex so that format-compatible render passes (same formats/samples, different load/store/layout) share one PSO. Aug 11, 2026
@vinsentli vinsentli changed the title igl | vulkan | RenderPipelineDynamicState.renderPassIndex so that format-compatible render passes (same formats/samples, different load/store/layout) share one PSO. igl | vulkan | Remove RenderPipelineDynamicState.renderPassIndex so that format-compatible render passes (same formats/samples, different load/store/layout) share one PSO. Aug 11, 2026

@corporateshark corporateshark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the whole change much more convoluted. Let's fall back to the original approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants