diff options
author | Jordan Justen <[email protected]> | 2017-10-21 20:55:45 -0700 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2017-10-31 23:36:54 -0700 |
commit | 3dcbc5cdaa871f6ad2f123d0eb81f32fbfa7070b (patch) | |
tree | 6137559d5559d21079427054a04939faf46ce7ef /src/intel/blorp | |
parent | 540636045fc4893d19f68f04157ce246a2ccbebe (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/intel/blorp')
-rw-r--r-- | src/intel/blorp/blorp.c | 10 | ||||
-rw-r--r-- | src/intel/blorp/blorp_blit.c | 5 | ||||
-rw-r--r-- | src/intel/blorp/blorp_clear.c | 15 | ||||
-rw-r--r-- | src/intel/blorp/blorp_priv.h | 6 |
4 files changed, 14 insertions, 22 deletions
diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c index 7cc6335f2f6..5faba75b8db 100644 --- a/src/intel/blorp/blorp.c +++ b/src/intel/blorp/blorp.c @@ -162,8 +162,7 @@ blorp_compile_fs(struct blorp_context *blorp, void *mem_ctx, struct nir_shader *nir, struct brw_wm_prog_key *wm_key, bool use_repclear, - struct brw_wm_prog_data *wm_prog_data, - unsigned *program_size) + struct brw_wm_prog_data *wm_prog_data) { const struct brw_compiler *compiler = blorp->compiler; @@ -194,7 +193,7 @@ blorp_compile_fs(struct blorp_context *blorp, void *mem_ctx, const unsigned *program = brw_compile_fs(compiler, blorp->driver_ctx, mem_ctx, wm_key, wm_prog_data, nir, NULL, -1, -1, false, use_repclear, - NULL, program_size, NULL); + NULL, NULL); return program; } @@ -202,8 +201,7 @@ blorp_compile_fs(struct blorp_context *blorp, void *mem_ctx, const unsigned * blorp_compile_vs(struct blorp_context *blorp, void *mem_ctx, struct nir_shader *nir, - struct brw_vs_prog_data *vs_prog_data, - unsigned *program_size) + struct brw_vs_prog_data *vs_prog_data) { const struct brw_compiler *compiler = blorp->compiler; @@ -225,7 +223,7 @@ blorp_compile_vs(struct blorp_context *blorp, void *mem_ctx, const unsigned *program = brw_compile_vs(compiler, blorp->driver_ctx, mem_ctx, &vs_key, vs_prog_data, nir, - false, -1, program_size, NULL); + false, -1, NULL); return program; } diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c index 4507046dae5..9b5c1f1f8c1 100644 --- a/src/intel/blorp/blorp_blit.c +++ b/src/intel/blorp/blorp_blit.c @@ -1308,7 +1308,6 @@ brw_blorp_get_blit_kernel(struct blorp_context *blorp, void *mem_ctx = ralloc_context(NULL); const unsigned *program; - unsigned program_size; struct brw_wm_prog_data prog_data; nir_shader *nir = brw_blorp_build_nir_shader(blorp, mem_ctx, prog_key); @@ -1322,11 +1321,11 @@ brw_blorp_get_blit_kernel(struct blorp_context *blorp, wm_key.multisample_fbo = prog_key->rt_samples > 1; program = blorp_compile_fs(blorp, mem_ctx, nir, &wm_key, false, - &prog_data, &program_size); + &prog_data); bool result = blorp->upload_shader(blorp, prog_key, sizeof(*prog_key), - program, program_size, + program, prog_data.base.program_size, &prog_data.base, sizeof(prog_data), ¶ms->wm_prog_kernel, ¶ms->wm_prog_data); diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c index cd83fa13caf..8d758df155f 100644 --- a/src/intel/blorp/blorp_clear.c +++ b/src/intel/blorp/blorp_clear.c @@ -75,14 +75,13 @@ blorp_params_get_clear_kernel(struct blorp_context *blorp, brw_blorp_init_wm_prog_key(&wm_key); struct brw_wm_prog_data prog_data; - unsigned program_size; const unsigned *program = blorp_compile_fs(blorp, mem_ctx, b.shader, &wm_key, use_replicated_data, - &prog_data, &program_size); + &prog_data); bool result = blorp->upload_shader(blorp, &blorp_key, sizeof(blorp_key), - program, program_size, + program, prog_data.base.program_size, &prog_data.base, sizeof(prog_data), ¶ms->wm_prog_kernel, ¶ms->wm_prog_data); @@ -167,13 +166,12 @@ blorp_params_get_layer_offset_vs(struct blorp_context *blorp, struct brw_vs_prog_data vs_prog_data; memset(&vs_prog_data, 0, sizeof(vs_prog_data)); - unsigned program_size; const unsigned *program = - blorp_compile_vs(blorp, mem_ctx, b.shader, &vs_prog_data, &program_size); + blorp_compile_vs(blorp, mem_ctx, b.shader, &vs_prog_data); bool result = blorp->upload_shader(blorp, &blorp_key, sizeof(blorp_key), - program, program_size, + program, vs_prog_data.base.base.program_size, &vs_prog_data.base.base, sizeof(vs_prog_data), ¶ms->vs_prog_kernel, ¶ms->vs_prog_data); @@ -864,14 +862,13 @@ blorp_params_get_mcs_partial_resolve_kernel(struct blorp_context *blorp, wm_key.multisample_fbo = true; struct brw_wm_prog_data prog_data; - unsigned program_size; const unsigned *program = blorp_compile_fs(blorp, mem_ctx, b.shader, &wm_key, false, - &prog_data, &program_size); + &prog_data); bool result = blorp->upload_shader(blorp, &blorp_key, sizeof(blorp_key), - program, program_size, + program, prog_data.base.program_size, &prog_data.base, sizeof(prog_data), ¶ms->wm_prog_kernel, ¶ms->wm_prog_data); diff --git a/src/intel/blorp/blorp_priv.h b/src/intel/blorp/blorp_priv.h index c7d5d308da7..d91e436c1c5 100644 --- a/src/intel/blorp/blorp_priv.h +++ b/src/intel/blorp/blorp_priv.h @@ -342,14 +342,12 @@ blorp_compile_fs(struct blorp_context *blorp, void *mem_ctx, struct nir_shader *nir, struct brw_wm_prog_key *wm_key, bool use_repclear, - struct brw_wm_prog_data *wm_prog_data, - unsigned *program_size); + struct brw_wm_prog_data *wm_prog_data); const unsigned * blorp_compile_vs(struct blorp_context *blorp, void *mem_ctx, struct nir_shader *nir, - struct brw_vs_prog_data *vs_prog_data, - unsigned *program_size); + struct brw_vs_prog_data *vs_prog_data); bool blorp_ensure_sf_program(struct blorp_context *blorp, |