rusticl/image: properly sync mappings content for 1Dbuffer images

This fixes clFillImage 1Dbuffer use_pitches CL CTS tests.

Fixes: 7b22bc617b ("rusticl/memory: complete rework on how mapping is implemented")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30528>
(cherry picked from commit 012323a1d1)
This commit is contained in:
Karol Herbst 2024-08-06 11:06:16 +02:00 committed by Eric Engestrom
parent 2fef79767f
commit 0f15e9ec10
2 changed files with 4 additions and 2 deletions

View file

@ -3624,7 +3624,7 @@
"description": "rusticl/image: properly sync mappings content for 1Dbuffer images",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "7b22bc617bf2db4120a438c1ad5e45992f638d82",
"notes": null

View file

@ -706,7 +706,9 @@ impl MemBase {
fn is_pure_user_memory(&self, d: &Device) -> CLResult<bool> {
let r = self.get_res_of_dev(d)?;
Ok(r.is_user)
// 1Dbuffer objects are weird. The parent memory object can be a host_ptr thing, but we are
// not allowed to actually return a pointer based on the host_ptr when mapping.
Ok(r.is_user && !self.host_ptr().is_null())
}
fn map<T>(