diff options
author | Timothy Arceri <[email protected]> | 2016-10-19 13:23:37 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-10-26 14:29:36 +1100 |
commit | 3423488d55b9c483fcdb3996eb89b424c1031d24 (patch) | |
tree | 270d90fe3fd4c090f2c8e59a3b20d0afe7d98e72 /src/mesa/drivers/dri/i965/brw_wm.c | |
parent | 17e28a1571b6141368fefc84cc8b0a3b4e52f8ee (diff) |
st/mesa/r200/i915/i965: eliminate gl_fragment_program
Here we move OriginUpperLeft and PixelCenterInteger into gl_program
all other fields have been replace by shader_info.
V2: Don't use anonymous union/structs to hold vertex/fragment fields
suggested by Ian.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index ce815254d58..851ba102ad2 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -99,14 +99,14 @@ brw_codegen_wm_prog(struct brw_context *brw, if (!prog) prog_data.base.use_alt_mode = true; - assign_fs_binding_table_offsets(devinfo, prog, - &fp->program.Base, key, &prog_data); + assign_fs_binding_table_offsets(devinfo, prog, &fp->program, key, + &prog_data); /* Allocate the references to the uniforms that will end up in the * prog_data associated with the compiled program, and which will be freed * by the state cache. */ - int param_count = fp->program.Base.nir->num_uniforms / 4; + int param_count = fp->program.nir->num_uniforms / 4; if (fs) prog_data.base.nr_image_params = fs->base.NumImages; /* The backend also sometimes adds params for texture size. */ @@ -121,10 +121,10 @@ brw_codegen_wm_prog(struct brw_context *brw, prog_data.base.nr_params = param_count; if (prog) { - brw_nir_setup_glsl_uniforms(fp->program.Base.nir, prog, &fp->program.Base, + brw_nir_setup_glsl_uniforms(fp->program.nir, prog, &fp->program, &prog_data.base, true); } else { - brw_nir_setup_arb_uniforms(fp->program.Base.nir, &fp->program.Base, + brw_nir_setup_arb_uniforms(fp->program.nir, &fp->program, &prog_data.base); } @@ -135,18 +135,18 @@ brw_codegen_wm_prog(struct brw_context *brw, } if (unlikely(INTEL_DEBUG & DEBUG_WM)) - brw_dump_ir("fragment", prog, fs ? &fs->base : NULL, &fp->program.Base); + brw_dump_ir("fragment", prog, fs ? &fs->base : NULL, &fp->program); int st_index8 = -1, st_index16 = -1; if (INTEL_DEBUG & DEBUG_SHADER_TIME) { - st_index8 = brw_get_shader_time_index(brw, prog, &fp->program.Base, ST_FS8); - st_index16 = brw_get_shader_time_index(brw, prog, &fp->program.Base, ST_FS16); + st_index8 = brw_get_shader_time_index(brw, prog, &fp->program, ST_FS8); + st_index16 = brw_get_shader_time_index(brw, prog, &fp->program, ST_FS16); } char *error_str = NULL; program = brw_compile_fs(brw->screen->compiler, brw, mem_ctx, - key, &prog_data, fp->program.Base.nir, - &fp->program.Base, st_index8, st_index16, + key, &prog_data, fp->program.nir, + &fp->program, st_index8, st_index16, true, brw->use_rep_send, vue_map, &program_size, &error_str); @@ -601,8 +601,7 @@ brw_fs_precompile(struct gl_context *ctx, struct brw_context *brw = brw_context(ctx); struct brw_wm_prog_key key; - struct gl_fragment_program *fp = (struct gl_fragment_program *) prog; - struct brw_fragment_program *bfp = brw_fragment_program(fp); + struct brw_fragment_program *bfp = brw_fragment_program(prog); memset(&key, 0, sizeof(key)); @@ -625,7 +624,7 @@ brw_fs_precompile(struct gl_context *ctx, key.input_slots_valid = prog->info.inputs_read | VARYING_BIT_POS; } - brw_setup_tex_for_precompile(brw, &key.tex, &fp->Base); + brw_setup_tex_for_precompile(brw, &key.tex, prog); key.nr_color_regions = _mesa_bitcount_64(outputs_written & ~(BITFIELD64_BIT(FRAG_RESULT_DEPTH) | |