[Mesa-dev] [PATCH 28/39] st/nine: Fix buffer bind flags
Ilia Mirkin
imirkin at alum.mit.edu
Mon May 16 05:25:42 UTC 2016
On May 15, 2016 6:46 AM, "Axel Davy" <axel.davy at ens.fr> wrote:
>
> Signed-off-by: Axel Davy <axel.davy at ens.fr>
> ---
> src/gallium/state_trackers/nine/buffer9.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/state_trackers/nine/buffer9.c
b/src/gallium/state_trackers/nine/buffer9.c
> index ed0c4f1..f6bad6a 100644
> --- a/src/gallium/state_trackers/nine/buffer9.c
> +++ b/src/gallium/state_trackers/nine/buffer9.c
> @@ -65,9 +65,9 @@ NineBuffer9_ctor( struct NineBuffer9 *This,
> info->width0 = Size;
> info->flags = 0;
>
> - info->bind = PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_TRANSFER_WRITE;
> - if (!(Usage & D3DUSAGE_WRITEONLY))
> - info->bind |= PIPE_BIND_TRANSFER_READ;
> + /* Note: WRITEONLY is just tip for resource placement, the resource
> + * can still be read (but slower). */
> + info->bind = PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_TRANSFER_READ |
PIPE_BIND_TRANSFER_READ;
I assume that one of those should have been WRITE?
Separately, I don't think transfer flags do anything at resource creation
time. Only at transfer map time...
Resource placement is determined by the usage.
>
> info->usage = PIPE_USAGE_DEFAULT;
> if (Usage & D3DUSAGE_DYNAMIC)
> --
> 2.8.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160516/f477c325/attachment-0001.html>
More information about the mesa-dev
mailing list