Fix of tiling checking after figuring out upstream had a typo

See-mesa: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31974
master
itycodes 2 months ago
parent ce809d4620
commit 7d74a45bd9

@ -203,13 +203,13 @@ pub enum GemIoctlError {
pub fn gem_has_tiling(fd: RawFd, handle: DrmGemHandle) -> Result<bool, GemIoctlError> {
unsafe {
let mut tiling = native::drm_i915_gem_set_tiling {
let mut tiling = native::drm_i915_gem_get_tiling {
handle: handle.handle,
tiling_mode: 0,
stride: 0,
swizzle_mode: 0,
phys_swizzle_mode: 0,
};
let res = libc::ioctl(fd, native::DRM_IOCTL_I915_GEM_SET_TILING, &mut tiling);
let res = libc::ioctl(fd, native::DRM_IOCTL_I915_GEM_GET_TILING, &mut tiling);
match -res {
0 => Ok(true),
libc::ENOENT => Err(GemIoctlError::InvalidHandle),

Loading…
Cancel
Save