clover: Set appropriate flag defaults on memory object creation.
authorFrancisco Jerez <currojerez@riseup.net>
Sun, 22 Feb 2015 13:05:19 +0000 (15:05 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 24 Feb 2015 14:18:14 +0000 (16:18 +0200)
commitf8f3aa78d8846174d3b5a877b3c06ee7bdbb29c7
treef54e46ea9cb29be8d29500ac348ea27b5560a228
parent0e8460a52882ec58743991fec431f85300bea209
clover: Set appropriate flag defaults on memory object creation.

According to the spec when no device access mode is specified
clCreateBuffer and clCreateImage* should default to read/write, and
clCreateSubBuffer should default to the parent's device access flags.

clCreateSubBuffer is also required to inherit the host access and
host pointer flags from the parent.

Reviewed-and-tested-by: EdB <edb+mesa@sigluy.net>
src/gallium/state_trackers/clover/api/memory.cpp