<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 24, 2019 at 9:18 AM Bas Nieuwenhuizen <<a href="mailto:bas@basnieuwenhuizen.nl">bas@basnieuwenhuizen.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Jul 24, 2019 at 3:00 PM Samuel Pitoiset<br>
<<a href="mailto:samuel.pitoiset@gmail.com" target="_blank">samuel.pitoiset@gmail.com</a>> wrote:<br>
><br>
> This fixes<br>
> dEQP-VK.rasterization.primitive_size.points.point_size_*<br>
><br>
> This also fixes some black squares with the Sascha SSAO demo.<br>
><br>
> Signed-off-by: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com" target="_blank">samuel.pitoiset@gmail.com</a>><br>
> ---<br>
>  src/amd/vulkan/radv_image.c | 15 ++++++++++++++-<br>
>  1 file changed, 14 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c<br>
> index 09413333cbb..59d6d0ced78 100644<br>
> --- a/src/amd/vulkan/radv_image.c<br>
> +++ b/src/amd/vulkan/radv_image.c<br>
> @@ -617,6 +617,19 @@ static unsigned gfx9_border_color_swizzle(const enum vk_swizzle swizzle[4])<br>
>         return bc_swizzle;<br>
>  }<br>
><br>
> +static bool vi_alpha_is_on_msb(struct radv_device *device, VkFormat format)<br>
> +{<br>
> +       const struct vk_format_description *desc = vk_format_description(format);<br>
> +<br>
> +       /* Formats with 3 channels can't have alpha. */<br>
> +       if (desc->nr_channels == 3)<br>
> +               return true; /* same as xxxA; is any value OK here? */<br>
<br>
I don't think this is correct. For formats with multiple channels,<br>
this bit is not about "does this format have alpha", but "is the alpha<br>
channel on MSB or LSB". IIRC even for RG the "alpha" is just the G<br>
component, no explicit alpha needed.<br></blockquote><div><br></div>Invalid example. RG has 2 channels. The code is for 3 channels. All 3 channel formats don't have an alpha channel, and therefore the clear alpha value doesn't matter.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Marek<br></div></div>