mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
Hack bmBufferData and bmBufferSubdata back into operation with an
implicit map/unmap.
This commit is contained in:
parent
4afd26982e
commit
59dd8ad752
1 changed files with 16 additions and 1 deletions
|
|
@ -766,7 +766,14 @@ void bmBufferData(struct bufmgr *bm,
|
|||
|
||||
if (data != NULL) {
|
||||
bmAllocMem(bm, buf, buf->flags | flags);
|
||||
#if 0
|
||||
memcpy(buf->block->virtual, data, size);
|
||||
#else
|
||||
/* Do an implicit map/unmap to get this working for now:
|
||||
*/
|
||||
memcpy(bmMapBuffer(bm, buf->id, flags), data, size);
|
||||
bmUnmapBuffer(bm, buf->id);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -788,8 +795,16 @@ void bmBufferSubData(struct bufmgr *bm,
|
|||
if (buf->block->mem_type != BM_MEM_LOCAL)
|
||||
bmFinishFence(bm, buf->block->fence);
|
||||
|
||||
if (size)
|
||||
if (size) {
|
||||
#if 0
|
||||
memcpy(buf->block->virtual + offset, data, size);
|
||||
#else
|
||||
/* Do an implicit map/unmap to get this working for now:
|
||||
*/
|
||||
memcpy(bmMapBuffer(bm, buf->id, 0) + offset, data, size);
|
||||
bmUnmapBuffer(bm, buf->id);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue