mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 11:20:11 +01:00
glsl2: Add some comments.
This commit is contained in:
parent
c7a18da690
commit
0048c7aef8
1 changed files with 4 additions and 1 deletions
|
|
@ -164,6 +164,9 @@ match_function_by_name(exec_list *instructions, const char *name,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform automatic type conversion of constructor parameters
|
* Perform automatic type conversion of constructor parameters
|
||||||
|
*
|
||||||
|
* This implements the rules in the "Conversion and Scalar Constructors"
|
||||||
|
* section (GLSL 1.10 section 5.4.1), not the "Implicit Conversions" rules.
|
||||||
*/
|
*/
|
||||||
static ir_rvalue *
|
static ir_rvalue *
|
||||||
convert_component(ir_rvalue *src, const glsl_type *desired_type)
|
convert_component(ir_rvalue *src, const glsl_type *desired_type)
|
||||||
|
|
@ -220,11 +223,11 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
|
||||||
|
|
||||||
assert(result != NULL);
|
assert(result != NULL);
|
||||||
|
|
||||||
|
/* Try constant folding; it may fold in the conversion we just added. */
|
||||||
ir_constant *const constant = result->constant_expression_value();
|
ir_constant *const constant = result->constant_expression_value();
|
||||||
return (constant != NULL) ? (ir_rvalue *) constant : (ir_rvalue *) result;
|
return (constant != NULL) ? (ir_rvalue *) constant : (ir_rvalue *) result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dereference a specific component from a scalar, vector, or matrix
|
* Dereference a specific component from a scalar, vector, or matrix
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue