X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fdrivers%2Fdri%2Fi965%2Fbrw_cs.c;h=cc564a012b6d515f99012773b6f409413cbfdd6a;hb=8c47ccb13a198f4d38c772df1de457de34dde23e;hp=824e6e527f3f8b27aea5fd60512daa2765595643;hpb=2a4d169735fd4b76d60963561ac6878c703338f9;p=mesa.git diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c index 824e6e527f3..cc564a012b6 100644 --- a/src/mesa/drivers/dri/i965/brw_cs.c +++ b/src/mesa/drivers/dri/i965/brw_cs.c @@ -24,13 +24,11 @@ #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" @@ -51,7 +49,6 @@ assign_cs_binding_table_offsets(const struct gen_device_info *devinfo, 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) { @@ -67,7 +64,7 @@ brw_codegen_cs_prog(struct brw_context *brw, 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); @@ -107,7 +104,7 @@ brw_codegen_cs_prog(struct brw_context *brw, 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(); } @@ -120,7 +117,7 @@ brw_codegen_cs_prog(struct brw_context *brw, &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); @@ -134,7 +131,7 @@ brw_codegen_cs_prog(struct brw_context *brw, } 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); } @@ -215,10 +212,7 @@ brw_upload_cs_prog(struct brw_context *brw) &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); } @@ -226,9 +220,7 @@ brw_upload_cs_prog(struct brw_context *brw) 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; @@ -243,7 +235,7 @@ brw_cs_precompile(struct gl_context *ctx, 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;