<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 8, 2017 at 4:31 AM, Juan A. Suarez Romero <span dir="ltr"><<a href="mailto:jasuarez@igalia.com" target="_blank">jasuarez@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Pre-Broadwell devices does not support natively Vulkan B4G4R4A4, so we just<br>
fallback to another format using a different swizzle.<br>
<br>
But this is crashing a couple of tests in Vulkan CTS due the following:<br>
<br>
- We assert that alpha component will map to "one" or "alpha". But our new<br>
  swizzle maps it to "blue". So let's consider this mapping (patch 01/02).<br>
<br>
- In ISL, we check that RENDER_SURFACE_STATE' channel selections for red, green<br>
  and blue can only be a permutation of this channels (RGB, RBG, GRB, GBR, BRG,<br>
  BGR). But our new swizzle is mapping "blue" to "alpha", so we have<br>
  GRA. According to PRM, seems this check is not required for Haswell (at least,<br>
  didn't found it in Haswell PRM). So let's run it for gen>=8 (patch 02/02).<br>
<br>
<br>
With both patches, we fix the following tests in Haswell:<br>
<br>
- dEQP-VK.api.image_clearing.<wbr>clear_color_image.1d_b4g4r4a4_<wbr>unorm_pack16<br>
- dEQP-VK.api.image_clearing.<wbr>clear_color_image.2d_b4g4r4a4_<wbr>unorm_pack16<br>
- dEQP-VK.api.image_clearing.<wbr>clear_color_image.3d_b4g4r4a4_<wbr>unorm_pack16<br></blockquote><div><br></div><div>Another solution to this problem is to change blorp to pre-swizzle clear colors and not actually use the swizzle.  100% of the code to do this already exists in blorp_clear, it just needs to be moved out of the if statement it's in and used in general.  That would also make those images get correctly cleared on Ivy Bridge.<br><br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
*** BLURB HERE ***<br>
<br>
Juan A. Suarez Romero (2):<br>
  anv: allow blue in alpha component in swizzle for render<br>
  isl: apply RENDER_SURFACE_STATE::Shader Channel assertions to gen>=8<br>
<br>
 src/intel/isl/isl_surface_<wbr>state.c |  5 ++++-<br>
 src/intel/vulkan/anv_private.h    | 14 ++++++++++----<br>
 2 files changed, 14 insertions(+), 5 deletions(-)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.9.3<br>
<br>
</font></span></blockquote></div><br></div></div>