clover: Add support for CL_MAP_WRITE_INVALIDATE_REGION
authorBruno Jiménez <brunojimen@gmail.com>
Thu, 7 Aug 2014 14:34:53 +0000 (16:34 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 8 Aug 2014 15:06:14 +0000 (18:06 +0300)
commitec73778f1fd6e14623422d62605fc69dc8fb7aa4
tree72b3c00bc98623e7088ea9a68478be28f031e3a1
parent8d853468bd8c75b8e15c572d85ae403ab4ec4086
clover: Add support for CL_MAP_WRITE_INVALIDATE_REGION

OpenCL 1.2 CL_MAP_WRITE_INVALIDATE_REGION sounds a lot like
PIPE_TRANSFER_DISCARD_RANGE:

From OpenCL 1.2 spec:
    The contents of the region being mapped are to be discarded.

From p_defines.h:
    Discards the memory within the mapped region.

v2: Move the code for validating flags to the front-end as
    suggested by Francisco Jerez

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/state_trackers/clover/api/transfer.cpp
src/gallium/state_trackers/clover/core/resource.cpp