On 16/05/2016 07:25, Ilia Mirkin wrote:
On May 15, 2016 6:46 AM, "Axel Davy" <axel.d...@ens.fr
<mailto:axel.d...@ens.fr>> wrote:
>
> Signed-off-by: Axel Davy <axel.d...@ens.fr <mailto:axel.d...@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?
Yep, good catch
Separately, I don't think transfer flags do anything at resource
creation time. Only at transfer map time...
Indeed, I think for now the transfer bind flags aren't used particularly
by drivers, however the bind transfer flags do exist (and are different
than the map transfer flags), and I think we can say it is incorrect not
to specify them in our case.
Axel
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@lists.freedesktop.org <mailto:mesa-dev@lists.freedesktop.org>
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev