Skip to content

virgl: use PIPE_MAX_SAMPLERS in bind_samplers_states

Ryan Neph requested to merge ryanneph/mesa:rn-max-samplers into main

Virgl has been incorrectly using PIPE_MAX_SHADER_SAMPLER_VIEWS in its encode proc, although its caller ensures that the passed num_samplers is within PIPE_MAX_SAMPLERS and host vrend decode also correctly validates that the bound range of samplers ids is within [0, PIPE_MAX_SAMPLERS).

Fix it in the guest driver for clarity.

virgl: use PIPE_MAX_SAMPLERS in bind_samplers_states

Fix incorrect use of PIPE_MAX_SHADER_SAMPLER_VIEWS in
virgl_bind_samplers_states.

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

Merge request reports