mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 08:40:11 +01:00
pvr: Fix bo mapping on alloc with PVR_BO_ALLOC_FLAG_CPU_ACCESS.
If PVR_BO_ALLOC_FLAG_CPU_ACCESS was specified when calling pvr_bo_alloc() the new bo was also being cpu mapped while this was not the intention as the PVR_BO_ALLOC_FLAG_CPU_MAPPED is meant to be used for that purpose. Fixed in this commit. Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17984>
This commit is contained in:
parent
4e9cce39d3
commit
04d192fccb
2 changed files with 2 additions and 3 deletions
|
|
@ -37,7 +37,7 @@ static uint32_t pvr_bo_alloc_to_winsys_flags(uint64_t flags)
|
|||
{
|
||||
uint32_t ws_flags = 0;
|
||||
|
||||
if (flags & PVR_BO_ALLOC_FLAG_CPU_ACCESS)
|
||||
if (flags & (PVR_BO_ALLOC_FLAG_CPU_ACCESS | PVR_BO_ALLOC_FLAG_CPU_MAPPED))
|
||||
ws_flags |= PVR_WINSYS_BO_FLAG_CPU_ACCESS;
|
||||
|
||||
if (flags & PVR_BO_ALLOC_FLAG_GPU_UNCACHED)
|
||||
|
|
|
|||
|
|
@ -59,8 +59,7 @@ struct pvr_bo {
|
|||
* \brief Flag passed to #pvr_bo_alloc() to indicate that the buffer should
|
||||
* be mapped to the CPU. Implies #PVR_BO_ALLOC_FLAG_CPU_ACCESS.
|
||||
*/
|
||||
#define PVR_BO_ALLOC_FLAG_CPU_MAPPED \
|
||||
(BITFIELD_BIT(1U) | PVR_BO_ALLOC_FLAG_CPU_ACCESS)
|
||||
#define PVR_BO_ALLOC_FLAG_CPU_MAPPED BITFIELD_BIT(1U)
|
||||
/**
|
||||
* \brief Flag passed to #pvr_bo_alloc() to indicate that the buffer should be
|
||||
* mapped to the GPU as uncached.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue