aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/link_varyings.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-07-04 19:52:56 +0200
committermarha <marha@users.sourceforge.net>2014-07-04 19:52:56 +0200
commit62ed212e1add98e39c0f7a6e5a8a5726d66f161e (patch)
treea80c4bf566c76665b3449f13fac7de72c66aa80a /mesalib/src/glsl/link_varyings.cpp
parent3095a03ec3cb1f05b49362327d10a767299d7635 (diff)
parentfe03d6aef6338e43593f164b09ae993bcd0ecbdd (diff)
downloadvcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.tar.gz
vcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.tar.bz2
vcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/glsl/link_varyings.cpp')
-rw-r--r--mesalib/src/glsl/link_varyings.cpp38
1 files changed, 18 insertions, 20 deletions
diff --git a/mesalib/src/glsl/link_varyings.cpp b/mesalib/src/glsl/link_varyings.cpp
index 520a51a27..a3fc2ae34 100644
--- a/mesalib/src/glsl/link_varyings.cpp
+++ b/mesalib/src/glsl/link_varyings.cpp
@@ -175,8 +175,8 @@ cross_validate_outputs_to_inputs(struct gl_shader_program *prog,
/* Find all shader outputs in the "producer" stage.
*/
- foreach_list(node, producer->ir) {
- ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, producer->ir) {
+ ir_variable *const var = node->as_variable();
if ((var == NULL) || (var->data.mode != ir_var_shader_out))
continue;
@@ -212,8 +212,8 @@ cross_validate_outputs_to_inputs(struct gl_shader_program *prog,
* should be arrays and the type of the array element should match the type
* of the corresponding producer output.
*/
- foreach_list(node, consumer->ir) {
- ir_variable *const input = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, consumer->ir) {
+ ir_variable *const input = node->as_variable();
if ((input == NULL) || (input->data.mode != ir_var_shader_in))
continue;
@@ -1121,8 +1121,8 @@ populate_consumer_input_sets(void *mem_ctx, exec_list *ir,
0,
sizeof(consumer_inputs_with_locations[0]) * VARYING_SLOT_MAX);
- foreach_list(node, ir) {
- ir_variable *const input_var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ ir_variable *const input_var = node->as_variable();
if ((input_var != NULL) && (input_var->data.mode == ir_var_shader_in)) {
if (input_var->type->is_interface())
@@ -1227,8 +1227,8 @@ canonicalize_shader_io(exec_list *ir, enum ir_variable_mode io_mode)
ir_variable *var_table[MAX_PROGRAM_OUTPUTS * 4];
unsigned num_variables = 0;
- foreach_list(node, ir) {
- ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ ir_variable *const var = node->as_variable();
if (var == NULL || var->data.mode != io_mode)
continue;
@@ -1339,9 +1339,8 @@ assign_varying_locations(struct gl_context *ctx,
}
if (producer) {
- foreach_list(node, producer->ir) {
- ir_variable *const output_var =
- ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, producer->ir) {
+ ir_variable *const output_var = node->as_variable();
if ((output_var == NULL) ||
(output_var->data.mode != ir_var_shader_out))
@@ -1383,9 +1382,8 @@ assign_varying_locations(struct gl_context *ctx,
* geometry) shader program. This means that locations must be assigned
* for all the inputs.
*/
- foreach_list(node, consumer->ir) {
- ir_variable *const input_var =
- ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, consumer->ir) {
+ ir_variable *const input_var = node->as_variable();
if ((input_var == NULL) ||
(input_var->data.mode != ir_var_shader_in))
@@ -1450,8 +1448,8 @@ assign_varying_locations(struct gl_context *ctx,
}
if (consumer && producer) {
- foreach_list(node, consumer->ir) {
- ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, consumer->ir) {
+ ir_variable *const var = node->as_variable();
if (var && var->data.mode == ir_var_shader_in &&
var->data.is_unmatched_generic_inout) {
@@ -1494,8 +1492,8 @@ check_against_output_limit(struct gl_context *ctx,
{
unsigned output_vectors = 0;
- foreach_list(node, producer->ir) {
- ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, producer->ir) {
+ ir_variable *const var = node->as_variable();
if (var && var->data.mode == ir_var_shader_out &&
var_counts_against_varying_limit(producer->Stage, var)) {
@@ -1533,8 +1531,8 @@ check_against_input_limit(struct gl_context *ctx,
{
unsigned input_vectors = 0;
- foreach_list(node, consumer->ir) {
- ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, consumer->ir) {
+ ir_variable *const var = node->as_variable();
if (var && var->data.mode == ir_var_shader_in &&
var_counts_against_varying_limit(consumer->Stage, var)) {