浏览代码

Use switch based on mode in ast_jump_statement::hir

tags/mesa-7.9-rc1
Ian Romanick 15 年前
父节点
当前提交
c0e76d8352
共有 1 个文件被更改,包括 9 次插入2 次删除
  1. 9
    2
      ast_to_hir.cpp

+ 9
- 2
ast_to_hir.cpp 查看文件

@@ -1967,7 +1967,8 @@ ast_jump_statement::hir(exec_list *instructions,
struct _mesa_glsl_parse_state *state)
{

if (mode == ast_return) {
switch (mode) {
case ast_return: {
ir_return *inst;
assert(state->current_function);

@@ -2005,9 +2006,10 @@ ast_jump_statement::hir(exec_list *instructions,
}

instructions->push_tail(inst);
break;
}

if (mode == ast_discard) {
case ast_discard:
/* FINISHME: discard support */
if (state->target != fragment_shader) {
YYLTYPE loc = this->get_location();
@@ -2015,6 +2017,11 @@ ast_jump_statement::hir(exec_list *instructions,
_mesa_glsl_error(& loc, state,
"`discard' may only appear in a fragment shader");
}
break;

case ast_break:
case ast_continue:
break;
}

/* Jump instructions do not have r-values.

正在加载...
取消
保存