diff options
author | Brian Paul <[email protected]> | 2017-12-29 10:02:10 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-01-11 08:06:38 -0700 |
commit | 8f884b83d4fbad92a2f4017e03bdfb23d34fc252 (patch) | |
tree | 30623228839700038cf4ca3d53c94d97e8a20155 /src/gallium/drivers | |
parent | 879ea9432dfe60e763f3dac8eb56fd1d37613a27 (diff) |
svga: remove unused fail parameter to EMIT_RS(), EMIT_RS_FLOAT()
Reviewed-by: Neha Bhende <[email protected]>
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/svga/svga_state_rss.c | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/src/gallium/drivers/svga/svga_state_rss.c b/src/gallium/drivers/svga/svga_state_rss.c index b68d85ff20c..515155d3ae8 100644 --- a/src/gallium/drivers/svga/svga_state_rss.c +++ b/src/gallium/drivers/svga/svga_state_rss.c @@ -45,7 +45,7 @@ struct rs_queue { }; -#define EMIT_RS(svga, value, token, fail) \ +#define EMIT_RS(svga, value, token) \ do { \ STATIC_ASSERT(SVGA3D_RS_##token < ARRAY_SIZE(svga->state.hw_draw.rs)); \ if (svga->state.hw_draw.rs[SVGA3D_RS_##token] != value) { \ @@ -54,7 +54,7 @@ do { \ } \ } while (0) -#define EMIT_RS_FLOAT(svga, fvalue, token, fail) \ +#define EMIT_RS_FLOAT(svga, fvalue, token) \ do { \ unsigned value = fui(fvalue); \ STATIC_ASSERT(SVGA3D_RS_##token < ARRAY_SIZE(svga->state.hw_draw.rs)); \ @@ -91,21 +91,21 @@ emit_rss_vgpu9(struct svga_context *svga, unsigned dirty) if (dirty & (SVGA_NEW_BLEND | SVGA_NEW_BLEND_COLOR)) { const struct svga_blend_state *curr = svga->curr.blend; - EMIT_RS(svga, curr->rt[0].writemask, COLORWRITEENABLE, fail); - EMIT_RS(svga, curr->rt[0].blend_enable, BLENDENABLE, fail); + EMIT_RS(svga, curr->rt[0].writemask, COLORWRITEENABLE); + EMIT_RS(svga, curr->rt[0].blend_enable, BLENDENABLE); if (curr->rt[0].blend_enable) { - EMIT_RS(svga, curr->rt[0].srcblend, SRCBLEND, fail); - EMIT_RS(svga, curr->rt[0].dstblend, DSTBLEND, fail); - EMIT_RS(svga, curr->rt[0].blendeq, BLENDEQUATION, fail); + EMIT_RS(svga, curr->rt[0].srcblend, SRCBLEND); + EMIT_RS(svga, curr->rt[0].dstblend, DSTBLEND); + EMIT_RS(svga, curr->rt[0].blendeq, BLENDEQUATION); EMIT_RS(svga, curr->rt[0].separate_alpha_blend_enable, - SEPARATEALPHABLENDENABLE, fail); + SEPARATEALPHABLENDENABLE); if (curr->rt[0].separate_alpha_blend_enable) { - EMIT_RS(svga, curr->rt[0].srcblend_alpha, SRCBLENDALPHA, fail); - EMIT_RS(svga, curr->rt[0].dstblend_alpha, DSTBLENDALPHA, fail); - EMIT_RS(svga, curr->rt[0].blendeq_alpha, BLENDEQUATIONALPHA, fail); + EMIT_RS(svga, curr->rt[0].srcblend_alpha, SRCBLENDALPHA); + EMIT_RS(svga, curr->rt[0].dstblend_alpha, DSTBLENDALPHA); + EMIT_RS(svga, curr->rt[0].blendeq_alpha, BLENDEQUATIONALPHA); } } } @@ -119,7 +119,7 @@ emit_rss_vgpu9(struct svga_context *svga, unsigned dirty) color = (a << 24) | (r << 16) | (g << 8) | b; - EMIT_RS(svga, color, BLENDCOLOR, fail); + EMIT_RS(svga, color, BLENDCOLOR); } if (dirty & (SVGA_NEW_DEPTH_STENCIL_ALPHA | SVGA_NEW_RAST)) { @@ -129,22 +129,22 @@ emit_rss_vgpu9(struct svga_context *svga, unsigned dirty) if (!curr->stencil[0].enabled) { /* Stencil disabled */ - EMIT_RS(svga, FALSE, STENCILENABLE, fail); - EMIT_RS(svga, FALSE, STENCILENABLE2SIDED, fail); + EMIT_RS(svga, FALSE, STENCILENABLE); + EMIT_RS(svga, FALSE, STENCILENABLE2SIDED); } else if (curr->stencil[0].enabled && !curr->stencil[1].enabled) { /* Regular stencil */ - EMIT_RS(svga, TRUE, STENCILENABLE, fail); - EMIT_RS(svga, FALSE, STENCILENABLE2SIDED, fail); + EMIT_RS(svga, TRUE, STENCILENABLE); + EMIT_RS(svga, FALSE, STENCILENABLE2SIDED); - EMIT_RS(svga, curr->stencil[0].func, STENCILFUNC, fail); - EMIT_RS(svga, curr->stencil[0].fail, STENCILFAIL, fail); - EMIT_RS(svga, curr->stencil[0].zfail, STENCILZFAIL, fail); - EMIT_RS(svga, curr->stencil[0].pass, STENCILPASS, fail); + EMIT_RS(svga, curr->stencil[0].func, STENCILFUNC); + EMIT_RS(svga, curr->stencil[0].fail, STENCILFAIL); + EMIT_RS(svga, curr->stencil[0].zfail, STENCILZFAIL); + EMIT_RS(svga, curr->stencil[0].pass, STENCILPASS); - EMIT_RS(svga, curr->stencil_mask, STENCILMASK, fail); - EMIT_RS(svga, curr->stencil_writemask, STENCILWRITEMASK, fail); + EMIT_RS(svga, curr->stencil_mask, STENCILMASK); + EMIT_RS(svga, curr->stencil_writemask, STENCILWRITEMASK); } else { int cw, ccw; @@ -164,38 +164,38 @@ emit_rss_vgpu9(struct svga_context *svga, unsigned dirty) /* Twoside stencil */ - EMIT_RS(svga, TRUE, STENCILENABLE, fail); - EMIT_RS(svga, TRUE, STENCILENABLE2SIDED, fail); + EMIT_RS(svga, TRUE, STENCILENABLE); + EMIT_RS(svga, TRUE, STENCILENABLE2SIDED); - EMIT_RS(svga, curr->stencil[cw].func, STENCILFUNC, fail); - EMIT_RS(svga, curr->stencil[cw].fail, STENCILFAIL, fail); - EMIT_RS(svga, curr->stencil[cw].zfail, STENCILZFAIL, fail); - EMIT_RS(svga, curr->stencil[cw].pass, STENCILPASS, fail); + EMIT_RS(svga, curr->stencil[cw].func, STENCILFUNC); + EMIT_RS(svga, curr->stencil[cw].fail, STENCILFAIL); + EMIT_RS(svga, curr->stencil[cw].zfail, STENCILZFAIL); + EMIT_RS(svga, curr->stencil[cw].pass, STENCILPASS); - EMIT_RS(svga, curr->stencil[ccw].func, CCWSTENCILFUNC, fail); - EMIT_RS(svga, curr->stencil[ccw].fail, CCWSTENCILFAIL, fail); - EMIT_RS(svga, curr->stencil[ccw].zfail, CCWSTENCILZFAIL, fail); - EMIT_RS(svga, curr->stencil[ccw].pass, CCWSTENCILPASS, fail); + EMIT_RS(svga, curr->stencil[ccw].func, CCWSTENCILFUNC); + EMIT_RS(svga, curr->stencil[ccw].fail, CCWSTENCILFAIL); + EMIT_RS(svga, curr->stencil[ccw].zfail, CCWSTENCILZFAIL); + EMIT_RS(svga, curr->stencil[ccw].pass, CCWSTENCILPASS); - EMIT_RS(svga, curr->stencil_mask, STENCILMASK, fail); - EMIT_RS(svga, curr->stencil_writemask, STENCILWRITEMASK, fail); + EMIT_RS(svga, curr->stencil_mask, STENCILMASK); + EMIT_RS(svga, curr->stencil_writemask, STENCILWRITEMASK); } - EMIT_RS(svga, curr->zenable, ZENABLE, fail); + EMIT_RS(svga, curr->zenable, ZENABLE); if (curr->zenable) { - EMIT_RS(svga, curr->zfunc, ZFUNC, fail); - EMIT_RS(svga, curr->zwriteenable, ZWRITEENABLE, fail); + EMIT_RS(svga, curr->zfunc, ZFUNC); + EMIT_RS(svga, curr->zwriteenable, ZWRITEENABLE); } - EMIT_RS(svga, curr->alphatestenable, ALPHATESTENABLE, fail); + EMIT_RS(svga, curr->alphatestenable, ALPHATESTENABLE); if (curr->alphatestenable) { - EMIT_RS(svga, curr->alphafunc, ALPHAFUNC, fail); - EMIT_RS_FLOAT(svga, curr->alpharef, ALPHAREF, fail); + EMIT_RS(svga, curr->alphafunc, ALPHAFUNC); + EMIT_RS_FLOAT(svga, curr->alpharef, ALPHAREF); } } if (dirty & SVGA_NEW_STENCIL_REF) { - EMIT_RS(svga, svga->curr.stencil_ref.ref_value[0], STENCILREF, fail); + EMIT_RS(svga, svga->curr.stencil_ref.ref_value[0], STENCILREF); } if (dirty & (SVGA_NEW_RAST | SVGA_NEW_NEED_PIPELINE)) { @@ -205,7 +205,7 @@ emit_rss_vgpu9(struct svga_context *svga, unsigned dirty) /* Shademode: still need to rearrange index list to move * flat-shading PV first vertex. */ - EMIT_RS(svga, curr->shademode, SHADEMODE, fail); + EMIT_RS(svga, curr->shademode, SHADEMODE); /* Don't do culling while the software pipeline is active. It * does it for us, and additionally introduces potentially @@ -216,22 +216,22 @@ emit_rss_vgpu9(struct svga_context *svga, unsigned dirty) point_size_min = util_get_min_point_size(&curr->templ); - EMIT_RS(svga, cullmode, CULLMODE, fail); - EMIT_RS(svga, curr->scissortestenable, SCISSORTESTENABLE, fail); - EMIT_RS(svga, curr->multisampleantialias, MULTISAMPLEANTIALIAS, fail); - EMIT_RS(svga, curr->lastpixel, LASTPIXEL, fail); - EMIT_RS_FLOAT(svga, curr->pointsize, POINTSIZE, fail); - EMIT_RS_FLOAT(svga, point_size_min, POINTSIZEMIN, fail); - EMIT_RS_FLOAT(svga, screen->maxPointSize, POINTSIZEMAX, fail); - EMIT_RS(svga, curr->pointsprite, POINTSPRITEENABLE, fail); + EMIT_RS(svga, cullmode, CULLMODE); + EMIT_RS(svga, curr->scissortestenable, SCISSORTESTENABLE); + EMIT_RS(svga, curr->multisampleantialias, MULTISAMPLEANTIALIAS); + EMIT_RS(svga, curr->lastpixel, LASTPIXEL); + EMIT_RS_FLOAT(svga, curr->pointsize, POINTSIZE); + EMIT_RS_FLOAT(svga, point_size_min, POINTSIZEMIN); + EMIT_RS_FLOAT(svga, screen->maxPointSize, POINTSIZEMAX); + EMIT_RS(svga, curr->pointsprite, POINTSPRITEENABLE); /* Emit line state, when the device understands it */ if (screen->haveLineStipple) - EMIT_RS(svga, curr->linepattern, LINEPATTERN, fail); + EMIT_RS(svga, curr->linepattern, LINEPATTERN); if (screen->haveLineSmooth) - EMIT_RS(svga, curr->antialiasedlineenable, ANTIALIASEDLINEENABLE, fail); + EMIT_RS(svga, curr->antialiasedlineenable, ANTIALIASEDLINEENABLE); if (screen->maxLineWidth > 1.0F) - EMIT_RS_FLOAT(svga, curr->linewidth, LINEWIDTH, fail); + EMIT_RS_FLOAT(svga, curr->linewidth, LINEWIDTH); } if (dirty & (SVGA_NEW_RAST | @@ -252,8 +252,8 @@ emit_rss_vgpu9(struct svga_context *svga, unsigned dirty) bias = svga->curr.depthscale * curr->depthbias; } - EMIT_RS_FLOAT(svga, slope, SLOPESCALEDEPTHBIAS, fail); - EMIT_RS_FLOAT(svga, bias, DEPTHBIAS, fail); + EMIT_RS_FLOAT(svga, slope, SLOPESCALEDEPTHBIAS); + EMIT_RS_FLOAT(svga, bias, DEPTHBIAS); } if (dirty & SVGA_NEW_FRAME_BUFFER) { @@ -263,13 +263,13 @@ emit_rss_vgpu9(struct svga_context *svga, unsigned dirty) util_format_is_srgb(svga->curr.framebuffer.cbufs[0]->format)) { gamma = 2.2f; } - EMIT_RS_FLOAT(svga, gamma, OUTPUTGAMMA, fail); + EMIT_RS_FLOAT(svga, gamma, OUTPUTGAMMA); } if (dirty & SVGA_NEW_RAST) { /* bitmask of the enabled clip planes */ unsigned enabled = svga->curr.rast->templ.clip_plane_enable; - EMIT_RS(svga, enabled, CLIPPLANEENABLE, fail); + EMIT_RS(svga, enabled, CLIPPLANEENABLE); } if (queue.rs_count) { |