This seems very much over-the-top. It would be better to either find the specific bug or else just allocate the BOs we use for states as snooped. See also the anv_gem_set_caching call in genX_query.c.
On Fri, Dec 7, 2018 at 6:06 PM Rafael Antognolli < rafael.antogno...@intel.com> wrote: > TODO: This is just flushing the entire dynamic states on every execbuf. > Maybe it's too much. However, in theory we should be already flushing > the states as needed, but I think we didn't hit any bug due to the > coherence implied by userptr. > --- > src/intel/vulkan/anv_batch_chain.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/src/intel/vulkan/anv_batch_chain.c > b/src/intel/vulkan/anv_batch_chain.c > index 65df28ccb91..99009679435 100644 > --- a/src/intel/vulkan/anv_batch_chain.c > +++ b/src/intel/vulkan/anv_batch_chain.c > @@ -1366,6 +1366,10 @@ anv_reloc_list_add_dep(struct anv_cmd_buffer > *cmd_buffer, > > anv_block_pool_foreach_bo(bo_list, iter, bo) { > _mesa_set_add(relocs->deps, bo); > + if (!cmd_buffer->device->info.has_llc) { > + for (uint32_t i = 0; i < bo->size; i += CACHELINE_SIZE) > + __builtin_ia32_clflush(bo->map + i); > + } > } > } > > -- > 2.17.1 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev