Instead we cast backend_visitor::prog for fragment shader specific code paths.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
void visit_atomic_counter_intrinsic(ir_call *ir);
- struct gl_fragment_program *fp;
const struct brw_wm_prog_key *const key;
struct brw_wm_prog_data *prog_data;
unsigned int sanity_param_count;
switch (i) {
case VARYING_SLOT_POS:
- ir->data.pixel_center_integer = fp->PixelCenterInteger;
- ir->data.origin_upper_left = fp->OriginUpperLeft;
+ {
+ assert(stage == MESA_SHADER_FRAGMENT);
+ gl_fragment_program *fp = (gl_fragment_program*) prog;
+ ir->data.pixel_center_integer = fp->PixelCenterInteger;
+ ir->data.origin_upper_left = fp->OriginUpperLeft;
+ }
fp_input_regs[i] = *emit_fragcoord_interpolation(ir);
break;
case VARYING_SLOT_FACE:
key(key), prog_data(prog_data),
dispatch_width(dispatch_width)
{
- this->fp = fp;
this->mem_ctx = mem_ctx;
init();
}
GLuint reg = 2;
bool kill_stats_promoted_workaround = false;
int lookup = key->iz_lookup;
+ assert(stage == MESA_SHADER_FRAGMENT);
+ gl_fragment_program *fp = (gl_fragment_program*) prog;
bool uses_depth =
(fp->Base.InputsRead & (1 << VARYING_SLOT_POS)) != 0;