summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorKarol Herbst <kherbst@redhat.com>2024-08-06 11:06:16 +0200
committerEric Engestrom <eric@engestrom.ch>2024-08-14 11:50:06 +0200
commit7880933b159cfef9e67dbf977bb574acdd24d9f2 (patch)
treeaa4b4dc46395026d168d7c95ec096683818703ec /src/gallium
parent34ad0f8bd707024cd9c478e9e3a73b29931e0385 (diff)
rusticl/image: properly sync mappings content for 1Dbuffer images
This fixes clFillImage 1Dbuffer use_pitches CL CTS tests. Fixes: 7b22bc617bf ("rusticl/memory: complete rework on how mapping is implemented") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30528> (cherry picked from commit 012323a1d196b89cdc289270a16b3f3d0df49379)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/frontends/rusticl/core/memory.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/frontends/rusticl/core/memory.rs b/src/gallium/frontends/rusticl/core/memory.rs
index 5c394a23f1d..2720ee8519c 100644
--- a/src/gallium/frontends/rusticl/core/memory.rs
+++ b/src/gallium/frontends/rusticl/core/memory.rs
@@ -721,7 +721,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>(