r600/sfn: Add FS output sample_mask
authorGert Wollny <gert.wollny@collabora.com>
Wed, 6 May 2020 22:09:02 +0000 (00:09 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 19 May 2020 07:52:13 +0000 (07:52 +0000)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085>

src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp

index a443ea3e86ab29e4e35e737e28139dce29cf2c60..43e470532ba5bb9a11c9d934497b7e67018cf7f9 100644 (file)
@@ -285,7 +285,8 @@ bool FragmentShaderFromNir::do_emit_store_deref(const nir_variable *out_var, nir
    if ((out_var->data.location >= FRAG_RESULT_DATA0 &&
         out_var->data.location <= FRAG_RESULT_DATA7) ||
        out_var->data.location == FRAG_RESULT_DEPTH ||
-       out_var->data.location == FRAG_RESULT_STENCIL)
+       out_var->data.location == FRAG_RESULT_STENCIL ||
+       out_var->data.location == FRAG_RESULT_SAMPLE_MASK)
       return emit_export_pixel(out_var, instr, false);
 
    sfn_log << SfnLog::err << "r600-NIR: Unimplemented store_deref for " <<
@@ -326,7 +327,8 @@ bool FragmentShaderFromNir::do_process_outputs(nir_variable *output)
       return true;
    }
    if (output->data.location == FRAG_RESULT_DEPTH ||
-       output->data.location == FRAG_RESULT_STENCIL) {
+       output->data.location == FRAG_RESULT_STENCIL ||
+       output->data.location == FRAG_RESULT_SAMPLE_MASK) {
       io.write_mask = 15;
       return true;
    }