diff options
author | Christian König <[email protected]> | 2016-12-14 15:03:35 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2017-01-03 12:18:14 +0100 |
commit | ac57bcda1e0e6dcfa81e24468d5b682686120649 (patch) | |
tree | bd938d653a27b0047ecf085cd5b03bdcde848bb6 /src/gallium/auxiliary/vl | |
parent | b6737a8bcd03ea68952799144c0c6e6e6679bee9 (diff) |
vl/zscan: fix "Fix trivial sign compare warnings"
The variable actually needs to be signed, otherwise converting it to a
float doesn't work as expected.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98914
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Nayan Deshmukh <[email protected]>
Cc: "13.0" <[email protected]>
Fixes: 1fb4179f927 ("vl: Fix trivial sign compare warnings")
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_zscan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/vl/vl_zscan.c b/src/gallium/auxiliary/vl/vl_zscan.c index ef05af463f3..24d64525b76 100644 --- a/src/gallium/auxiliary/vl/vl_zscan.c +++ b/src/gallium/auxiliary/vl/vl_zscan.c @@ -152,7 +152,7 @@ create_vert_shader(struct vl_zscan *zscan) for (i = 0; i < zscan->num_channels; ++i) { ureg_ADD(shader, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_Y), ureg_imm1f(shader, 1.0f / (zscan->blocks_per_line * VL_BLOCK_WIDTH) - * (i - (signed)zscan->num_channels / 2))); + * ((signed)i - (signed)zscan->num_channels / 2))); ureg_MAD(shader, ureg_writemask(o_vtex[i], TGSI_WRITEMASK_X), vrect, ureg_imm1f(shader, 1.0f / zscan->blocks_per_line), ureg_src(tmp)); |