#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "pan_bo.h"
#include "pan_context.h"
+#include "pan_util.h"
#include "compiler/nir/nir.h"
#include "nir/tgsi_to_nir.h"
s->info.stage = stage;
- if (stage == MESA_SHADER_FRAGMENT) {
- /* Inject the alpha test now if we need to */
-
- if (state->alpha_state.enabled) {
- NIR_PASS_V(s, nir_lower_alpha_test, state->alpha_state.func, false);
- }
- }
-
/* Call out to Midgard compiler given the above NIR */
midgard_program program = {
.alpha_ref = state->alpha_state.ref_value
};
- midgard_compile_shader_nir(&ctx->compiler, s, &program, false);
+ midgard_compile_shader_nir(s, &program, false, 0, screen->gpu_id,
+ pan_debug & PAN_DBG_PRECOMPILE);
/* Prepare the compiled binary for upload */
int size = program.compiled.size;
state->writes_point_size = program.writes_point_size;
state->reads_point_coord = false;
state->helper_invocations = s->info.fs.needs_helper_invocations;
+ state->stack_size = program.tls_size;
if (outputs_written)
*outputs_written = s->info.outputs_written;