<div dir="auto">Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><div dir="auto"><br></div><div dir="auto">M.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sep 20, 2017 1:24 PM, "Jan Vesely" <<a href="mailto:jan.vesely@rutgers.edu">jan.vesely@rutgers.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Denotes availability of 64bit int atomic instructions<br>
<br>
Signed-off-by: Jan Vesely <<a href="mailto:jan.vesely@rutgers.edu">jan.vesely@rutgers.edu</a>><br>
---<br>
 src/gallium/auxiliary/gallivm/<wbr>lp_bld_limits.h    | 1 +<br>
 src/gallium/auxiliary/tgsi/<wbr>tgsi_exec.h           | 1 +<br>
 src/gallium/docs/source/<wbr>screen.rst               | 1 +<br>
 src/gallium/drivers/etnaviv/<wbr>etnaviv_screen.c     | 1 +<br>
 src/gallium/drivers/freedreno/<wbr>freedreno_screen.c | 2 ++<br>
 src/gallium/drivers/i915/i915_<wbr>screen.c           | 1 +<br>
 src/gallium/drivers/nouveau/<wbr>nv30/nv30_screen.c   | 1 +<br>
 src/gallium/drivers/nouveau/<wbr>nv50/nv50_screen.c   | 1 +<br>
 src/gallium/drivers/nouveau/<wbr>nvc0/nvc0_screen.c   | 1 +<br>
 src/gallium/drivers/r300/r300_<wbr>screen.c           | 1 +<br>
 src/gallium/drivers/r600/r600_<wbr>pipe.c             | 1 +<br>
 src/gallium/drivers/radeonsi/<wbr>si_pipe.c           | 1 +<br>
 src/gallium/drivers/svga/svga_<wbr>screen.c           | 1 +<br>
 src/gallium/drivers/vc4/vc4_<wbr>screen.c             | 1 +<br>
 src/gallium/drivers/virgl/<wbr>virgl_screen.c         | 1 +<br>
 src/gallium/include/pipe/p_<wbr>defines.h             | 1 +<br>
 16 files changed, 17 insertions(+)<br>
<br>
diff --git a/src/gallium/auxiliary/<wbr>gallivm/lp_bld_limits.h b/src/gallium/auxiliary/<wbr>gallivm/lp_bld_limits.h<br>
index e8cc04a2f9..421eeda4e7 100644<br>
--- a/src/gallium/auxiliary/<wbr>gallivm/lp_bld_limits.h<br>
+++ b/src/gallium/auxiliary/<wbr>gallivm/lp_bld_limits.h<br>
@@ -118,6 +118,7 @@ gallivm_get_shader_param(enum pipe_shader_cap param)<br>
       return 1;<br>
    case PIPE_SHADER_CAP_INTEGERS:<br>
       return 1;<br>
+   case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
    case PIPE_SHADER_CAP_FP16:<br>
       return 0;<br>
    case PIPE_SHADER_CAP_MAX_TEXTURE_<wbr>SAMPLERS:<br>
diff --git a/src/gallium/auxiliary/tgsi/<wbr>tgsi_exec.h b/src/gallium/auxiliary/tgsi/<wbr>tgsi_exec.h<br>
index 346848cddf..bcf4a32a8a 100644<br>
--- a/src/gallium/auxiliary/tgsi/<wbr>tgsi_exec.h<br>
+++ b/src/gallium/auxiliary/tgsi/<wbr>tgsi_exec.h<br>
@@ -511,6 +511,7 @@ tgsi_exec_get_shader_param(<wbr>enum pipe_shader_cap param)<br>
       return 1;<br>
    case PIPE_SHADER_CAP_INTEGERS:<br>
       return 1;<br>
+   case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
    case PIPE_SHADER_CAP_FP16:<br>
       return 0;<br>
    case PIPE_SHADER_CAP_MAX_TEXTURE_<wbr>SAMPLERS:<br>
diff --git a/src/gallium/docs/source/<wbr>screen.rst b/src/gallium/docs/source/<wbr>screen.rst<br>
index dfbb6cda6c..0d474dfb07 100644<br>
--- a/src/gallium/docs/source/<wbr>screen.rst<br>
+++ b/src/gallium/docs/source/<wbr>screen.rst<br>
@@ -472,6 +472,7 @@ MOV OUT[0], CONST[0][3]  # copy vector 3 of constbuf 0<br>
   BGNSUB, ENDSUB, CAL, and RET, including RET in the main block.<br>
 * ``PIPE_SHADER_CAP_INTEGERS``: Whether integer opcodes are supported.<br>
   If unsupported, only float opcodes are supported.<br>
