mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
rusticl/mesa/context: fix clear_sampler_views
Even though drivers are required by documentation to handle the samplers being NULL, st/mesa changed enough so it always sets the pointer. As being similiar to st/mesa is more important than following docs, we simply mimic st/mesa here and meet the expectations of drivers. In the future we want to track the set state similiar to st/mesa, so `clear_sampler_views` will probably go away and we'll just update what we'll need. Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25363>
This commit is contained in:
parent
25c771a778
commit
5b233d5184
1 changed files with 2 additions and 1 deletions
|
|
@ -479,6 +479,7 @@ impl PipeContext {
|
|||
}
|
||||
|
||||
pub fn clear_sampler_views(&self, count: u32) {
|
||||
let mut samplers = vec![ptr::null_mut(); count as usize];
|
||||
unsafe {
|
||||
self.pipe.as_ref().set_sampler_views.unwrap()(
|
||||
self.pipe.as_ptr(),
|
||||
|
|
@ -487,7 +488,7 @@ impl PipeContext {
|
|||
count,
|
||||
0,
|
||||
false,
|
||||
ptr::null_mut(),
|
||||
samplers.as_mut_ptr(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue