diff options
author | Brian Paul <[email protected]> | 2014-04-15 09:18:46 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-04-17 11:29:32 -0700 |
commit | 7c7ab5434aee1a40d1252ca10ac90a70dfd62174 (patch) | |
tree | 364f5e623144aeaf9816d4a5d91fdff79a87831e /src/gallium/drivers/svga/svga_tgsi_insn.c | |
parent | 8e131576eede26ebfd5e6d18f09642bdccb6be0f (diff) |
svga: use new inst_token_setp() helper function
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_tgsi_insn.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_insn.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c index 3ed724020b5..d3570582404 100644 --- a/src/gallium/drivers/svga/svga_tgsi_insn.c +++ b/src/gallium/drivers/svga/svga_tgsi_insn.c @@ -1531,7 +1531,6 @@ emit_conditional(struct svga_shader_emitter *emit, { SVGA3dShaderDestToken pred_reg = dst_register( SVGA3DREG_PREDICATE, 0 ); SVGA3dShaderInstToken setp_token; - setp_token = inst_token( SVGA3DOP_SETP ); switch (compare_func) { case PIPE_FUNC_NEVER: @@ -1539,22 +1538,22 @@ emit_conditional(struct svga_shader_emitter *emit, dst, fail ); break; case PIPE_FUNC_LESS: - setp_token.control = SVGA3DOPCOMP_LT; + setp_token = inst_token_setp(SVGA3DOPCOMP_LT); break; case PIPE_FUNC_EQUAL: - setp_token.control = SVGA3DOPCOMP_EQ; + setp_token = inst_token_setp(SVGA3DOPCOMP_EQ); break; case PIPE_FUNC_LEQUAL: - setp_token.control = SVGA3DOPCOMP_LE; + setp_token = inst_token_setp(SVGA3DOPCOMP_LE); break; case PIPE_FUNC_GREATER: - setp_token.control = SVGA3DOPCOMP_GT; + setp_token = inst_token_setp(SVGA3DOPCOMP_GT); break; case PIPE_FUNC_NOTEQUAL: - setp_token.control = SVGA3DOPCOMPC_NE; + setp_token = inst_token_setp(SVGA3DOPCOMPC_NE); break; case PIPE_FUNC_GEQUAL: - setp_token.control = SVGA3DOPCOMP_GE; + setp_token = inst_token_setp(SVGA3DOPCOMP_GE); break; case PIPE_FUNC_ALWAYS: return submit_op1( emit, inst_token( SVGA3DOP_MOV ), @@ -2557,12 +2556,8 @@ emit_lit(struct svga_shader_emitter *emit, */ { SVGA3dShaderDestToken pred_reg = dst_register( SVGA3DREG_PREDICATE, 0 ); - SVGA3dShaderInstToken setp_token; struct src_register predsrc; - setp_token = inst_token( SVGA3DOP_SETP ); - setp_token.control = SVGA3DOPCOMP_GT; - /* D3D vs GL semantics: */ if (0) @@ -2571,7 +2566,9 @@ emit_lit(struct svga_shader_emitter *emit, predsrc = swizzle(src0, 0, 0, 0, 0); /* GL */ /* SETP src0.xxyy, GT, {0}.x */ - if (!submit_op2( emit, setp_token, pred_reg, + if (!submit_op2( emit, + inst_token_setp(SVGA3DOPCOMP_GT), + pred_reg, predsrc, get_zero_immediate(emit))) return FALSE; |