mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 11:20:20 +01:00
glsl: Define enum ir_depth_layout
This commit is contained in:
parent
39cad66a88
commit
5fc57f471b
2 changed files with 35 additions and 0 deletions
|
|
@ -472,6 +472,22 @@ const char *ir_expression::operator_string()
|
|||
return operator_string(this->operation);
|
||||
}
|
||||
|
||||
const char*
|
||||
depth_layout_string(ir_depth_layout layout)
|
||||
{
|
||||
switch(layout) {
|
||||
case ir_depth_layout_none: return "";
|
||||
case ir_depth_layout_any: return "depth_any";
|
||||
case ir_depth_layout_greater: return "depth_greater";
|
||||
case ir_depth_layout_less: return "depth_less";
|
||||
case ir_depth_layout_unchanged: return "depth_unchanged";
|
||||
|
||||
default:
|
||||
assert(0);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
ir_expression_operation
|
||||
ir_expression::get_operator(const char *str)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -235,6 +235,25 @@ enum ir_variable_interpolation {
|
|||
ir_var_noperspective
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Layout qualifiers for gl_FragDepth.
|
||||
*
|
||||
* The AMD_conservative_depth extension allows gl_FragDepth to be redeclared
|
||||
* with a layout qualifier.
|
||||
*/
|
||||
enum ir_depth_layout {
|
||||
ir_depth_layout_none, /**< No depth layout is specified. */
|
||||
ir_depth_layout_any,
|
||||
ir_depth_layout_greater,
|
||||
ir_depth_layout_less,
|
||||
ir_depth_layout_unchanged
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Convert depth layout qualifier to string.
|
||||
*/
|
||||
const char*
|
||||
depth_layout_string(ir_depth_layout layout);
|
||||
|
||||
class ir_variable : public ir_instruction {
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue