diff options
author | Matt Turner <[email protected]> | 2013-11-04 12:02:24 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2013-11-07 13:18:03 -0800 |
commit | 6f2e81ce4cc4a03d22e2670191651bfa9bdb0d0c (patch) | |
tree | 521f07cbb0e8d579b5e8c031b844f5ab1b9a3620 /src/mesa/main/streaming-load-memcpy.h | |
parent | d41084a63d3071d1ca3327175d94314fccb82792 (diff) |
mesa: Add a streaming load memcpy implementation.
Uses SSE 4.1's MOVNTDQA instruction (streaming load) to read from
uncached memory without polluting the cache.
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/main/streaming-load-memcpy.h')
-rw-r--r-- | src/mesa/main/streaming-load-memcpy.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/mesa/main/streaming-load-memcpy.h b/src/mesa/main/streaming-load-memcpy.h new file mode 100644 index 00000000000..41eeeeca0f1 --- /dev/null +++ b/src/mesa/main/streaming-load-memcpy.h @@ -0,0 +1,33 @@ +/* + * Copyright © 2013 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Eric Anholt <[email protected]> + * Matt Turner <[email protected]> + * + */ + +/* Copies memory from src to dst, using SSE 4.1's MOVNTDQA to get streaming + * read performance from uncached memory. + */ +void +_mesa_streaming_load_memcpy(void *restrict dst, void *restrict src, size_t len); |