Access qualifiers not enforced Everything seems read+write

I’ve modified sources of several SDK examples and made output buffers read only and input buffers write only. Everything works fine.

This is also true for Images. And, curiously, for the AMD implementation as well (at least for the CPU, don’t have an AMD GPU). Every memory object behaves as if it was read+write regardless of flags passed at clCreate{Buffer/Image2D/Image3D}.

The specs say that reading from a write buffer or writing to a read buffer is “undefined”. I guess it translates to “silently ignored”. Ignoring access qualifiers completely is, by the way, entirely consistent with the specification as it reads now :)

Just a heads up that this isn’t checked at runtime in these two implementations. The only thing that has to be checked (and is, in both implementations) is that you can’t modify const attributes from kernel code. This is checked at kernel compile time.