virtual void visit(ir_barrier *);
/*@}*/
- void visit_expression(ir_expression *, st_src_reg *) ATTRIBUTE_NOINLINE;
+ void ATTRIBUTE_NOINLINE visit_expression(ir_expression *, st_src_reg *);
void visit_atomic_counter_intrinsic(ir_call *);
void visit_ssbo_intrinsic(ir_call *);
case ir_unop_f2fmp:
case ir_unop_f162b:
case ir_unop_b2f16:
+ case ir_unop_i2i:
+ case ir_unop_i2imp:
+ case ir_unop_u2u:
+ case ir_unop_u2ump:
/* This operation is not supported, or should have already been handled.
*/
assert(!"Invalid ir opcode in glsl_to_tgsi_visitor::visit()");
std::sort(decls, decls + count, sorter);
}
-static enum tgsi_interpolate_mode
-st_translate_interp(enum glsl_interp_mode glsl_qual, GLuint varying)
-{
- switch (glsl_qual) {
- case INTERP_MODE_NONE:
- if (varying == VARYING_SLOT_COL0 || varying == VARYING_SLOT_COL1)
- return TGSI_INTERPOLATE_COLOR;
- return TGSI_INTERPOLATE_PERSPECTIVE;
- case INTERP_MODE_SMOOTH:
- return TGSI_INTERPOLATE_PERSPECTIVE;
- case INTERP_MODE_FLAT:
- return TGSI_INTERPOLATE_CONSTANT;
- case INTERP_MODE_NOPERSPECTIVE:
- return TGSI_INTERPOLATE_LINEAR;
- default:
- assert(0 && "unexpected interp mode in st_translate_interp()");
- return TGSI_INTERPOLATE_PERSPECTIVE;
- }
-}
-
/**
* Translate intermediate IR (glsl_to_tgsi_instruction) to TGSI format.
* \param program the program to translate
assert(numOutputs <= ARRAY_SIZE(t->outputs));
ASSERT_BITFIELD_SIZE(st_src_reg, type, GLSL_TYPE_ERROR);
+ ASSERT_BITFIELD_SIZE(st_src_reg, file, PROGRAM_FILE_MAX);
ASSERT_BITFIELD_SIZE(st_dst_reg, type, GLSL_TYPE_ERROR);
+ ASSERT_BITFIELD_SIZE(st_dst_reg, file, PROGRAM_FILE_MAX);
ASSERT_BITFIELD_SIZE(glsl_to_tgsi_instruction, tex_type, GLSL_TYPE_ERROR);
ASSERT_BITFIELD_SIZE(glsl_to_tgsi_instruction, image_format, PIPE_FORMAT_COUNT);
ASSERT_BITFIELD_SIZE(glsl_to_tgsi_instruction, tex_target,
assert(interpMode);
interp_mode = interpMode[slot] != TGSI_INTERPOLATE_COUNT ?
(enum tgsi_interpolate_mode) interpMode[slot] :
- st_translate_interp(decl->interp, inputSlotToAttr[slot]);
+ tgsi_get_interp_mode(decl->interp,
+ inputSlotToAttr[slot] == VARYING_SLOT_COL0 ||
+ inputSlotToAttr[slot] == VARYING_SLOT_COL1);
interp_location = (enum tgsi_interpolate_loc) decl->interp_loc;
}
goto out;
}
}
+
+ if (program->shader->Program->sh.fs.BlendSupport)
+ ureg_property(ureg,
+ TGSI_PROPERTY_FS_BLEND_EQUATION_ADVANCED,
+ program->shader->Program->sh.fs.BlendSupport);
+
}
else if (procType == PIPE_SHADER_VERTEX) {
for (i = 0; i < numOutputs; i++) {