summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2017-10-21 20:55:45 -0700
committerJordan Justen <[email protected]>2017-10-31 23:36:54 -0700
commit3dcbc5cdaa871f6ad2f123d0eb81f32fbfa7070b (patch)
tree6137559d5559d21079427054a04939faf46ce7ef /src/mesa/drivers
parent540636045fc4893d19f68f04157ce246a2ccbebe (diff)
intel/compiler: Remove final_program_size from brw_compile_*
The caller can now use brw_stage_prog_data::program_size which is set by the brw_compile_* functions. Cc: Jason Ekstrand <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_cs.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_tcs.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_tes.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c11
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c5
6 files changed, 15 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c
index be7680def7c..1a0e9f62c63 100644
--- a/src/mesa/drivers/dri/i965/brw_cs.c
+++ b/src/mesa/drivers/dri/i965/brw_cs.c
@@ -55,7 +55,6 @@ brw_codegen_cs_prog(struct brw_context *brw,
const struct gen_device_info *devinfo = &brw->screen->devinfo;
const GLuint *program;
void *mem_ctx = ralloc_context(NULL);
- GLuint program_size;
struct brw_cs_prog_data prog_data;
bool start_busy = false;
double start_time = 0;
@@ -93,7 +92,7 @@ brw_codegen_cs_prog(struct brw_context *brw,
char *error_str;
program = brw_compile_cs(brw->screen->compiler, brw, mem_ctx, key,
&prog_data, cp->program.nir, st_index,
- &program_size, &error_str);
+ &error_str);
if (program == NULL) {
cp->program.sh.data->LinkStatus = linking_failure;
ralloc_strcat(&cp->program.sh.data->InfoLog, error_str);
@@ -144,7 +143,7 @@ brw_codegen_cs_prog(struct brw_context *brw,
ralloc_steal(NULL, prog_data.base.pull_param);
brw_upload_cache(&brw->cache, BRW_CACHE_CS_PROG,
key, sizeof(*key),
- program, program_size,
+ program, prog_data.base.program_size,
&prog_data, sizeof(prog_data),
&brw->cs.base.prog_offset, &brw->cs.base.prog_data);
ralloc_free(mem_ctx);
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 007629cbbbe..e6e757ce686 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -112,12 +112,11 @@ brw_codegen_gs_prog(struct brw_context *brw,
start_time = get_time();
}
- unsigned program_size;
char *error_str;
const unsigned *program =
brw_compile_gs(brw->screen->compiler, brw, mem_ctx, key,
&prog_data, gp->program.nir, &gp->program,
- st_index, &program_size, &error_str);
+ st_index, &error_str);
if (program == NULL) {
ralloc_strcat(&gp->program.sh.data->InfoLog, error_str);
_mesa_problem(NULL, "Failed to compile geometry shader: %s\n", error_str);
@@ -147,7 +146,7 @@ brw_codegen_gs_prog(struct brw_context *brw,
ralloc_steal(NULL, prog_data.base.base.pull_param);
brw_upload_cache(&brw->cache, BRW_CACHE_GS_PROG,
key, sizeof(*key),
- program, program_size,
+ program, prog_data.base.base.program_size,
&prog_data, sizeof(prog_data),
&stage_state->prog_offset, &brw->gs.base.prog_data);
ralloc_free(mem_ctx);
diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c
index 6c9cb153d31..5ac728ee68f 100644
--- a/src/mesa/drivers/dri/i965/brw_tcs.c
+++ b/src/mesa/drivers/dri/i965/brw_tcs.c
@@ -226,11 +226,10 @@ brw_codegen_tcs_prog(struct brw_context *brw, struct brw_program *tcp,
start_time = get_time();
}
- unsigned program_size;
char *error_str;
const unsigned *program =
brw_compile_tcs(compiler, brw, mem_ctx, key, &prog_data, nir, st_index,
- &program_size, &error_str);
+ &error_str);
if (program == NULL) {
if (tep) {
tep->program.sh.data->LinkStatus = linking_failure;
@@ -268,7 +267,7 @@ brw_codegen_tcs_prog(struct brw_context *brw, struct brw_program *tcp,
ralloc_steal(NULL, prog_data.base.base.pull_param);
brw_upload_cache(&brw->cache, BRW_CACHE_TCS_PROG,
key, sizeof(*key),
- program, program_size,
+ program, prog_data.base.base.program_size,
&prog_data, sizeof(prog_data),
&stage_state->prog_offset, &brw->tcs.base.prog_data);
ralloc_free(mem_ctx);
diff --git a/src/mesa/drivers/dri/i965/brw_tes.c b/src/mesa/drivers/dri/i965/brw_tes.c
index 47f3b510a54..21f44ae74af 100644
--- a/src/mesa/drivers/dri/i965/brw_tes.c
+++ b/src/mesa/drivers/dri/i965/brw_tes.c
@@ -101,11 +101,10 @@ brw_codegen_tes_prog(struct brw_context *brw,
brw_compute_tess_vue_map(&input_vue_map, key->inputs_read,
key->patch_inputs_read);
- unsigned program_size;
char *error_str;
const unsigned *program =
brw_compile_tes(compiler, brw, mem_ctx, key, &input_vue_map, &prog_data,
- nir, &tep->program, st_index, &program_size, &error_str);
+ nir, &tep->program, st_index, &error_str);
if (program == NULL) {
tep->program.sh.data->LinkStatus = linking_failure;
ralloc_strcat(&tep->program.sh.data->InfoLog, error_str);
@@ -138,7 +137,7 @@ brw_codegen_tes_prog(struct brw_context *brw,
ralloc_steal(NULL, prog_data.base.base.pull_param);
brw_upload_cache(&brw->cache, BRW_CACHE_TES_PROG,
key, sizeof(*key),
- program, program_size,
+ program, prog_data.base.base.program_size,
&prog_data, sizeof(prog_data),
&stage_state->prog_offset, &brw->tes.base.prog_data);
ralloc_free(mem_ctx);
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index fb5ea4e7ed1..d308bb83332 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -159,7 +159,6 @@ brw_codegen_vs_prog(struct brw_context *brw,
{
const struct brw_compiler *compiler = brw->screen->compiler;
const struct gen_device_info *devinfo = &brw->screen->devinfo;
- GLuint program_size;
const GLuint *program;
struct brw_vs_prog_data prog_data;
struct brw_stage_prog_data *stage_prog_data = &prog_data.base.base;
@@ -223,7 +222,7 @@ brw_codegen_vs_prog(struct brw_context *brw,
program = brw_compile_vs(compiler, brw, mem_ctx, key, &prog_data,
vp->program.nir,
!_mesa_is_gles3(&brw->ctx),
- st_index, &program_size, &error_str);
+ st_index, &error_str);
if (program == NULL) {
if (!vp->program.is_arb_asm) {
vp->program.sh.data->LinkStatus = linking_failure;
@@ -256,10 +255,10 @@ brw_codegen_vs_prog(struct brw_context *brw,
ralloc_steal(NULL, prog_data.base.base.param);
ralloc_steal(NULL, prog_data.base.base.pull_param);
brw_upload_cache(&brw->cache, BRW_CACHE_VS_PROG,
- key, sizeof(struct brw_vs_prog_key),
- program, program_size,
- &prog_data, sizeof(prog_data),
- &brw->vs.base.prog_offset, &brw->vs.base.prog_data);
+ key, sizeof(struct brw_vs_prog_key),
+ program, prog_data.base.base.program_size,
+ &prog_data, sizeof(prog_data),
+ &brw->vs.base.prog_offset, &brw->vs.base.prog_data);
ralloc_free(mem_ctx);
return true;
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 2105d1a8f1e..4144cd11ee4 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -141,7 +141,6 @@ brw_codegen_wm_prog(struct brw_context *brw,
void *mem_ctx = ralloc_context(NULL);
struct brw_wm_prog_data prog_data;
const GLuint *program;
- GLuint program_size;
bool start_busy = false;
double start_time = 0;
@@ -185,7 +184,7 @@ brw_codegen_wm_prog(struct brw_context *brw,
key, &prog_data, fp->program.nir,
&fp->program, st_index8, st_index16,
true, false, vue_map,
- &program_size, &error_str);
+ &error_str);
if (program == NULL) {
if (!fp->program.is_arb_asm) {
@@ -222,7 +221,7 @@ brw_codegen_wm_prog(struct brw_context *brw,
ralloc_steal(NULL, prog_data.base.pull_param);
brw_upload_cache(&brw->cache, BRW_CACHE_FS_PROG,
key, sizeof(struct brw_wm_prog_key),
- program, program_size,
+ program, prog_data.base.program_size,
&prog_data, sizeof(prog_data),
&brw->wm.base.prog_offset, &brw->wm.base.prog_data);