radv,aco: introduce {radv,aco}_ps_epilog_key

To pass the necessary pipeline information for compiling PS epilogs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17485>
This commit is contained in:
Samuel Pitoiset 2022-06-17 16:27:33 +02:00 committed by Marge Bot
parent eee098486a
commit 0db7a0b6e8
4 changed files with 31 additions and 0 deletions

View File

@ -37,6 +37,7 @@ extern "C" {
struct ac_shader_config;
struct aco_shader_info;
struct aco_vs_prolog_key;
struct aco_ps_epilog_key;
struct aco_compiler_statistic_info {
char name[32];

View File

@ -60,6 +60,15 @@ struct aco_vs_prolog_key {
gl_shader_stage next_stage;
};
struct aco_ps_epilog_key {
uint32_t spi_shader_col_format;
/* Bitmasks, each bit represents one of the 8 MRTs. */
uint8_t color_is_int8;
uint8_t color_is_int10;
uint8_t enable_mrt_output_nan_fixup;
};
struct aco_vp_output_info {
uint8_t vs_output_param_offset[VARYING_SLOT_MAX];
uint8_t clip_dist_mask;

View File

@ -123,6 +123,16 @@ radv_aco_convert_vs_prolog_key(struct aco_vs_prolog_key *aco_info,
ASSIGN_FIELD(next_stage);
}
static inline void
radv_aco_convert_ps_epilog_key(struct aco_ps_epilog_key *aco_info,
const struct radv_ps_epilog_key *radv)
{
ASSIGN_FIELD(spi_shader_col_format);
ASSIGN_FIELD(color_is_int8);
ASSIGN_FIELD(color_is_int10);
ASSIGN_FIELD(enable_mrt_output_nan_fixup);
}
static inline void
radv_aco_convert_pipe_key(struct aco_stage_input *aco_info,
const struct radv_pipeline_key *radv)

View File

@ -410,6 +410,17 @@ struct radv_vs_prolog_key {
gl_shader_stage next_stage;
};
struct radv_ps_epilog_key {
uint32_t spi_shader_col_format;
/* Bitmasks, each bit represents one of the 8 MRTs. */
uint8_t color_is_int8;
uint8_t color_is_int10;
uint8_t enable_mrt_output_nan_fixup;
bool wave32;
};
enum radv_shader_binary_type { RADV_BINARY_TYPE_LEGACY, RADV_BINARY_TYPE_RTLD };
struct radv_shader_binary {