diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 1289ec39991..06df8223413 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -1332,6 +1332,7 @@ llvmpipe_allocate_memory(struct pipe_screen *_screen, uint64_t size) mem->cpu_addr = MAP_FAILED; mem->fd = screen->fd_mem_alloc; + mem->type = LLVMPIPE_MEMORY_FD_TYPE_ANONYMOUS; mtx_lock(&screen->mem_mutex); @@ -1351,6 +1352,8 @@ llvmpipe_allocate_memory(struct pipe_screen *_screen, uint64_t size) mtx_unlock(&screen->mem_mutex); #else mem->cpu_addr = malloc(mem->size); + mem->fd = -1; + mem->type = LLVMPIPE_MEMORY_FD_TYPE_INVALID; #endif return (struct pipe_memory_allocation *)mem; diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h index e052863678c..e7f1f2be970 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.h +++ b/src/gallium/drivers/llvmpipe/lp_texture.h @@ -47,6 +47,8 @@ enum lp_texture_usage enum llvmpipe_memory_fd_type { + LLVMPIPE_MEMORY_FD_TYPE_INVALID, + LLVMPIPE_MEMORY_FD_TYPE_ANONYMOUS, LLVMPIPE_MEMORY_FD_TYPE_OPAQUE, LLVMPIPE_MEMORY_FD_TYPE_DMA_BUF, };