<div dir="ltr">So, it looks like I'll need some blorp patches before we can land this for real. I'll try and cook some up.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 2, 2017 at 2:35 AM, Lionel Landwerlin <span dir="ltr"><<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Both are :<br>
<br>
Reviewed-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a><wbr>><div class="HOEnZb"><div class="h5"><br>
<br>
On 02/08/17 02:16, Jason Ekstrand wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Unreal Engine 4 seems to really like VK_FORMAT_R8_SRGB for some reason.<br>
We don't technically have the hardware format but we do have L8_SRGB.<br>
It's easy enough to fake with that and a swizzle. While we're at it, we<br>
may as well support R8G8_SRGB using L8A8_SRGB.<br>
---<br>
src/intel/vulkan/anv_formats.c | 6 ++++--<br>
1 file changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_formats<wbr>.c b/src/intel/vulkan/anv_formats<wbr>.c<br>
index c656d7e..2309dfe 100644<br>
--- a/src/intel/vulkan/anv_formats<wbr>.c<br>
+++ b/src/intel/vulkan/anv_formats<wbr>.c<br>
@@ -74,14 +74,16 @@ static const struct anv_format anv_formats[] = {<br>
fmt(VK_FORMAT_R8_SSCALED, ISL_FORMAT_R8_SSCALED),<br>
fmt(VK_FORMAT_R8_UINT, ISL_FORMAT_R8_UINT),<br>
fmt(VK_FORMAT_R8_SINT, ISL_FORMAT_R8_SINT),<br>
- fmt(VK_FORMAT_R8_SRGB, ISL_FORMAT_UNSUPPORTED),<br>
+ swiz_fmt(VK_FORMAT_R8_SRGB, ISL_FORMAT_L8_UNORM_SRGB,<br>
+ _ISL_SWIZZLE(RED, ZERO, ZERO, ONE)),<br>
fmt(VK_FORMAT_R8G8_UNORM, ISL_FORMAT_R8G8_UNORM),<br>
fmt(VK_FORMAT_R8G8_SNORM, ISL_FORMAT_R8G8_SNORM),<br>
fmt(VK_FORMAT_R8G8_USCALED, ISL_FORMAT_R8G8_USCALED),<br>
fmt(VK_FORMAT_R8G8_SSCALED, ISL_FORMAT_R8G8_SSCALED),<br>
fmt(VK_FORMAT_R8G8_UINT, ISL_FORMAT_R8G8_UINT),<br>
fmt(VK_FORMAT_R8G8_SINT, ISL_FORMAT_R8G8_SINT),<br>
- fmt(VK_FORMAT_R8G8_SRGB, ISL_FORMAT_UNSUPPORTED), /* L8A8_UNORM_SRGB */<br>
+ swiz_fmt(VK_FORMAT_R8G8_SRGB,<wbr> ISL_FORMAT_L8A8_UNORM_SRGB,<br>
+ _ISL_SWIZZLE(RED, ALPHA, ZERO, ONE)),<br>
fmt(VK_FORMAT_R8G8B8_UNORM, ISL_FORMAT_R8G8B8_UNORM),<br>
fmt(VK_FORMAT_R8G8B8_SNORM, ISL_FORMAT_R8G8B8_SNORM),<br>
fmt(VK_FORMAT_R8G8B8_USCALED,<wbr> ISL_FORMAT_R8G8B8_USCALED),<br>
</blockquote>
<br>
<br>
</div></div></blockquote></div><br></div>