Skip to content

vrend: fix shadow_samp_*_locs index incrementing

Ryan Neph requested to merge ryanneph/virglrenderer:samplers-indexing-fix into master

Commit 603699f1 ("vrend: Cleanup and fix bug in next_sampler_id tracking") fixed a rendering issue in Factorio but inadvertently changed the indexing behavior for shadow samplers in some related code cleaning.

shadow_samp_*_locs arrays are currently indexed according to the bit position of a sampler in samplers_used_mask and shadow_samp_mask, so sampler_index must be incremented for each sampler, not just for each shadow sampler.

Fixes: 603699f1 ("vrend: Cleanup and fix bug in next_sampler_id tracking")

Signed-off-by: Ryan Neph ryanneph@google.com

Merge request reports