#include "nir_opcodes.h"
+#if defined(_WIN32) && !defined(snprintf)
+#define snprintf _snprintf
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
typedef union {
float f32[4];
double f64[4];
+ int8_t i8[4];
+ uint8_t u8[4];
+ int16_t i16[4];
+ uint16_t u16[4];
int32_t i32[4];
uint32_t u32[4];
int64_t i64[4];
const struct nir_shader_compiler_options *options;
/** Various bits of compile-time information about a given shader */
- struct shader_info *info;
+ struct shader_info info;
/** list of global variables in the shader (nir_variable) */
struct exec_list globals;
*/
nir_lower_io_force_sample_interpolation = (1 << 1),
} nir_lower_io_options;
-void nir_lower_io(nir_shader *shader,
+bool nir_lower_io(nir_shader *shader,
nir_variable_mode modes,
int (*type_size)(const struct glsl_type *),
nir_lower_io_options);
bool nir_is_per_vertex_io(nir_variable *var, gl_shader_stage stage);
void nir_lower_io_types(nir_shader *shader);
-void nir_lower_regs_to_ssa_impl(nir_function_impl *impl);
-void nir_lower_regs_to_ssa(nir_shader *shader);
+bool nir_lower_regs_to_ssa_impl(nir_function_impl *impl);
+bool nir_lower_regs_to_ssa(nir_shader *shader);
bool nir_lower_vars_to_ssa(nir_shader *shader);
bool nir_remove_dead_variables(nir_shader *shader, nir_variable_mode modes);
bool nir_lower_wpos_ytransform(nir_shader *shader,
const nir_lower_wpos_ytransform_options *options);
-bool nir_lower_wpos_center(nir_shader *shader);
+bool nir_lower_wpos_center(nir_shader *shader, const bool for_sample_shading);
typedef struct nir_lower_drawpixels_options {
int texcoord_state_tokens[5];
bool nir_lower_atomics(nir_shader *shader,
const struct gl_shader_program *shader_program);
+bool nir_lower_atomics_to_ssbo(nir_shader *shader, unsigned ssbo_offset);
bool nir_lower_to_source_mods(nir_shader *shader);
bool nir_lower_gs_intrinsics(nir_shader *shader);
* registers. If false, convert all values (even those not involved in a phi
* node) to registers.
*/
-void nir_convert_from_ssa(nir_shader *shader, bool phi_webs_only);
+bool nir_convert_from_ssa(nir_shader *shader, bool phi_webs_only);
bool nir_lower_phis_to_regs_block(nir_block *block);
bool nir_lower_ssa_defs_to_regs_block(nir_block *block);
bool nir_opt_algebraic(nir_shader *shader);
+bool nir_opt_algebraic_before_ffma(nir_shader *shader);
bool nir_opt_algebraic_late(nir_shader *shader);
bool nir_opt_constant_folding(nir_shader *shader);