2021-02-09 19:19:53 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright © 2021 Valve Corporation
|
|
|
|
|
*
|
2023-05-18 17:22:27 -04:00
|
|
|
* SPDX-License-Identifier: MIT
|
2021-02-09 19:19:53 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef AC_NIR_H
|
|
|
|
|
#define AC_NIR_H
|
|
|
|
|
|
|
|
|
|
#include "nir.h"
|
2022-09-30 19:29:43 +01:00
|
|
|
#include "nir_builder.h"
|
2021-02-09 19:19:53 +01:00
|
|
|
#include "ac_shader_args.h"
|
2021-04-01 12:43:31 +02:00
|
|
|
#include "ac_shader_util.h"
|
2021-02-09 19:19:53 +01:00
|
|
|
#include "amd_family.h"
|
2022-09-30 19:29:43 +01:00
|
|
|
#include "pipe/p_state.h"
|
2021-02-09 19:19:53 +01:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-12-12 20:20:36 -05:00
|
|
|
enum
|
|
|
|
|
{
|
|
|
|
|
/* SPI_PS_INPUT_CNTL_i.OFFSET[0:4] */
|
|
|
|
|
AC_EXP_PARAM_OFFSET_0 = 0,
|
|
|
|
|
AC_EXP_PARAM_OFFSET_31 = 31,
|
|
|
|
|
/* SPI_PS_INPUT_CNTL_i.DEFAULT_VAL[0:1] */
|
|
|
|
|
AC_EXP_PARAM_DEFAULT_VAL_0000 = 64,
|
|
|
|
|
AC_EXP_PARAM_DEFAULT_VAL_0001,
|
|
|
|
|
AC_EXP_PARAM_DEFAULT_VAL_1110,
|
|
|
|
|
AC_EXP_PARAM_DEFAULT_VAL_1111,
|
|
|
|
|
AC_EXP_PARAM_UNDEFINED = 255, /* deprecated, use AC_EXP_PARAM_DEFAULT_VAL_0000 instead */
|
|
|
|
|
};
|
|
|
|
|
|
2022-12-19 14:27:56 +08:00
|
|
|
enum {
|
|
|
|
|
AC_EXP_FLAG_COMPRESSED = (1 << 0),
|
|
|
|
|
AC_EXP_FLAG_DONE = (1 << 1),
|
|
|
|
|
AC_EXP_FLAG_VALID_MASK = (1 << 2),
|
|
|
|
|
};
|
|
|
|
|
|
2022-05-12 15:48:24 +02:00
|
|
|
/* Maps I/O semantics to the actual location used by the lowering pass. */
|
|
|
|
|
typedef unsigned (*ac_nir_map_io_driver_location)(unsigned semantic);
|
|
|
|
|
|
2021-04-01 12:43:31 +02:00
|
|
|
/* Forward declaration of nir_builder so we don't have to include nir_builder.h here */
|
|
|
|
|
struct nir_builder;
|
|
|
|
|
typedef struct nir_builder nir_builder;
|
|
|
|
|
|
2022-08-03 11:53:29 +02:00
|
|
|
/* Executed by ac_nir_cull when the current primitive is accepted. */
|
|
|
|
|
typedef void (*ac_nir_cull_accepted)(nir_builder *b, void *state);
|
|
|
|
|
|
2021-09-29 18:25:03 +02:00
|
|
|
nir_ssa_def *
|
2023-03-18 21:32:16 +08:00
|
|
|
ac_nir_load_arg_at_offset(nir_builder *b, const struct ac_shader_args *ac_args,
|
|
|
|
|
struct ac_arg arg, unsigned relative_index);
|
|
|
|
|
|
|
|
|
|
static inline nir_ssa_def *
|
|
|
|
|
ac_nir_load_arg(nir_builder *b, const struct ac_shader_args *ac_args, struct ac_arg arg)
|
|
|
|
|
{
|
|
|
|
|
return ac_nir_load_arg_at_offset(b, ac_args, arg, 0);
|
|
|
|
|
}
|
2021-09-29 18:25:03 +02:00
|
|
|
|
2022-08-10 19:18:15 +08:00
|
|
|
nir_ssa_def *
|
|
|
|
|
ac_nir_unpack_arg(nir_builder *b, const struct ac_shader_args *ac_args, struct ac_arg arg,
|
|
|
|
|
unsigned rshift, unsigned bitwidth);
|
|
|
|
|
|
2023-03-29 19:28:42 +02:00
|
|
|
bool ac_nir_lower_sin_cos(nir_shader *shader);
|
|
|
|
|
|
2023-02-14 10:19:44 +08:00
|
|
|
void
|
|
|
|
|
ac_nir_store_var_components(nir_builder *b, nir_variable *var, nir_ssa_def *value,
|
|
|
|
|
unsigned component, unsigned writemask);
|
|
|
|
|
|
2022-12-19 16:01:15 +08:00
|
|
|
void
|
|
|
|
|
ac_nir_export_primitive(nir_builder *b, nir_ssa_def *prim);
|
|
|
|
|
|
2022-12-21 15:04:47 +08:00
|
|
|
void
|
|
|
|
|
ac_nir_export_position(nir_builder *b,
|
|
|
|
|
enum amd_gfx_level gfx_level,
|
|
|
|
|
uint32_t clip_cull_mask,
|
|
|
|
|
bool no_param_export,
|
2023-01-29 09:46:43 +08:00
|
|
|
bool force_vrs,
|
2022-12-21 15:04:47 +08:00
|
|
|
uint64_t outputs_written,
|
|
|
|
|
nir_ssa_def *(*outputs)[4]);
|
|
|
|
|
|
2022-12-21 15:49:43 +08:00
|
|
|
void
|
2023-03-15 04:02:28 -04:00
|
|
|
ac_nir_export_parameters(nir_builder *b,
|
|
|
|
|
const uint8_t *param_offsets,
|
|
|
|
|
uint64_t outputs_written,
|
|
|
|
|
uint16_t outputs_written_16bit,
|
|
|
|
|
nir_ssa_def *(*outputs)[4],
|
|
|
|
|
nir_ssa_def *(*outputs_16bit_lo)[4],
|
|
|
|
|
nir_ssa_def *(*outputs_16bit_hi)[4]);
|
2022-12-21 15:49:43 +08:00
|
|
|
|
2022-05-12 15:48:24 +02:00
|
|
|
nir_ssa_def *
|
|
|
|
|
ac_nir_calc_io_offset(nir_builder *b,
|
|
|
|
|
nir_intrinsic_instr *intrin,
|
|
|
|
|
nir_ssa_def *base_stride,
|
|
|
|
|
unsigned component_stride,
|
|
|
|
|
ac_nir_map_io_driver_location map_io);
|
|
|
|
|
|
2021-12-12 21:20:09 -05:00
|
|
|
bool ac_nir_optimize_outputs(nir_shader *nir, bool sprite_tex_disallowed,
|
|
|
|
|
int8_t slot_remap[NUM_TOTAL_VARYING_SLOTS],
|
|
|
|
|
uint8_t param_export_index[NUM_TOTAL_VARYING_SLOTS]);
|
|
|
|
|
|
2021-02-09 19:19:53 +01:00
|
|
|
void
|
|
|
|
|
ac_nir_lower_ls_outputs_to_mem(nir_shader *ls,
|
2022-05-12 15:48:24 +02:00
|
|
|
ac_nir_map_io_driver_location map,
|
2021-02-09 19:19:53 +01:00
|
|
|
bool tcs_in_out_eq,
|
2022-05-07 17:38:04 +08:00
|
|
|
uint64_t tcs_temp_only_inputs);
|
2021-02-09 19:19:53 +01:00
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ac_nir_lower_hs_inputs_to_mem(nir_shader *shader,
|
2022-05-12 15:48:24 +02:00
|
|
|
ac_nir_map_io_driver_location map,
|
2022-05-07 17:38:04 +08:00
|
|
|
bool tcs_in_out_eq);
|
2021-02-09 19:19:53 +01:00
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ac_nir_lower_hs_outputs_to_mem(nir_shader *shader,
|
2022-05-12 15:48:24 +02:00
|
|
|
ac_nir_map_io_driver_location map,
|
2022-05-12 02:50:17 -04:00
|
|
|
enum amd_gfx_level gfx_level,
|
2021-02-09 19:19:53 +01:00
|
|
|
bool tes_reads_tessfactors,
|
|
|
|
|
uint64_t tes_inputs_read,
|
|
|
|
|
uint64_t tes_patch_inputs_read,
|
|
|
|
|
unsigned num_reserved_tcs_outputs,
|
|
|
|
|
unsigned num_reserved_tcs_patch_outputs,
|
2022-05-27 17:39:18 +08:00
|
|
|
unsigned wave_size,
|
2022-06-01 17:13:00 +08:00
|
|
|
bool no_inputs_in_lds,
|
2022-05-23 20:27:55 +08:00
|
|
|
bool pass_tessfactors_by_reg,
|
2021-02-09 19:19:53 +01:00
|
|
|
bool emit_tess_factor_write);
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ac_nir_lower_tes_inputs_to_mem(nir_shader *shader,
|
2022-05-23 17:26:00 +08:00
|
|
|
ac_nir_map_io_driver_location map);
|
2021-02-09 19:19:53 +01:00
|
|
|
|
2021-03-02 15:30:58 +01:00
|
|
|
void
|
|
|
|
|
ac_nir_lower_es_outputs_to_mem(nir_shader *shader,
|
2022-05-12 15:48:24 +02:00
|
|
|
ac_nir_map_io_driver_location map,
|
2022-05-12 02:50:17 -04:00
|
|
|
enum amd_gfx_level gfx_level,
|
2022-05-31 14:18:17 +08:00
|
|
|
unsigned esgs_itemsize);
|
2021-03-02 15:30:58 +01:00
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ac_nir_lower_gs_inputs_to_mem(nir_shader *shader,
|
2022-05-12 15:48:24 +02:00
|
|
|
ac_nir_map_io_driver_location map,
|
2022-05-30 19:46:15 +08:00
|
|
|
enum amd_gfx_level gfx_level,
|
|
|
|
|
bool triangle_strip_adjacency_fix);
|
2021-03-02 15:30:58 +01:00
|
|
|
|
2021-04-22 16:14:32 +02:00
|
|
|
bool
|
|
|
|
|
ac_nir_lower_indirect_derefs(nir_shader *shader,
|
2022-05-12 02:50:17 -04:00
|
|
|
enum amd_gfx_level gfx_level);
|
2021-04-22 16:14:32 +02:00
|
|
|
|
2022-10-14 17:15:39 +01:00
|
|
|
typedef struct {
|
|
|
|
|
enum radeon_family family;
|
|
|
|
|
enum amd_gfx_level gfx_level;
|
|
|
|
|
|
|
|
|
|
unsigned max_workgroup_size;
|
|
|
|
|
unsigned wave_size;
|
2022-12-24 14:55:29 +08:00
|
|
|
uint32_t clipdist_enable_mask;
|
2022-10-11 14:00:14 +01:00
|
|
|
const uint8_t *vs_output_param_offset; /* GFX11+ */
|
2022-12-24 14:55:29 +08:00
|
|
|
bool has_param_exports;
|
2022-10-14 17:15:39 +01:00
|
|
|
bool can_cull;
|
|
|
|
|
bool disable_streamout;
|
2022-11-03 09:02:14 +01:00
|
|
|
bool has_gen_prim_query;
|
|
|
|
|
bool has_xfb_prim_query;
|
2022-12-24 14:55:29 +08:00
|
|
|
bool kill_pointsize;
|
|
|
|
|
bool force_vrs;
|
2022-10-14 17:15:39 +01:00
|
|
|
|
|
|
|
|
/* VS */
|
|
|
|
|
unsigned num_vertices_per_primitive;
|
|
|
|
|
bool early_prim_export;
|
|
|
|
|
bool passthrough;
|
|
|
|
|
bool use_edgeflags;
|
2022-12-24 14:55:29 +08:00
|
|
|
bool export_primitive_id;
|
2022-10-14 17:15:39 +01:00
|
|
|
uint32_t instance_rate_inputs;
|
|
|
|
|
uint32_t user_clip_plane_enable_mask;
|
|
|
|
|
|
|
|
|
|
/* GS */
|
|
|
|
|
unsigned gs_out_vtx_bytes;
|
|
|
|
|
} ac_nir_lower_ngg_options;
|
|
|
|
|
|
2021-10-01 10:00:25 +02:00
|
|
|
void
|
2022-10-14 17:15:39 +01:00
|
|
|
ac_nir_lower_ngg_nogs(nir_shader *shader, const ac_nir_lower_ngg_options *options);
|
2021-04-09 16:56:57 +02:00
|
|
|
|
2021-04-22 14:43:54 +02:00
|
|
|
void
|
2022-10-14 17:15:39 +01:00
|
|
|
ac_nir_lower_ngg_gs(nir_shader *shader, const ac_nir_lower_ngg_options *options);
|
2021-04-22 14:43:54 +02:00
|
|
|
|
2021-08-29 10:32:01 +02:00
|
|
|
void
|
|
|
|
|
ac_nir_lower_ngg_ms(nir_shader *shader,
|
2022-12-25 22:27:18 +08:00
|
|
|
enum amd_gfx_level gfx_level,
|
|
|
|
|
uint32_t clipdist_enable_mask,
|
|
|
|
|
const uint8_t *vs_output_param_offset,
|
|
|
|
|
bool has_param_exports,
|
2022-05-20 18:09:12 +02:00
|
|
|
bool *out_needs_scratch_ring,
|
2022-05-13 21:32:12 +02:00
|
|
|
unsigned wave_size,
|
|
|
|
|
bool multiview);
|
2021-08-29 10:32:01 +02:00
|
|
|
|
2022-01-15 13:56:13 +01:00
|
|
|
void
|
|
|
|
|
ac_nir_lower_task_outputs_to_mem(nir_shader *shader,
|
|
|
|
|
unsigned task_payload_entry_bytes,
|
|
|
|
|
unsigned task_num_entries);
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ac_nir_lower_mesh_inputs_to_mem(nir_shader *shader,
|
|
|
|
|
unsigned task_payload_entry_bytes,
|
|
|
|
|
unsigned task_num_entries);
|
|
|
|
|
|
2022-08-09 21:47:11 +08:00
|
|
|
nir_ssa_def *
|
2022-06-06 17:06:41 +08:00
|
|
|
ac_nir_cull_primitive(nir_builder *b,
|
|
|
|
|
nir_ssa_def *initially_accepted,
|
|
|
|
|
nir_ssa_def *pos[3][4],
|
|
|
|
|
unsigned num_vertices,
|
|
|
|
|
ac_nir_cull_accepted accept_func,
|
|
|
|
|
void *state);
|
2021-04-01 12:43:31 +02:00
|
|
|
|
radv,ac/nir: lower global access to _amd global access intrinsics
fossil-db (Sienna Cichlid):
Totals from 400 (0.30% of 134621) affected shaders:
VGPRs: 18696 -> 18688 (-0.04%)
CodeSize: 2031348 -> 1946640 (-4.17%)
Instrs: 374703 -> 360226 (-3.86%)
Latency: 4200727 -> 4108628 (-2.19%); split: -2.20%, +0.01%
InvThroughput: 1059935 -> 1029441 (-2.88%); split: -2.88%, +0.00%
VClause: 5777 -> 5771 (-0.10%)
SClause: 11890 -> 10891 (-8.40%); split: -8.57%, +0.17%
Copies: 34035 -> 33259 (-2.28%); split: -2.98%, +0.70%
Branches: 11108 -> 11100 (-0.07%); split: -0.08%, +0.01%
PreSGPRs: 15999 -> 15942 (-0.36%); split: -0.44%, +0.08%
PreVGPRs: 16994 -> 16970 (-0.14%)
fossil-db (Polaris10):
Totals from 400 (0.29% of 135668) affected shaders:
SGPRs: 23799 -> 22919 (-3.70%); split: -4.30%, +0.61%
VGPRs: 18480 -> 18472 (-0.04%)
CodeSize: 2090316 -> 2041592 (-2.33%)
Instrs: 395461 -> 385747 (-2.46%); split: -2.46%, +0.00%
Latency: 5045768 -> 5020196 (-0.51%); split: -0.53%, +0.02%
InvThroughput: 2694320 -> 2689886 (-0.16%); split: -0.23%, +0.07%
VClause: 5982 -> 5968 (-0.23%)
SClause: 12064 -> 10823 (-10.29%); split: -10.33%, +0.04%
Copies: 48233 -> 48322 (+0.18%); split: -0.47%, +0.65%
PreSGPRs: 16409 -> 16358 (-0.31%); split: -0.39%, +0.08%
fossil-db (Pitcairn):
Totals from 400 (0.29% of 135668) affected shaders:
SGPRs: 22431 -> 22215 (-0.96%); split: -2.60%, +1.64%
VGPRs: 18776 -> 18560 (-1.15%); split: -1.21%, +0.06%
CodeSize: 2104440 -> 2017708 (-4.12%)
MaxWaves: 2363 -> 2367 (+0.17%)
Instrs: 413099 -> 397446 (-3.79%)
Latency: 5507707 -> 5450251 (-1.04%); split: -1.12%, +0.07%
InvThroughput: 2838867 -> 2786903 (-1.83%); split: -1.83%, +0.00%
VClause: 10334 -> 10097 (-2.29%)
SClause: 12346 -> 11005 (-10.86%); split: -10.89%, +0.02%
Copies: 54034 -> 52065 (-3.64%); split: -3.99%, +0.35%
PreSGPRs: 17916 -> 17857 (-0.33%); split: -0.40%, +0.07%
PreVGPRs: 16917 -> 16893 (-0.14%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14124>
2021-12-02 14:35:15 +00:00
|
|
|
bool
|
|
|
|
|
ac_nir_lower_global_access(nir_shader *shader);
|
|
|
|
|
|
2022-07-20 11:23:26 -04:00
|
|
|
bool ac_nir_lower_resinfo(nir_shader *nir, enum amd_gfx_level gfx_level);
|
2022-10-28 17:21:07 -04:00
|
|
|
bool ac_nir_lower_image_opcodes(nir_shader *nir);
|
2022-07-20 11:23:26 -04:00
|
|
|
|
2022-11-30 17:57:37 +08:00
|
|
|
typedef struct ac_nir_gs_output_info {
|
|
|
|
|
const uint8_t *streams;
|
|
|
|
|
const uint8_t *streams_16bit_lo;
|
|
|
|
|
const uint8_t *streams_16bit_hi;
|
|
|
|
|
|
|
|
|
|
const uint8_t *usage_mask;
|
|
|
|
|
const uint8_t *usage_mask_16bit_lo;
|
|
|
|
|
const uint8_t *usage_mask_16bit_hi;
|
2022-12-01 16:48:16 +08:00
|
|
|
|
2022-12-02 11:53:22 +08:00
|
|
|
/* type for each 16bit slot component */
|
|
|
|
|
nir_alu_type (*types_16bit_lo)[4];
|
|
|
|
|
nir_alu_type (*types_16bit_hi)[4];
|
2022-11-30 17:57:37 +08:00
|
|
|
} ac_nir_gs_output_info;
|
|
|
|
|
|
2022-09-30 19:29:43 +01:00
|
|
|
nir_shader *
|
|
|
|
|
ac_nir_create_gs_copy_shader(const nir_shader *gs_nir,
|
2022-12-23 20:58:59 +08:00
|
|
|
enum amd_gfx_level gfx_level,
|
|
|
|
|
uint32_t clip_cull_mask,
|
|
|
|
|
const uint8_t *param_offsets,
|
|
|
|
|
bool has_param_exports,
|
2022-11-22 14:25:52 +08:00
|
|
|
bool disable_streamout,
|
2022-12-23 20:58:59 +08:00
|
|
|
bool kill_pointsize,
|
|
|
|
|
bool force_vrs,
|
2022-12-01 16:48:16 +08:00
|
|
|
ac_nir_gs_output_info *output_info);
|
2022-09-30 19:29:43 +01:00
|
|
|
|
|
|
|
|
void
|
2022-12-23 17:17:54 +08:00
|
|
|
ac_nir_lower_legacy_vs(nir_shader *nir,
|
|
|
|
|
enum amd_gfx_level gfx_level,
|
|
|
|
|
uint32_t clip_cull_mask,
|
|
|
|
|
const uint8_t *param_offsets,
|
|
|
|
|
bool has_param_exports,
|
|
|
|
|
bool export_primitive_id,
|
|
|
|
|
bool disable_streamout,
|
|
|
|
|
bool kill_pointsize,
|
|
|
|
|
bool force_vrs);
|
2022-09-30 19:29:43 +01:00
|
|
|
|
2022-11-30 16:49:11 +08:00
|
|
|
bool
|
|
|
|
|
ac_nir_gs_shader_query(nir_builder *b,
|
|
|
|
|
bool has_gen_prim_query,
|
|
|
|
|
bool has_pipeline_stats_query,
|
|
|
|
|
unsigned num_vertices_per_primitive,
|
|
|
|
|
unsigned wave_size,
|
|
|
|
|
nir_ssa_def *vertex_count[4],
|
|
|
|
|
nir_ssa_def *primitive_count[4]);
|
|
|
|
|
|
2022-11-30 17:57:37 +08:00
|
|
|
void
|
|
|
|
|
ac_nir_lower_legacy_gs(nir_shader *nir,
|
|
|
|
|
bool has_gen_prim_query,
|
|
|
|
|
bool has_pipeline_stats_query,
|
|
|
|
|
ac_nir_gs_output_info *output_info);
|
|
|
|
|
|
2022-10-29 17:25:00 -04:00
|
|
|
typedef struct {
|
|
|
|
|
/* Which load instructions to lower depending on whether the number of
|
|
|
|
|
* components being loaded is 1 or more than 1.
|
|
|
|
|
*/
|
|
|
|
|
nir_variable_mode modes_1_comp; /* lower 1-component loads for these */
|
|
|
|
|
nir_variable_mode modes_N_comps; /* lower multi-component loads for these */
|
|
|
|
|
} ac_nir_lower_subdword_options;
|
|
|
|
|
|
|
|
|
|
bool ac_nir_lower_subdword_loads(nir_shader *nir, ac_nir_lower_subdword_options options);
|
|
|
|
|
|
2023-02-25 21:14:52 +08:00
|
|
|
typedef struct {
|
|
|
|
|
enum radeon_family family;
|
|
|
|
|
enum amd_gfx_level gfx_level;
|
|
|
|
|
|
2023-04-23 13:14:19 +08:00
|
|
|
bool use_aco;
|
2023-02-25 21:14:52 +08:00
|
|
|
bool uses_discard;
|
|
|
|
|
bool alpha_to_coverage_via_mrtz;
|
|
|
|
|
bool dual_src_blend_swizzle;
|
|
|
|
|
unsigned spi_shader_col_format;
|
|
|
|
|
unsigned color_is_int8;
|
|
|
|
|
unsigned color_is_int10;
|
|
|
|
|
|
2023-03-02 20:08:14 +08:00
|
|
|
bool bc_optimize_for_persp;
|
|
|
|
|
bool bc_optimize_for_linear;
|
2023-03-02 20:56:48 +08:00
|
|
|
bool force_persp_sample_interp;
|
|
|
|
|
bool force_linear_sample_interp;
|
|
|
|
|
bool force_persp_center_interp;
|
|
|
|
|
bool force_linear_center_interp;
|
2023-03-02 21:23:44 +08:00
|
|
|
unsigned samplemask_log_ps_iter;
|
2023-03-02 20:08:14 +08:00
|
|
|
|
2023-02-25 21:14:52 +08:00
|
|
|
/* OpenGL only */
|
|
|
|
|
bool clamp_color;
|
|
|
|
|
bool alpha_to_one;
|
|
|
|
|
enum pipe_compare_func alpha_func;
|
|
|
|
|
unsigned broadcast_last_cbuf;
|
|
|
|
|
|
|
|
|
|
/* Vulkan only */
|
|
|
|
|
unsigned enable_mrt_output_nan_fixup;
|
2023-03-29 11:50:18 +08:00
|
|
|
bool no_color_export;
|
2023-02-25 21:14:52 +08:00
|
|
|
} ac_nir_lower_ps_options;
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ac_nir_lower_ps(nir_shader *nir, const ac_nir_lower_ps_options *options);
|
|
|
|
|
|
2023-04-05 16:58:43 +01:00
|
|
|
typedef struct {
|
|
|
|
|
enum amd_gfx_level gfx_level;
|
2023-04-25 15:37:02 +01:00
|
|
|
|
|
|
|
|
/* If true, round the layer component of the coordinates source to the nearest
|
|
|
|
|
* integer for all array ops.
|
|
|
|
|
*/
|
|
|
|
|
bool lower_array_layer_round_even;
|
2023-04-05 16:58:43 +01:00
|
|
|
} ac_nir_lower_tex_options;
|
|
|
|
|
|
|
|
|
|
bool
|
|
|
|
|
ac_nir_lower_tex(nir_shader *nir, const ac_nir_lower_tex_options *options);
|
|
|
|
|
|
2021-02-09 19:19:53 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif /* AC_NIR_H */
|