[Mesa-dev] [PATCH 1/4] i965: Add a "write" parameter to intel_bufferobj_buffer.
Kenneth Graunke
kenneth at whitecape.org
Tue Jun 13 18:06:24 UTC 2017
On Tuesday, June 13, 2017 4:45:18 AM PDT Chris Wilson wrote:
> Quoting Kenneth Graunke (2017-06-13 01:33:29)
> > This doesn't do anything yet, but soon we'll want to know whether an
> > access to a buffer section may write that data, or simply reads it.
>
> This series doesn't got further than boolean, but would it be worth
> feeding through map flags? The immediate advantage is that MAP_READ /
> MAP_WRITE is clearer than a bool at the end.
> -Chris
Yeah, I was tempted to use the MAP_READ/MAP_WRITE enum for clarity.
I wasn't sure if the other other MAP_* bits made any sense here, though.
I also wasn't sure whether to allow MAP_READ | MAP_WRITE, or require only
one flag to be set (MAP_WRITE -> true, MAP_READ -> false, others -> assert?).
I suppose I could add an assert that only MAP_READ or MAP_WRITE are set.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170613/6d24ee7f/attachment.sig>
More information about the mesa-dev
mailing list