Re: [Mesa-dev] [PATCH 2/2] radv: ignore inline uniform blocks in radv_CmdPushDescriptorSetKHR()

2019-06-11 Thread Samuel Pitoiset


On 6/11/19 12:19 PM, Samuel Iglesias Gonsálvez wrote:

On 6/11/19 12:05 PM, Józef Kucia wrote:

On Tue, Jun 11, 2019 at 11:57 AM Samuel Iglesias Gonsálvez
 wrote:

According to the Vulkan spec, uniform blocks are not allowed to be
updated through vkCmdPushDescriptorSetKHR().

There are these spec quotes from "13.2.1. Descriptor Set Layout"
that are relevant for this case:

"VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR specifies
  that descriptor sets must not be allocated using this layout, and
  descriptors are instead pushed by vkCmdPushDescriptorSetKHR."

"If flags contains
  VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then all
  elements of pBindings must not have a descriptorType of
  VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT".

There is no explicit mention in vkCmdPushDescriptorSetKHR() to forbid
this case but it is implied in the creation of the descriptor set
layout as aforementioned.

Signed-off-by: Samuel Iglesias Gonsálvez 
---

My only doubt is I did well in the case of
radv_meta_push_descriptor_set(), let me know if you prefer to change
it to false.


Perhaps I'm missing something, but what is the point to add the
additional checks for invalid usage? A correct program must not use
inline uniform blocks with push descriptors.


Right, it should be detected by the Validation Layers. However it is
arguable what to do in the driver's side. We can just keep it as it is
now, ignore inline uniform block updates (this patch) or even add an
assert if it affects stability of the HW (it is not the case here, we
tested it). I think ignoring the updates it's the best option, but I am
OK with what RADV developers prefer to do.

Adding an assertion looks better to me as well.


Sam



___
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

Re: [Mesa-dev] [PATCH 2/2] radv: ignore inline uniform blocks in radv_CmdPushDescriptorSetKHR()

2019-06-11 Thread Józef Kucia
On Tue, Jun 11, 2019 at 12:19 PM Samuel Iglesias Gonsálvez
 wrote:
> Right, it should be detected by the Validation Layers. However it is
> arguable what to do in the driver's side. We can just keep it as it is
> now, ignore inline uniform block updates (this patch) or even add an
> assert if it affects stability of the HW (it is not the case here, we
> tested it). I think ignoring the updates it's the best option, but I am
> OK with what RADV developers prefer to do.

IMHO the code should be left as it is. An assert could be a good
addition, but an additional bool parameter only for handling invalid
usage doesn't seem right.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/2] radv: ignore inline uniform blocks in radv_CmdPushDescriptorSetKHR()

2019-06-11 Thread Samuel Iglesias Gonsálvez
On 6/11/19 12:05 PM, Józef Kucia wrote:
> On Tue, Jun 11, 2019 at 11:57 AM Samuel Iglesias Gonsálvez
>  wrote:
>> According to the Vulkan spec, uniform blocks are not allowed to be
>> updated through vkCmdPushDescriptorSetKHR().
>>
>> There are these spec quotes from "13.2.1. Descriptor Set Layout"
>> that are relevant for this case:
>>
>> "VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR specifies
>>  that descriptor sets must not be allocated using this layout, and
>>  descriptors are instead pushed by vkCmdPushDescriptorSetKHR."
>>
>> "If flags contains
>>  VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then all
>>  elements of pBindings must not have a descriptorType of
>>  VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT".
>>
>> There is no explicit mention in vkCmdPushDescriptorSetKHR() to forbid
>> this case but it is implied in the creation of the descriptor set
>> layout as aforementioned.
>>
>> Signed-off-by: Samuel Iglesias Gonsálvez 
>> ---
>>
>> My only doubt is I did well in the case of
>> radv_meta_push_descriptor_set(), let me know if you prefer to change
>> it to false.
>>
> Perhaps I'm missing something, but what is the point to add the
> additional checks for invalid usage? A correct program must not use
> inline uniform blocks with push descriptors.
>
Right, it should be detected by the Validation Layers. However it is
arguable what to do in the driver's side. We can just keep it as it is
now, ignore inline uniform block updates (this patch) or even add an
assert if it affects stability of the HW (it is not the case here, we
tested it). I think ignoring the updates it's the best option, but I am
OK with what RADV developers prefer to do.

Sam




signature.asc
Description: OpenPGP digital signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/2] radv: ignore inline uniform blocks in radv_CmdPushDescriptorSetKHR()

2019-06-11 Thread Józef Kucia
On Tue, Jun 11, 2019 at 11:57 AM Samuel Iglesias Gonsálvez
 wrote:
>
> According to the Vulkan spec, uniform blocks are not allowed to be
> updated through vkCmdPushDescriptorSetKHR().
>
> There are these spec quotes from "13.2.1. Descriptor Set Layout"
> that are relevant for this case:
>
> "VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR specifies
>  that descriptor sets must not be allocated using this layout, and
>  descriptors are instead pushed by vkCmdPushDescriptorSetKHR."
>
> "If flags contains
>  VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then all
>  elements of pBindings must not have a descriptorType of
>  VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT".
>
> There is no explicit mention in vkCmdPushDescriptorSetKHR() to forbid
> this case but it is implied in the creation of the descriptor set
> layout as aforementioned.
>
> Signed-off-by: Samuel Iglesias Gonsálvez 
> ---
>
> My only doubt is I did well in the case of
> radv_meta_push_descriptor_set(), let me know if you prefer to change
> it to false.
>

Perhaps I'm missing something, but what is the point to add the
additional checks for invalid usage? A correct program must not use
inline uniform blocks with push descriptors.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev