return op;
}
+static const nir_shader_compiler_options g80_nir_shader_compiler_options =
+nvir_nir_shader_compiler_options(NVISA_G80_CHIPSET);
static const nir_shader_compiler_options gf100_nir_shader_compiler_options =
nvir_nir_shader_compiler_options(NVISA_GF100_CHIPSET);
static const nir_shader_compiler_options gm107_nir_shader_compiler_options =
return &gv100_nir_shader_compiler_options;
if (chipset >= NVISA_GM107_CHIPSET)
return &gm107_nir_shader_compiler_options;
- return &gf100_nir_shader_compiler_options;
+ if (chipset >= NVISA_GF100_CHIPSET)
+ return &gf100_nir_shader_compiler_options;
+ return &g80_nir_shader_compiler_options;
}
#include "util/format/u_format_s3tc.h"
#include "util/u_screen.h"
#include "pipe/p_screen.h"
-#include "compiler/nir/nir.h"
+
+#include "codegen/nv50_ir_driver.h"
#include "nv50/nv50_context.h"
#include "nv50/nv50_screen.h"
return 1;
}
-static const nir_shader_compiler_options nir_options = {
- .fuse_ffma16 = false, /* nir doesn't track mad vs fma */
- .fuse_ffma32 = false, /* nir doesn't track mad vs fma */
- .fuse_ffma64 = false, /* nir doesn't track mad vs fma */
- .lower_flrp32 = true,
- .lower_flrp64 = true,
- .lower_fpow = false,
- .lower_uadd_carry = true,
- .lower_usub_borrow = true,
- .lower_ffract = true,
- .lower_pack_half_2x16 = true,
- .lower_pack_unorm_2x16 = true,
- .lower_pack_snorm_2x16 = true,
- .lower_pack_unorm_4x8 = true,
- .lower_pack_snorm_4x8 = true,
- .lower_unpack_half_2x16 = true,
- .lower_unpack_unorm_2x16 = true,
- .lower_unpack_snorm_2x16 = true,
- .lower_unpack_unorm_4x8 = true,
- .lower_unpack_snorm_4x8 = true,
- .lower_extract_byte = true,
- .lower_extract_word = true,
- .lower_insert_byte = true,
- .lower_insert_word = true,
- .lower_all_io_to_temps = false,
- .lower_cs_local_index_from_id = true,
- .lower_rotate = true,
- .lower_to_scalar = true,
- .use_interpolated_input_intrinsics = true,
- .max_unroll_iterations = 32,
-};
-
static const void *
nv50_screen_get_compiler_options(struct pipe_screen *pscreen,
enum pipe_shader_ir ir,
enum pipe_shader_type shader)
{
if (ir == PIPE_SHADER_IR_NIR)
- return &nir_options;
+ return nv50_ir_nir_shader_compiler_options(NVISA_G80_CHIPSET);
return NULL;
}