}
} else if (ir->location == FRAG_RESULT_DEPTH) {
this->frag_depth = *reg;
+ } else if (ir->location == FRAG_RESULT_SAMPLE_MASK) {
+ this->sample_mask = *reg;
} else {
/* gl_FragData or a user-defined FS output */
assert(ir->location >= FRAG_RESULT_DATA0 &&
reg = new(this->mem_ctx) fs_reg(UNIFORM, param_index);
reg->type = brw_type_for_base_type(ir->type);
+
+ } else if (ir->mode == ir_var_system_value) {
+ if (ir->location == SYSTEM_VALUE_SAMPLE_POS) {
+ reg = emit_samplepos_setup(ir);
+ } else if (ir->location == SYSTEM_VALUE_SAMPLE_ID) {
+ reg = emit_sampleid_setup(ir);
+ }
}
if (!reg)
break;
case GLSL_TYPE_SAMPLER:
+ case GLSL_TYPE_ATOMIC_UINT:
break;
case GLSL_TYPE_VOID:
pop_force_uncompressed();
}
+ c->prog_data.uses_omask =
+ fp->Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_SAMPLE_MASK);
+ if(c->prog_data.uses_omask) {
+ this->current_annotation = "FB write oMask";
+ assert(this->sample_mask.file != BAD_FILE);
+ /* Hand over gl_SampleMask. Only lower 16 bits are relevant. */
+ emit(FS_OPCODE_SET_OMASK, fs_reg(MRF, nr, BRW_REGISTER_TYPE_UW), this->sample_mask);
+ nr += 1;
+ }
+
/* Reserve space for color. It'll be filled in per MRT below. */
int color_mrf = nr;
nr += 4 * reg_width;
this->force_uncompressed_stack = 0;
this->force_sechalf_stack = 0;
+ this->spilled_any_registers = false;
+
memset(&this->param_size, 0, sizeof(this->param_size));
}