diff options
author | Marek Olšák <marek.olsak@amd.com> | 2020-11-29 04:09:02 -0500 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2020-12-05 10:52:17 -0500 |
commit | 3bd9db5be3c0e28443098dd0108e01a73c2b83e2 (patch) | |
tree | 535d4497b6739f707089c5ea20c719ebd46c8f39 /src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | |
parent | 40a7f6d0477c06cf7eef0cee253cc3de300236d5 (diff) |
r300,r600,radeonsi: inline struct radeon_cmdbuf to remove dereferences
It's straightforward except that the amdgpu winsys had to be cleaned up
to allow this.
radeon_cmdbuf is inlined and optionally the winsys can save the pointer
to it. radeon_cmdbuf::priv points to the winsys cs structure.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7907>
Diffstat (limited to 'src/gallium/winsys/amdgpu/drm/amdgpu_bo.c')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c index 46e560a6dca..90c598316f0 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c @@ -276,7 +276,7 @@ void *amdgpu_bo_map(struct pb_buffer *buf, { struct amdgpu_winsys_bo *bo = (struct amdgpu_winsys_bo*)buf; struct amdgpu_winsys_bo *real; - struct amdgpu_cs *cs = (struct amdgpu_cs*)rcs; + struct amdgpu_cs *cs = rcs ? amdgpu_cs(rcs) : NULL; assert(!(bo->base.usage & RADEON_FLAG_SPARSE)); |