diff options
author | Kenneth Graunke <[email protected]> | 2018-11-08 21:53:16 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2018-11-20 15:53:46 -0800 |
commit | 6a10dd08f4311c9d46231269fb35f7cf8cb124c7 (patch) | |
tree | 9d7c71f0926483622ff4200a5bb11c7aee7315f9 /src/mesa/drivers/dri/i965/brw_wm.c | |
parent | 0d17b685b1ff4c9ef03f5daacf99aac07a66bba5 (diff) |
i965: Use a 'nir' temporary rather than poking at brw_program
It's shorter and will also be useful when I adjust cloning soon.
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index fc64f38c156..8ca6b9a84e9 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -139,6 +139,8 @@ brw_codegen_wm_prog(struct brw_context *brw, bool start_busy = false; double start_time = 0; + nir_shader *nir = fp->program.nir; + memset(&prog_data, 0, sizeof(prog_data)); /* Use ALT floating point mode for ARB programs so that 0^0 == 1. */ @@ -148,13 +150,12 @@ brw_codegen_wm_prog(struct brw_context *brw, assign_fs_binding_table_offsets(devinfo, &fp->program, key, &prog_data); if (!fp->program.is_arb_asm) { - brw_nir_setup_glsl_uniforms(mem_ctx, fp->program.nir, &fp->program, + brw_nir_setup_glsl_uniforms(mem_ctx, nir, &fp->program, &prog_data.base, true); - brw_nir_analyze_ubo_ranges(brw->screen->compiler, fp->program.nir, + brw_nir_analyze_ubo_ranges(brw->screen->compiler, nir, NULL, prog_data.base.ubo_ranges); } else { - brw_nir_setup_arb_uniforms(mem_ctx, fp->program.nir, &fp->program, - &prog_data.base); + brw_nir_setup_arb_uniforms(mem_ctx, nir, &fp->program, &prog_data.base); if (unlikely(INTEL_DEBUG & DEBUG_WM)) brw_dump_arb_asm("fragment", &fp->program); @@ -178,7 +179,7 @@ brw_codegen_wm_prog(struct brw_context *brw, char *error_str = NULL; program = brw_compile_fs(brw->screen->compiler, brw, mem_ctx, - key, &prog_data, fp->program.nir, + key, &prog_data, nir, &fp->program, st_index8, st_index16, st_index32, true, false, vue_map, &error_str); |