<div dir="ltr">Forgot to add<div><br></div><div>Cc: "17.2 17.3" <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a>></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 25 October 2017 at 11:24, Matthew Nicholls <span dir="ltr"><<a href="mailto:mnicholls@feralinteractive.com" target="_blank">mnicholls@feralinteractive.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
 src/amd/common/ac_nir_to_llvm.<wbr>c | 6 ++++--<br>
 1 file changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/amd/common/ac_nir_to_<wbr>llvm.c b/src/amd/common/ac_nir_to_<wbr>llvm.c<br>
index 3d635d4206..870731f3eb 100644<br>
--- a/src/amd/common/ac_nir_to_<wbr>llvm.c<br>
+++ b/src/amd/common/ac_nir_to_<wbr>llvm.c<br>
@@ -3667,15 +3667,17 @@ static LLVMValueRef visit_image_atomic(struct ac_nir_context *ctx,<br>
        LLVMValueRef i1true = LLVMConstInt(ctx->ac.i1, 1, false);<br>
        MAYBE_UNUSED int length;<br>
<br>
+       bool is_unsigned = glsl_get_sampler_result_type(<wbr>type) == GLSL_TYPE_UINT;<br>
+<br>
        switch (instr->intrinsic) {<br>
        case nir_intrinsic_image_atomic_<wbr>add:<br>
                atomic_name = "add";<br>
                break;<br>
        case nir_intrinsic_image_atomic_<wbr>min:<br>
-               atomic_name = "smin";<br>
+               atomic_name = is_unsigned ? "umin" : "smin";<br>
                break;<br>
        case nir_intrinsic_image_atomic_<wbr>max:<br>
-               atomic_name = "smax";<br>
+               atomic_name = is_unsigned ? "umin" : "smax";<br>
                break;<br>
        case nir_intrinsic_image_atomic_<wbr>and:<br>
                atomic_name = "and";<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.13.6<br>
<br>
</font></span></blockquote></div><br></div>