i965: Move _mesa_shader_write_subroutine_indices down a level.
Now we call it in one place instead of making every caller do it. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
parent
a5499b639c
commit
90ed2a10bb
|
@ -28,6 +28,7 @@
|
|||
#include "intel_batchbuffer.h"
|
||||
#include "intel_buffer_objects.h"
|
||||
#include "program/prog_parameter.h"
|
||||
#include "main/shaderapi.h"
|
||||
|
||||
static uint32_t
|
||||
f_as_u32(float f)
|
||||
|
@ -129,6 +130,8 @@ gen6_upload_push_constants(struct brw_context *brw,
|
|||
const struct gen_device_info *devinfo = &brw->screen->devinfo;
|
||||
struct gl_context *ctx = &brw->ctx;
|
||||
|
||||
_mesa_shader_write_subroutine_indices(ctx, stage_state->stage);
|
||||
|
||||
if (prog_data->nr_params == 0) {
|
||||
stage_state->push_const_size = 0;
|
||||
} else {
|
||||
|
|
|
@ -3143,7 +3143,6 @@ genX(upload_vs_push_constants)(struct brw_context *brw)
|
|||
/* BRW_NEW_VS_PROG_DATA */
|
||||
const struct brw_stage_prog_data *prog_data = brw->vs.base.prog_data;
|
||||
|
||||
_mesa_shader_write_subroutine_indices(&brw->ctx, MESA_SHADER_VERTEX);
|
||||
gen6_upload_push_constants(brw, &vp->program, prog_data, stage_state);
|
||||
}
|
||||
|
||||
|
@ -3172,7 +3171,6 @@ genX(upload_gs_push_constants)(struct brw_context *brw)
|
|||
/* BRW_NEW_GS_PROG_DATA */
|
||||
struct brw_stage_prog_data *prog_data = brw->gs.base.prog_data;
|
||||
|
||||
_mesa_shader_write_subroutine_indices(&brw->ctx, MESA_SHADER_GEOMETRY);
|
||||
gen6_upload_push_constants(brw, &gp->program, prog_data, stage_state);
|
||||
}
|
||||
}
|
||||
|
@ -3199,8 +3197,6 @@ genX(upload_wm_push_constants)(struct brw_context *brw)
|
|||
/* BRW_NEW_FS_PROG_DATA */
|
||||
const struct brw_stage_prog_data *prog_data = brw->wm.base.prog_data;
|
||||
|
||||
_mesa_shader_write_subroutine_indices(&brw->ctx, MESA_SHADER_FRAGMENT);
|
||||
|
||||
gen6_upload_push_constants(brw, &fp->program, prog_data, stage_state);
|
||||
}
|
||||
|
||||
|
@ -4038,7 +4034,6 @@ genX(upload_tes_push_constants)(struct brw_context *brw)
|
|||
if (tep) {
|
||||
/* BRW_NEW_TES_PROG_DATA */
|
||||
const struct brw_stage_prog_data *prog_data = brw->tes.base.prog_data;
|
||||
_mesa_shader_write_subroutine_indices(&brw->ctx, MESA_SHADER_TESS_EVAL);
|
||||
gen6_upload_push_constants(brw, &tep->program, prog_data, stage_state);
|
||||
}
|
||||
}
|
||||
|
@ -4067,7 +4062,6 @@ genX(upload_tcs_push_constants)(struct brw_context *brw)
|
|||
/* BRW_NEW_TCS_PROG_DATA */
|
||||
const struct brw_stage_prog_data *prog_data = brw->tcs.base.prog_data;
|
||||
|
||||
_mesa_shader_write_subroutine_indices(&brw->ctx, MESA_SHADER_TESS_CTRL);
|
||||
gen6_upload_push_constants(brw, &tcp->program, prog_data, stage_state);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue