radv,aco: declare PS epilog VGPR arguments for depth/stencil/samplemask

Depth/stencil/samplemask inputs are first to match
create_fs_jump_to_epilog().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26413>
This commit is contained in:
Samuel Pitoiset 2023-11-16 17:03:13 +01:00 committed by Marge Bot
parent 8b87c985b0
commit 4248d0b03a
3 changed files with 14 additions and 0 deletions

View file

@ -118,6 +118,9 @@ radv_aco_convert_ps_epilog_key(struct aco_ps_epilog_info *aco_info, const struct
ASSIGN_FIELD(alpha_to_coverage_via_mrtz);
memcpy(aco_info->colors, radv_args->colors, sizeof(aco_info->colors));
aco_info->depth = radv_args->depth;
aco_info->stencil = radv_args->stencil;
aco_info->samplemask = radv_args->sample_mask;
aco_info->alpha_func = COMPARE_FUNC_ALWAYS;
}

View file

@ -825,6 +825,14 @@ radv_declare_ps_epilog_args(const struct radv_device *device, const struct radv_
{
radv_init_shader_args(device, MESA_SHADER_FRAGMENT, args);
/* Declare VGPR arguments for depth/stencil/sample exports. */
if (key->export_depth)
ac_add_arg(&args->ac, AC_ARG_VGPR, 1, AC_ARG_FLOAT, &args->depth);
if (key->export_stencil)
ac_add_arg(&args->ac, AC_ARG_VGPR, 1, AC_ARG_FLOAT, &args->stencil);
if (key->export_sample_mask)
ac_add_arg(&args->ac, AC_ARG_VGPR, 1, AC_ARG_FLOAT, &args->sample_mask);
/* Declare VGPR arguments for color exports. */
for (unsigned i = 0; i < MAX_RTS; i++) {
unsigned col_format = (key->spi_shader_col_format >> (i * 4)) & 0xf;

View file

@ -62,6 +62,9 @@ struct radv_shader_args {
/* PS epilogs */
struct ac_arg colors[MAX_RTS];
struct ac_arg depth;
struct ac_arg stencil;
struct ac_arg sample_mask;
/* TCS */
/* # [0:5] = the number of patch control points