mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
panvk: Rework the NULL test in panvk_buffer_{gpu_ptr,range}()
We are about to allow buffer memory allocation from the cmd_buffer
memory pool. In order to allow that, we need to tweak the NULL checks
done in panvk_buffer_{gpu_ptr,range}() to use the device address
instead of the bo field.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
This commit is contained in:
parent
1b16f9ec05
commit
495b718b3f
1 changed files with 2 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ VK_DEFINE_NONDISP_HANDLE_CASTS(panvk_buffer, vk.base, VkBuffer,
|
|||
static inline uint64_t
|
||||
panvk_buffer_gpu_ptr(const struct panvk_buffer *buffer, uint64_t offset)
|
||||
{
|
||||
if (buffer->bo == NULL)
|
||||
if (!buffer->dev_addr)
|
||||
return 0;
|
||||
|
||||
return buffer->dev_addr + offset;
|
||||
|
|
@ -48,7 +48,7 @@ static inline uint64_t
|
|||
panvk_buffer_range(const struct panvk_buffer *buffer, uint64_t offset,
|
||||
uint64_t range)
|
||||
{
|
||||
if (buffer->bo == NULL)
|
||||
if (!buffer->dev_addr)
|
||||
return 0;
|
||||
|
||||
return vk_buffer_range(&buffer->vk, offset, range);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue