diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-01-17 21:40:21 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-01-17 21:40:21 +0000 |
commit | 04aad73354bc70dbbe35f95dcdb8ad2ee71e64f7 (patch) | |
tree | cfa71702b733092e1cd9faab3b5fb9ec6a2284f9 | |
parent | 8fbbf39f786b65ede81d8c9334a5c274c0de8c96 (diff) |
XXX: Add standard breakr600-structure
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index b2924e289aa..a9413c857d0 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -385,7 +385,8 @@ static void llvm_if(struct r600_shader_ctx *ctx) callstack_check_depth(ctx, FC_PUSH_VPM, 0); } -static void r600_break_from_byte_stream(struct r600_shader_ctx *ctx) +static void r600_break_from_byte_stream(struct r600_shader_ctx *ctx, + bool predicated) { unsigned opcode = TGSI_OPCODE_BRK; if (ctx->bc->chip_class == CAYMAN) @@ -394,9 +395,13 @@ static void r600_break_from_byte_stream(struct r600_shader_ctx *ctx) ctx->inst_info = &eg_shader_tgsi_instruction[opcode]; else ctx->inst_info = &r600_shader_tgsi_instruction[opcode]; -// llvm_if(ctx); + if (predicated) { + llvm_if(ctx); + } tgsi_loop_brk_cont(ctx); -// tgsi_endif(ctx); + if (predicated) { + tgsi_endif(ctx); + } } static unsigned r600_fc_from_byte_stream(struct r600_shader_ctx *ctx, @@ -424,7 +429,7 @@ static unsigned r600_fc_from_byte_stream(struct r600_shader_ctx *ctx, tgsi_endloop(ctx); break; case 5: /* PREDICATED_BREAK */ - r600_break_from_byte_stream(ctx); + r600_break_from_byte_stream(ctx, true); break; case 6: /* CONTINUE */ { @@ -442,6 +447,9 @@ static unsigned r600_fc_from_byte_stream(struct r600_shader_ctx *ctx, tgsi_loop_brk_cont(ctx); } break; + case 7: /* BREAK */ + r600_break_from_byte_stream(ctx, false); + break; } return bytes_read; |