#include "util/ralloc.h"
#include "brw_context.h"
#include "brw_cs.h"
-#include "brw_eu.h"
#include "brw_wm.h"
-#include "brw_shader.h"
#include "intel_mipmap_tree.h"
#include "brw_state.h"
#include "intel_batchbuffer.h"
-#include "brw_nir.h"
+#include "compiler/brw_nir.h"
#include "brw_program.h"
#include "compiler/glsl/ir_uniform.h"
static bool
brw_codegen_cs_prog(struct brw_context *brw,
- struct gl_shader_program *prog,
struct brw_program *cp,
struct brw_cs_prog_key *key)
{
memset(&prog_data, 0, sizeof(prog_data));
if (cp->program.info.cs.shared_size > 64 * 1024) {
- cp->program.sh.data->LinkStatus = false;
+ cp->program.sh.data->LinkStatus = linking_failure;
const char *error_str =
"Compute shader used more than 64KB of shared variables";
ralloc_strcat(&cp->program.sh.data->InfoLog, error_str);
if (unlikely(brw->perf_debug)) {
start_busy = (brw->batch.last_bo &&
- drm_intel_bo_busy(brw->batch.last_bo));
+ brw_bo_busy(brw->batch.last_bo));
start_time = get_time();
}
&prog_data, cp->program.nir, st_index,
&program_size, &error_str);
if (program == NULL) {
- cp->program.sh.data->LinkStatus = false;
+ cp->program.sh.data->LinkStatus = linking_failure;
ralloc_strcat(&cp->program.sh.data->InfoLog, error_str);
_mesa_problem(NULL, "Failed to compile compute shader: %s\n", error_str);
}
cp->compiled_once = true;
- if (start_busy && !drm_intel_bo_busy(brw->batch.last_bo)) {
+ if (start_busy && !brw_bo_busy(brw->batch.last_bo)) {
perf_debug("CS compile took %.03f ms and stalled the GPU\n",
(get_time() - start_time) * 1000);
}
&key, sizeof(key),
&brw->cs.base.prog_offset,
&brw->cs.base.prog_data)) {
- bool success =
- brw_codegen_cs_prog(brw,
- ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE],
- cp, &key);
+ bool success = brw_codegen_cs_prog(brw, cp, &key);
(void) success;
assert(success);
}
bool
-brw_cs_precompile(struct gl_context *ctx,
- struct gl_shader_program *shader_prog,
- struct gl_program *prog)
+brw_cs_precompile(struct gl_context *ctx, struct gl_program *prog)
{
struct brw_context *brw = brw_context(ctx);
struct brw_cs_prog_key key;
uint32_t old_prog_offset = brw->cs.base.prog_offset;
struct brw_stage_prog_data *old_prog_data = brw->cs.base.prog_data;
- bool success = brw_codegen_cs_prog(brw, shader_prog, bcp, &key);
+ bool success = brw_codegen_cs_prog(brw, bcp, &key);
brw->cs.base.prog_offset = old_prog_offset;
brw->cs.base.prog_data = old_prog_data;