#include "compiler/glsl/gl_nir.h"
#include "compiler/nir_types.h"
-#include "lima_program.h"
#include "lima_context.h"
+#include "lima_program.h"
#include "ir/lima_ir.h"
#include "standalone/glsl.h"
NIR_PASS_V(nir, nir_lower_var_copies);
nir_print_shader(nir, stdout);
NIR_PASS_V(nir, gl_nir_lower_atomics, prog, true);
- NIR_PASS_V(nir, nir_lower_atomics_to_ssbo, 8);
+ NIR_PASS_V(nir, nir_lower_atomics_to_ssbo);
nir_print_shader(nir, stdout);
switch (stage) {
return -1;
}
+ struct nir_lower_tex_options tex_options = {
+ .lower_txp = ~0u,
+ };
+
nir_shader *nir = load_glsl(1, filename, stage);
switch (stage) {
nir_print_shader(nir, stdout);
struct lima_vs_shader_state *vs = ralloc(nir, struct lima_vs_shader_state);
- gpir_compile_nir(vs, nir);
+ gpir_compile_nir(vs, nir, NULL);
break;
case MESA_SHADER_FRAGMENT:
- lima_program_optimize_fs_nir(nir);
+ lima_program_optimize_fs_nir(nir, &tex_options);
nir_print_shader(nir, stdout);
struct lima_fs_shader_state *so = rzalloc(NULL, struct lima_fs_shader_state);
struct ra_regs *ra = ppir_regalloc_init(NULL);
- ppir_compile_nir(so, nir, ra);
+ ppir_compile_nir(so, nir, ra, NULL);
break;
default:
errx(1, "unhandled shader stage: %d", stage);