gl_SampleID is a built-in variable that always is of type "int".
Suggested by Connor Abbott.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
}
fs_reg *
-fs_visitor::emit_sampleid_setup(ir_variable *ir)
+fs_visitor::emit_sampleid_setup()
{
assert(stage == MESA_SHADER_FRAGMENT);
brw_wm_prog_key *key = (brw_wm_prog_key*) this->key;
assert(brw->gen >= 6);
this->current_annotation = "compute sample id";
- fs_reg *reg = new(this->mem_ctx) fs_reg(this, ir->type);
+ fs_reg *reg = new(this->mem_ctx) fs_reg(this, glsl_type::int_type);
if (key->compute_sample_id) {
fs_reg t1 = fs_reg(this, glsl_type::int_type);
bool is_centroid, bool is_sample);
fs_reg *emit_frontfacing_interpolation();
fs_reg *emit_samplepos_setup();
- fs_reg *emit_sampleid_setup(ir_variable *ir);
+ fs_reg *emit_sampleid_setup();
fs_reg *emit_general_interpolation(ir_variable *ir);
void emit_interpolation_setup_gen4();
void emit_interpolation_setup_gen6();
if (ir->data.location == SYSTEM_VALUE_SAMPLE_POS) {
reg = emit_samplepos_setup();
} else if (ir->data.location == SYSTEM_VALUE_SAMPLE_ID) {
- reg = emit_sampleid_setup(ir);
+ reg = emit_sampleid_setup();
} else if (ir->data.location == SYSTEM_VALUE_SAMPLE_MASK_IN) {
assert(brw->gen >= 7);
reg = new(mem_ctx)