<div dir="ltr"><div>patches 6 and 10 are</div><div><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 13, 2018 at 9:49 AM Karol Herbst <<a href="mailto:kherbst@redhat.com">kherbst@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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  | 16 +++++++++++++---<br>
 src/compiler/spirv/vtn_variables.c |  6 ++++--<br>
 3 files changed, 20 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>
 };<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 d7dd5a67cc4..db2ee51340c 100644<br>
--- a/src/compiler/spirv/spirv_to_nir.c<br>
+++ b/src/compiler/spirv/spirv_to_nir.c<br>
@@ -792,8 +792,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->kernel_mode) {<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>
@@ -3428,7 +3430,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>
@@ -3457,8 +3458,17 @@ 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>
       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 c5cf345d02a..e7654b768af 100644<br>
--- a/src/compiler/spirv/vtn_variables.c<br>
+++ b/src/compiler/spirv/vtn_variables.c<br>
@@ -1371,8 +1371,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->kernel_mode) {<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.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>