diff options
author | Jason Ekstrand <[email protected]> | 2017-02-20 11:04:12 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-02-21 12:26:35 -0800 |
commit | f31ed6d0cd3c6b66304bb060a0c204ecf8621e6a (patch) | |
tree | 14a3f2ba7984256b209405d0a43993795b62358e /src/intel/vulkan/anv_private.h | |
parent | f408971deb7821cc140f1d373a104c2e1cb24eeb (diff) |
anv: Take a device parameter in anv_state_flush
This allows the helper to check for llc instead of having to do it
manually at all the call sites.
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r-- | src/intel/vulkan/anv_private.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 7bf340b4339..2527c2cc5a2 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -461,12 +461,6 @@ anv_invalidate_range(void *start, size_t size) __builtin_ia32_mfence(); } -static void inline -anv_state_flush(struct anv_state state) -{ - anv_flush_range(state.map, state.alloc_size); -} - VkResult anv_block_pool_init(struct anv_block_pool *pool, struct anv_device *device, uint32_t block_size); void anv_block_pool_finish(struct anv_block_pool *pool); @@ -630,6 +624,15 @@ struct anv_device { pthread_cond_t queue_submit; }; +static void inline +anv_state_flush(struct anv_device *device, struct anv_state state) +{ + if (device->info.has_llc) + return; + + anv_flush_range(state.map, state.alloc_size); +} + void anv_device_init_blorp(struct anv_device *device); void anv_device_finish_blorp(struct anv_device *device); |