nil: Multiply by array_stride_B instead of adding
Fixes: 5577128c83 ("nil: Rewrite the TIC code in Rust")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34495>
This commit is contained in:
committed by
Marge Bot
parent
5c81b3546f
commit
fadac25b0c
@@ -274,8 +274,7 @@ fn nv9097_fill_tic(
|
||||
|
||||
// There's no base layer field in the texture header
|
||||
let layer_address = base_address
|
||||
+ u64::from(view.base_array_layer)
|
||||
+ u64::from(image.array_stride_B);
|
||||
+ u64::from(view.base_array_layer) * u64::from(image.array_stride_B);
|
||||
|
||||
th.set_field(cl9097::TEXHEADV2_OFFSET_LOWER, layer_address as u32);
|
||||
th.set_field(cl9097::TEXHEADV2_OFFSET_UPPER, (layer_address >> 32) as u32);
|
||||
|
||||
Reference in New Issue
Block a user