diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.c b/src/gallium/drivers/nouveau/nouveau_buffer.c index 02bc6f0..5aa1930 100644 --- a/src/gallium/drivers/nouveau/nouveau_buffer.c +++ b/src/gallium/drivers/nouveau/nouveau_buffer.c @@ -311,13 +311,18 @@ nouveau_buffer_cache(struct nouveau_context *nv, struct nv04_resource *buf) #define NOUVEAU_TRANSFER_DISCARD \ + (PIPE_TRANSFER_DISCARD_RANGE) +#if 0 (PIPE_TRANSFER_DISCARD_RANGE | PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE) +#endif static INLINE boolean nouveau_buffer_should_discard(struct nv04_resource *buf, unsigned usage) { +#if 0 if (!(usage & PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE)) return FALSE; +#endif if (unlikely(buf->base.bind & PIPE_BIND_SHARED)) return FALSE; return buf->mm && nouveau_buffer_busy(buf, PIPE_TRANSFER_WRITE); @@ -348,8 +353,10 @@ nouveau_buffer_transfer_map(struct pipe_context *pipe, if (buf->domain == NOUVEAU_BO_VRAM) { if (usage & NOUVEAU_TRANSFER_DISCARD) { +#if 0 if (usage & PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE) buf->status &= NOUVEAU_BUFFER_STATUS_REALLOC_MASK; +#endif nouveau_transfer_staging(nv, tx, TRUE); } else { if (buf->status & NOUVEAU_BUFFER_STATUS_GPU_WRITING) { @@ -393,11 +400,13 @@ nouveau_buffer_transfer_map(struct pipe_context *pipe, return map; if (nouveau_buffer_busy(buf, usage & PIPE_TRANSFER_READ_WRITE)) { +#if 0 if (unlikely(usage & PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE)) { /* Discarding was not possible, must sync because * subsequent transfers might use UNSYNCHRONIZED. */ nouveau_buffer_sync(buf, usage & PIPE_TRANSFER_READ_WRITE); } else +#endif if (usage & PIPE_TRANSFER_DISCARD_RANGE) { nouveau_transfer_staging(nv, tx, TRUE); map = tx->map;