mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 10:50:10 +01:00
rusticl/mem: only write pitch when required
Signed-off-by: Karol Herbst <kherbst@redhat.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439>
This commit is contained in:
parent
de292ee3b8
commit
af4c897e32
1 changed files with 6 additions and 2 deletions
|
|
@ -880,8 +880,12 @@ impl Mem {
|
|||
} else {
|
||||
let tx = self.map(q, ctx, &mut lock)?;
|
||||
|
||||
*row_pitch = tx.row_pitch() as usize;
|
||||
*slice_pitch = tx.slice_pitch() as usize;
|
||||
if self.image_desc.dims() > 1 {
|
||||
*row_pitch = tx.row_pitch() as usize;
|
||||
}
|
||||
if self.image_desc.dims() > 2 || self.image_desc.is_array() {
|
||||
*slice_pitch = tx.slice_pitch() as usize;
|
||||
}
|
||||
|
||||
tx.ptr()
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue