ac: Replace the usage of pipe_compare_func with compare_func

PIPE_FUNC_ -> COMPARE_FUNC_
pipe_compare_func -> compare_func

Now include "pipe/p_state.h" is not needed and remove it in ac_nir.h

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23422>
This commit is contained in:
Yonggang Luo
2023-06-06 09:22:42 +08:00
committed by Marge Bot
parent 00765e7865
commit 19196199a8
3 changed files with 4 additions and 5 deletions

View File

@@ -13,7 +13,6 @@
#include "ac_shader_args.h"
#include "ac_shader_util.h"
#include "amd_family.h"
#include "pipe/p_state.h"
#ifdef __cplusplus
extern "C" {
@@ -302,7 +301,7 @@ typedef struct {
bool clamp_color;
bool alpha_to_one;
bool kill_samplemask;
enum pipe_compare_func alpha_func;
enum compare_func alpha_func;
unsigned broadcast_last_cbuf;
/* Vulkan only */

View File

@@ -322,9 +322,9 @@ emit_ps_color_clamp_and_alpha_test(nir_builder *b, lower_ps_state *s)
}
if (slot == FRAG_RESULT_COLOR || slot == FRAG_RESULT_DATA0) {
if (s->options->alpha_func == PIPE_FUNC_ALWAYS) {
if (s->options->alpha_func == COMPARE_FUNC_ALWAYS) {
/* always pass, do nothing */
} else if (s->options->alpha_func == PIPE_FUNC_NEVER) {
} else if (s->options->alpha_func == COMPARE_FUNC_NEVER) {
nir_discard(b);
} else if (s->outputs[slot][3]) {
nir_ssa_def *ref = nir_load_alpha_reference_amd(b);

View File

@@ -619,7 +619,7 @@ radv_postprocess_nir(struct radv_device *device, const struct radv_pipeline_layo
pipeline_key->ps.epilog.spi_shader_col_format & stage->info.ps.colors_written,
.color_is_int8 = pipeline_key->ps.epilog.color_is_int8,
.color_is_int10 = pipeline_key->ps.epilog.color_is_int10,
.alpha_func = PIPE_FUNC_ALWAYS,
.alpha_func = COMPARE_FUNC_ALWAYS,
.enable_mrt_output_nan_fixup = pipeline_key->ps.epilog.enable_mrt_output_nan_fixup,
.no_color_export = stage->info.ps.has_epilog,