}
yagl_glsl_state_add_sampler_ExternalOES(state, $4.value);
+ yagl_glsl_state_set_last_sampler_array_count(state, 1);
} else if (strcmp(type_resolved, "sampler2D") == 0) {
yagl_glsl_state_add_sampler_2D(state, $4.value);
+ yagl_glsl_state_set_last_sampler_array_count(state, 1);
}
- yagl_glsl_state_set_last_sampler_array_count(state, 1);
free(type_resolved);
}
}
}
yagl_glsl_state_add_sampler_ExternalOES(state, $3.value);
+ yagl_glsl_state_set_last_sampler_array_count(state, 1);
} else if (strcmp(type_resolved, "sampler2D") == 0) {
yagl_glsl_state_add_sampler_2D(state, $3.value);
+ yagl_glsl_state_set_last_sampler_array_count(state, 1);
}
- yagl_glsl_state_set_last_sampler_array_count(state, 1);
free(type_resolved);
}
}
state->have_samplerexternaloes = 1;
}
- // TODO add how many samplers are added too - check resolution_value
yagl_glsl_state_add_sampler_ExternalOES(state, $4.value);
yagl_glsl_state_pp_condition_parse_start(state);
} else if (strcmp(type_resolved, "sampler2D") == 0) {
res_cur++;
} else {
if (yagl_glsl_pp_expr_op_is_unary(state->pp_exprs[i].op)) {
- assert(res_cur > 0);
+ assert(res_cur >= 1);
if (!yagl_glsl_state_pp_solve_unary(state, state->pp_exprs[i].op, res_stack[res_cur - 1], &tmp_result)) {
YAGL_LOG_ERROR("Expression #%d: Unary operator %d (%s) failed", i, state->pp_exprs[i].op, glsl_pp_op_dbgstr[state->pp_exprs[i].op]);