<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Dec 4, 2018 at 12:26 PM Karol Herbst <<a href="mailto:kherbst@redhat.com">kherbst@redhat.com</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">From: Rob Clark <<a href="mailto:robdclark@gmail.com" target="_blank">robdclark@gmail.com</a>><br>
<br>
vtn supports these, so don't squalk if user is happy with enabling<br>
these.<br>
<br>
Signed-off-by: Karol Herbst <<a href="mailto:kherbst@redhat.com" target="_blank">kherbst@redhat.com</a>><br>
---<br>
 src/compiler/shader_info.h         |  3 +++<br>
 src/compiler/spirv/spirv_to_nir.c  | 17 ++++++++++++++---<br>
 src/compiler/spirv/vtn_variables.c |  6 ++++--<br>
 3 files changed, 21 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h<br>
index 65bc0588d67..5286cf8fc5f 100644<br>
--- a/src/compiler/shader_info.h<br>
+++ b/src/compiler/shader_info.h<br>
@@ -62,6 +62,9 @@ struct spirv_supported_capabilities {<br>
    bool post_depth_coverage;<br>
    bool transform_feedback;<br>
    bool geometry_streams;<br>
+   bool address;<br>
+   bool kernel;<br>
+   bool int8;<br></blockquote><div><br></div><div>I really hate the fact that this list isn't sorted in any meaningful way.  I just sent out a patch to sort it.  With that fixed and these put in the right order, the first three patches are</div><div><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
 };<br>
<br>
 typedef struct shader_info {<br>
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c<br>
index 2c2dbe12a3c..e41a7e960ce 100644<br>
--- a/src/compiler/spirv/spirv_to_nir.c<br>
+++ b/src/compiler/spirv/spirv_to_nir.c<br>
@@ -783,8 +783,10 @@ struct_member_decoration_cb(struct vtn_builder *b,<br>
    case SpvDecorationFPRoundingMode:<br>
    case SpvDecorationFPFastMathMode:<br>
    case SpvDecorationAlignment:<br>
-      vtn_warn("Decoration only allowed for CL-style kernels: %s",<br>
-               spirv_decoration_to_string(dec->decoration));<br>
+      if (b->shader->info.stage != MESA_SHADER_KERNEL) {<br>
+         vtn_warn("Decoration only allowed for CL-style kernels: %s",<br>
+                  spirv_decoration_to_string(dec->decoration));<br>
+      }<br>
       break;<br>
<br>
    case SpvDecorationHlslSemanticGOOGLE:<br>
@@ -3420,7 +3422,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,<br>
       case SpvCapabilityFloat16:<br>
       case SpvCapabilityInt64Atomics:<br>
       case SpvCapabilityStorageImageMultisample:<br>
-      case SpvCapabilityInt8:<br>
       case SpvCapabilitySparseResidency:<br>
       case SpvCapabilityMinLod:<br>
          vtn_warn("Unsupported SPIR-V capability: %s",<br>
@@ -3449,8 +3450,18 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,<br>
          spv_check_supported(geometry_streams, cap);<br>
          break;<br>
<br>
+      case SpvCapabilityInt8:<br>
+         spv_check_supported(int8, cap);<br>
+         break;<br>
+<br>
       case SpvCapabilityAddresses:<br>
+         spv_check_supported(address, cap);<br>
+         break;<br>
+<br>
       case SpvCapabilityKernel:<br>
+         spv_check_supported(kernel, cap);<br>
+         break;<br>
+<br>
       case SpvCapabilityImageBasic:<br>
       case SpvCapabilityImageReadWrite:<br>
       case SpvCapabilityImageMipmap:<br>
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c<br>
index 55721fc36e3..fe44e71800d 100644<br>
--- a/src/compiler/spirv/vtn_variables.c<br>
+++ b/src/compiler/spirv/vtn_variables.c<br>
@@ -1381,8 +1381,10 @@ apply_var_decoration(struct vtn_builder *b,<br>
    case SpvDecorationFPRoundingMode:<br>
    case SpvDecorationFPFastMathMode:<br>
    case SpvDecorationAlignment:<br>
-      vtn_warn("Decoration only allowed for CL-style kernels: %s",<br>
-               spirv_decoration_to_string(dec->decoration));<br>
+      if (b->shader->info.stage != MESA_SHADER_KERNEL) {<br>
+         vtn_warn("Decoration only allowed for CL-style kernels: %s",<br>
+                  spirv_decoration_to_string(dec->decoration));<br>
+      }<br>
       break;<br>
<br>
    case SpvDecorationHlslSemanticGOOGLE:<br>
-- <br>
2.19.2<br>
<br>
</blockquote></div></div>