Re: [Mesa-dev] [PATCH 1/2] anv/entrypoints: dispatches to VkQueue are device-level

2018-03-13 Thread Iago Toral
I was surprised that missing that didn't cause any trouble. It seems
that the way the trampoline code was setup would still generate
trampoline functions, but interpreting the dispatch object as a command
buffer, and both anv_queue and anv_cmd_buffer have their device pointer
field at exactly the same offset, so we were getting lucky. I modified
the generator to inject assertions for unhandled trampoline cases to
better protect against this in the future.
On Mon, 2018-03-12 at 07:37 -0700, Jason Ekstrand wrote:
> You need to also add support for VkQueue for trampoline functions.
> 
> On Mon, Mar 12, 2018 at 1:40 AM, Iago Toral Quiroga  m> wrote:
> > ---
> > 
> >  src/intel/vulkan/anv_entrypoints_gen.py | 2 +-
> > 
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > 
> > 
> > diff --git a/src/intel/vulkan/anv_entrypoints_gen.py
> > b/src/intel/vulkan/anv_entrypoints_gen.py
> > 
> > index 485c6cfe8d..27f1aa 100644
> > 
> > --- a/src/intel/vulkan/anv_entrypoints_gen.py
> > 
> > +++ b/src/intel/vulkan/anv_entrypoints_gen.py
> > 
> > @@ -423,7 +423,7 @@ class Entrypoint(EntrypointBase):
> > 
> >  self.guard = guard
> > 
> > 
> > 
> >  def is_device_entrypoint(self):
> > 
> > -return self.params[0].type in ('VkDevice',
> > 'VkCommandBuffer')
> > 
> > +return self.params[0].type in ('VkDevice',
> > 'VkCommandBuffer', 'VkQueue')
> > 
> > 
> > 
> >  def prefixed_name(self, prefix):
> > 
> >  assert self.name.startswith('vk')
> > 
> > --
> > 
> > 2.14.1
> > 
> > 
> > ___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/2] anv/entrypoints: dispatches to VkQueue are device-level

2018-03-12 Thread Jason Ekstrand
You need to also add support for VkQueue for trampoline functions.

On Mon, Mar 12, 2018 at 1:40 AM, Iago Toral Quiroga 
wrote:

> ---
>  src/intel/vulkan/anv_entrypoints_gen.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/anv_entrypoints_gen.py
> b/src/intel/vulkan/anv_entrypoints_gen.py
> index 485c6cfe8d..27f1aa 100644
> --- a/src/intel/vulkan/anv_entrypoints_gen.py
> +++ b/src/intel/vulkan/anv_entrypoints_gen.py
> @@ -423,7 +423,7 @@ class Entrypoint(EntrypointBase):
>  self.guard = guard
>
>  def is_device_entrypoint(self):
> -return self.params[0].type in ('VkDevice', 'VkCommandBuffer')
> +return self.params[0].type in ('VkDevice', 'VkCommandBuffer',
> 'VkQueue')
>
>  def prefixed_name(self, prefix):
>  assert self.name.startswith('vk')
> --
> 2.14.1
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev