Skip to content

lvp/venus: properly ignore sampler write for immutable sampler

Yiwei Zhang requested to merge zzyiwei/mesa:lvp-fix-immutable-sampler-push into main

The lavapipe issue is hidden due to a overly relaxed cts: dEQP-VK.binding_model.shader_access.primary_cmd_buf.with_push* that doesn't scrub the sampler from descriptor writes for immutable samplers. The issue is exposed via venus-lavapipe ci because venus must ignore the potentially garbled sampler. This change aligns the VK_DESCRIPTOR_TYPE_SAMPLER path with the VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER path by removing a false check against the provided sampler from push since the sampler can be null. An alternative is to also check against !binding->immutable_samplers there.

The venus issue was found while debugging venus-lavapipe ci failure. It's a real bug though no tests have caught this yet, but fixing this would regress venus-lavapipe non-templated push tests if without the dependent lvp fix. The sampler in the descriptor write can be garbled if the binding has immutable samplers.

Test: venus-lavapipe with venus push descriptor support

cc: mesa-stable

Signed-off-by: Yiwei Zhang

/cc @zmike @anholt @ryanneph

Edited by Yiwei Zhang

Merge request reports