diff options
author | Timothy Arceri <[email protected]> | 2016-11-04 09:25:36 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-01-06 11:21:42 +1100 |
commit | c46a630000a2539e38a448f24a456397ce201a2e (patch) | |
tree | a9c8fc697557c5821225c4001fbc33c84c64b09a /src/mesa/drivers | |
parent | 6e3f6097c995a74d4ce52f542413b01ff819c203 (diff) |
mesa: make _CurrentFragmentProgram a gl_program struct pointer
Making this point to a gl_program struct rather than a gl_shader_program
struct will allow use to later also make the CurrentProgram array hold
gl_program structs which in turn will allow for code simpilifcation.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index eff19de06c0..4566696fa98 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -1438,14 +1438,10 @@ brw_upload_wm_ubo_surfaces(struct brw_context *brw) { struct gl_context *ctx = &brw->ctx; /* _NEW_PROGRAM */ - struct gl_shader_program *prog = ctx->_Shader->_CurrentFragmentProgram; - - if (!prog || !prog->_LinkedShaders[MESA_SHADER_FRAGMENT]) - return; + struct gl_program *prog = ctx->_Shader->_CurrentFragmentProgram; /* BRW_NEW_FS_PROG_DATA */ - brw_upload_ubo_surfaces(brw, prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program, - &brw->wm.base, brw->wm.base.prog_data); + brw_upload_ubo_surfaces(brw, prog, &brw->wm.base, brw->wm.base.prog_data); } const struct brw_tracked_state brw_wm_ubo_surfaces = { |