gallium/radeon: never use staging buffers with AMD_pinned_memory
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
This commit is contained in:
parent
4f7e3fbb50
commit
b52721e3b6
|
@ -332,6 +332,20 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
|
|||
|
||||
assert(box->x + box->width <= resource->width0);
|
||||
|
||||
/* From GL_AMD_pinned_memory issues:
|
||||
*
|
||||
* 4) Is glMapBuffer on a shared buffer guaranteed to return the
|
||||
* same system address which was specified at creation time?
|
||||
*
|
||||
* RESOLVED: NO. The GL implementation might return a different
|
||||
* virtual mapping of that memory, although the same physical
|
||||
* page will be used.
|
||||
*
|
||||
* So don't ever use staging buffers.
|
||||
*/
|
||||
if (rscreen->ws->buffer_is_user_ptr(rbuffer->buf))
|
||||
usage |= PIPE_TRANSFER_PERSISTENT;
|
||||
|
||||
/* See if the buffer range being mapped has never been initialized,
|
||||
* in which case it can be mapped unsynchronized. */
|
||||
if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED) &&
|
||||
|
|
Loading…
Reference in New Issue