+* ``PIPE_SHADER_CAP_INT64_<wbr>ATOMICS``: Whether int64 atomic opcodes are supported. The device needs to support add, sub, swap, cmpswap, and, or, xor, min, and max.<br>
 * ``PIPE_SHADER_CAP_FP16``: Whether half precision floating-point opcodes are supported.<br>
    If unsupported, half precision ops need to be lowered to full precision.<br>
 * ``PIPE_SHADER_CAP_MAX_TEXTURE_<wbr>SAMPLERS``: The maximum number of texture<br>
diff --git a/src/gallium/drivers/etnaviv/<wbr>etnaviv_screen.c b/src/gallium/drivers/etnaviv/<wbr>etnaviv_screen.c<br>
index 953ca1204a..8ffda61428 100644<br>
--- a/src/gallium/drivers/etnaviv/<wbr>etnaviv_screen.c<br>
+++ b/src/gallium/drivers/etnaviv/<wbr>etnaviv_screen.c<br>
@@ -428,6 +428,7 @@ etna_screen_get_shader_param(<wbr>struct pipe_screen *pscreen,<br>
    case PIPE_SHADER_CAP_TGSI_SQRT_<wbr>SUPPORTED:<br>
       return VIV_FEATURE(screen, chipMinorFeatures0, HAS_SQRT_TRIG);<br>
    case PIPE_SHADER_CAP_INTEGERS:<br>
+   case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
    case PIPE_SHADER_CAP_FP16:<br>
       return 0;<br>
    case PIPE_SHADER_CAP_MAX_TEXTURE_<wbr>SAMPLERS:<br>
diff --git a/src/gallium/drivers/<wbr>freedreno/freedreno_screen.c b/src/gallium/drivers/<wbr>freedreno/freedreno_screen.c<br>
index a91e3c2e70..061cc86c6d 100644<br>
--- a/src/gallium/drivers/<wbr>freedreno/freedreno_screen.c<br>
+++ b/src/gallium/drivers/<wbr>freedreno/freedreno_screen.c<br>
@@ -527,6 +527,8 @@ fd_screen_get_shader_param(<wbr>struct pipe_screen *pscreen,<br>
                if (glsl120)<br>
                        return 0;<br>
                return is_ir3(screen) ? 1 : 0;<br>
+       case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
+               return 0;<br>
        case PIPE_SHADER_CAP_FP16:<br>
                return 0;<br>
        case PIPE_SHADER_CAP_MAX_TEXTURE_<wbr>SAMPLERS:<br>
diff --git a/src/gallium/drivers/i915/<wbr>i915_screen.c b/src/gallium/drivers/i915/<wbr>i915_screen.c<br>
index 95ed3341b3..bacd40a57d 100644<br>
--- a/src/gallium/drivers/i915/<wbr>i915_screen.c<br>
+++ b/src/gallium/drivers/i915/<wbr>i915_screen.c<br>
@@ -157,6 +157,7 @@ i915_get_shader_param(struct pipe_screen *screen,<br>
       case PIPE_SHADER_CAP_SUBROUTINES:<br>
          return 0;<br>
       case PIPE_SHADER_CAP_INTEGERS:<br>
+      case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
       case PIPE_SHADER_CAP_FP16:<br>
          return 0;<br>
       case PIPE_SHADER_CAP_MAX_TEXTURE_<wbr>SAMPLERS:<br>
diff --git a/src/gallium/drivers/nouveau/<wbr>nv30/nv30_screen.c b/src/gallium/drivers/nouveau/<wbr>nv30/nv30_screen.c<br>
index ba466050c6..0d40bfed7a 100644<br>
--- a/src/gallium/drivers/nouveau/<wbr>nv30/nv30_screen.c<br>
+++ b/src/gallium/drivers/nouveau/<wbr>nv30/nv30_screen.c<br>
@@ -314,6 +314,7 @@ nv30_screen_get_shader_param(<wbr>struct pipe_screen *pscreen,<br>
       case PIPE_SHADER_CAP_INDIRECT_<wbr>CONST_ADDR:<br>
       case PIPE_SHADER_CAP_SUBROUTINES:<br>
       case PIPE_SHADER_CAP_INTEGERS:<br>
+      case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
       case PIPE_SHADER_CAP_FP16:<br>
       case PIPE_SHADER_CAP_TGSI_DROUND_<wbr>SUPPORTED:<br>
       case PIPE_SHADER_CAP_TGSI_DFRACEXP_<wbr>DLDEXP_SUPPORTED:<br>
diff --git a/src/gallium/drivers/nouveau/<wbr>nv50/nv50_screen.c b/src/gallium/drivers/nouveau/<wbr>nv50/nv50_screen.c<br>
index 60b6037396..706e8d369b 100644<br>
--- a/src/gallium/drivers/nouveau/<wbr>nv50/nv50_screen.c<br>
+++ b/src/gallium/drivers/nouveau/<wbr>nv50/nv50_screen.c<br>
@@ -345,6 +345,7 @@ nv50_screen_get_shader_param(<wbr>struct pipe_screen *pscreen,<br>
       return 1;<br>
    case PIPE_SHADER_CAP_TGSI_SQRT_<wbr>SUPPORTED:<br>
       return 1;<br>
+   case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
    case PIPE_SHADER_CAP_FP16:<br>
    case PIPE_SHADER_CAP_SUBROUTINES:<br>
       return 0; /* please inline, or provide function declarations */<br>
diff --git a/src/gallium/drivers/nouveau/<wbr>nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/<wbr>nvc0/nvc0_screen.c<br>
index 8cf6ba6506..87fc754f4c 100644<br>
--- a/src/gallium/drivers/nouveau/<wbr>nvc0/nvc0_screen.c<br>
+++ b/src/gallium/drivers/nouveau/<wbr>nvc0/nvc0_screen.c<br>
@@ -405,6 +405,7 @@ nvc0_screen_get_shader_param(<wbr>struct pipe_screen *pscreen,<br>
    case PIPE_SHADER_CAP_TGSI_DFRACEXP_<wbr>DLDEXP_SUPPORTED:<br>
    case PIPE_SHADER_CAP_TGSI_ANY_<wbr>INOUT_DECL_RANGE:<br>
    case PIPE_SHADER_CAP_LOWER_IF_<wbr>THRESHOLD:<br>
+   case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
    case PIPE_SHADER_CAP_FP16:<br>
       return 0;<br>
    case PIPE_SHADER_CAP_MAX_SHADER_<wbr>BUFFERS:<br>
diff --git a/src/gallium/drivers/r300/<wbr>r300_screen.c b/src/gallium/drivers/r300/<wbr>r300_screen.c<br>
index 2838b7cf00..0a1c21bd74 100644<br>
--- a/src/gallium/drivers/r300/<wbr>r300_screen.c<br>
+++ b/src/gallium/drivers/r300/<wbr>r300_screen.c<br>
@@ -354,6 +354,7 @@ static int r300_get_shader_param(struct pipe_screen *pscreen,<br>
         case PIPE_SHADER_CAP_INDIRECT_<wbr>CONST_ADDR:<br>
         case PIPE_SHADER_CAP_SUBROUTINES:<br>
         case PIPE_SHADER_CAP_INTEGERS:<br>
+        case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
         case PIPE_SHADER_CAP_FP16:<br>
         case PIPE_SHADER_CAP_TGSI_DROUND_<wbr>SUPPORTED:<br>
         case PIPE_SHADER_CAP_TGSI_DFRACEXP_<wbr>DLDEXP_SUPPORTED:<br>
diff --git a/src/gallium/drivers/r600/<wbr>r600_pipe.c b/src/gallium/drivers/r600/<wbr>r600_pipe.c<br>
index 2e5008c8d4..62839d4c19 100644<br>
--- a/src/gallium/drivers/r600/<wbr>r600_pipe.c<br>
+++ b/src/gallium/drivers/r600/<wbr>r600_pipe.c<br>
@@ -570,6 +570,7 @@ static int r600_get_shader_param(struct pipe_screen* pscreen,<br>
        case PIPE_SHADER_CAP_INDIRECT_<wbr>CONST_ADDR:<br>
                return 1;<br>
        case PIPE_SHADER_CAP_SUBROUTINES:<br>
+       case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
        case PIPE_SHADER_CAP_FP16:<br>
                return 0;<br>
        case PIPE_SHADER_CAP_INTEGERS:<br>
diff --git a/src/gallium/drivers/<wbr>radeonsi/si_pipe.c b/src/gallium/drivers/<wbr>radeonsi/si_pipe.c<br>
index 0666798964..2eacc5d69e 100644<br>
--- a/src/gallium/drivers/<wbr>radeonsi/si_pipe.c<br>
+++ b/src/gallium/drivers/<wbr>radeonsi/si_pipe.c<br>
@@ -742,6 +742,7 @@ static int si_get_shader_param(struct pipe_screen* pscreen,<br>
        case PIPE_SHADER_CAP_INDIRECT_TEMP_<wbr>ADDR:<br>
        case PIPE_SHADER_CAP_INDIRECT_<wbr>CONST_ADDR:<br>
        case PIPE_SHADER_CAP_INTEGERS:<br>
+       case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
        case PIPE_SHADER_CAP_FP16:<br>
        case PIPE_SHADER_CAP_TGSI_FMA_<wbr>SUPPORTED:<br>
        case PIPE_SHADER_CAP_TGSI_ANY_<wbr>INOUT_DECL_RANGE:<br>
diff --git a/src/gallium/drivers/svga/<wbr>svga_screen.c b/src/gallium/drivers/svga/<wbr>svga_screen.c<br>
index 3845d17692..7392a18ec1 100644<br>
--- a/src/gallium/drivers/svga/<wbr>svga_screen.c<br>
+++ b/src/gallium/drivers/svga/<wbr>svga_screen.c<br>
@@ -517,6 +517,7 @@ vgpu9_get_shader_param(struct pipe_screen *screen,<br>
          return 0;<br>
       case PIPE_SHADER_CAP_SUBROUTINES:<br>
          return 0;<br>
+      case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
       case PIPE_SHADER_CAP_INTEGERS:<br>
          return 0;<br>
       case PIPE_SHADER_CAP_FP16:<br>
diff --git a/src/gallium/drivers/vc4/vc4_<wbr>screen.c b/src/gallium/drivers/vc4/vc4_<wbr>screen.c<br>
index 04ae44688d..4f38346d83 100644<br>
--- a/src/gallium/drivers/vc4/vc4_<wbr>screen.c<br>
+++ b/src/gallium/drivers/vc4/vc4_<wbr>screen.c<br>
@@ -407,6 +407,7 @@ vc4_screen_get_shader_param(<wbr>struct pipe_screen *pscreen,<br>
                 return 0;<br>
         case PIPE_SHADER_CAP_INTEGERS:<br>
                 return 1;<br>
+        case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
         case PIPE_SHADER_CAP_FP16:<br>
         case PIPE_SHADER_CAP_TGSI_DROUND_<wbr>SUPPORTED:<br>
         case PIPE_SHADER_CAP_TGSI_DFRACEXP_<wbr>DLDEXP_SUPPORTED:<br>
diff --git a/src/gallium/drivers/virgl/<wbr>virgl_screen.c b/src/gallium/drivers/virgl/<wbr>virgl_screen.c<br>
index 46b3bd3fd0..935ce2f9b0 100644<br>
--- a/src/gallium/drivers/virgl/<wbr>virgl_screen.c<br>
+++ b/src/gallium/drivers/virgl/<wbr>virgl_screen.c<br>
@@ -335,6 +335,7 @@ virgl_get_shader_param(struct pipe_screen *screen,<br>
          return 4096 * sizeof(float[4]);<br>
       case PIPE_SHADER_CAP_LOWER_IF_<wbr>THRESHOLD:<br>
       case PIPE_SHADER_CAP_TGSI_SKIP_<wbr>MERGE_REGISTERS:<br>
+      case PIPE_SHADER_CAP_INT64_ATOMICS:<br>
       case PIPE_SHADER_CAP_FP16:<br>
       default:<br>
          return 0;<br>
diff --git a/src/gallium/include/pipe/p_<wbr>defines.h b/src/gallium/include/pipe/p_<wbr>defines.h<br>
index 7294492017..be5907e4fb 100644<br>
--- a/src/gallium/include/pipe/p_<wbr>defines.h<br>
+++ b/src/gallium/include/pipe/p_<wbr>defines.h<br>
@@ -832,6 +832,7 @@ enum pipe_shader_cap<br>
    PIPE_SHADER_CAP_INDIRECT_<wbr>CONST_ADDR,<br>
    PIPE_SHADER_CAP_SUBROUTINES, /* BGNSUB, ENDSUB, CAL, RET */<br>
    PIPE_SHADER_CAP_INTEGERS,<br>
+   PIPE_SHADER_CAP_INT64_ATOMICS,<br>
    PIPE_SHADER_CAP_FP16,<br>
    PIPE_SHADER_CAP_MAX_TEXTURE_<wbr>SAMPLERS,<br>
    PIPE_SHADER_CAP_PREFERRED_IR,<br>
--<br>
2.13.5<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">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/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>