<div dir="ltr"><div>This should be fixed in upstream dxvk so let's not put the hack in mesa:</div><div><br></div><div><a href="https://github.com/doitsujin/dxvk/issues/460">https://github.com/doitsujin/dxvk/issues/460</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 27, 2018 at 6:25 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This works around rendering issues in Skyrim caused by DXVK missing a<br>
decoration.<br>
---<br>
 src/compiler/spirv/vtn_<wbr>variables.c | 18 +++++++++++++++++-<br>
 1 file changed, 17 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/compiler/spirv/vtn_<wbr>variables.c b/src/compiler/spirv/vtn_<wbr>variables.c<br>
index 574f422ceab..24b278e17fd 100644<br>
--- a/src/compiler/spirv/vtn_<wbr>variables.c<br>
+++ b/src/compiler/spirv/vtn_<wbr>variables.c<br>
@@ -1752,8 +1752,24 @@ vtn_create_variable(struct vtn_builder *b, struct vtn_value *val,<br>
       var->var->data.descriptor_set = var->descriptor_set;<br>
       var->var->data.index = var->input_attachment_index;<br>
<br>
-      if (glsl_type_is_image(without_<wbr>array->type))<br>
+      if (glsl_type_is_image(without_<wbr>array->type)) {<br>
          var->var->data.image.format = without_array->image_format;<br>
+<br>
+         /* The requirement that the NonReadable decoration be set was added<br>
+          * as a clarification to the Vulkan spec in version 1.1.76 and not<br>
+          * all apps respect it.  Setting it implicitly inside spirv_to_nir<br>
+          * fixes rendering issues in Skyrim on DXVK as of June 27, 2018.<br>
+          */<br>
+         if (var->var->data.image.format == 0 &&<br>
+             !var->var->data.image.write_<wbr>only &&<br>
+             !b->options->caps.image_read_<wbr>without_format) {<br>
+            vtn_warn("Image variable created an unknown format and without "<br>
+                     "the NonReadable decoration set but the driver does not "<br>
+                     "support shaderStorageImageReadWithoutF<wbr>ormat.  Setting "<br>
+                     "the decoration implicitly to work around the problem.");<br>
+            var->var->data.image.write_<wbr>only = true;<br>
+         }<br>
+      }<br>
    }<br>
<br>
    if (var->mode == vtn_variable_mode_local) {<br>
<span class="HOEnZb"><font color="#888888">-- <br>
2.17.1<br>
<br>
</font></span></blockquote></div><br></div>