diff options
author | Zack Rusin <zackr@vmware.com> | 2010-06-17 04:59:48 -0400 |
---|---|---|
committer | Zack Rusin <zackr@vmware.com> | 2010-06-17 05:00:50 -0400 |
commit | c85971da31276f17f90fe7d7596c24b5daa204f9 (patch) | |
tree | a7d9b9570dbbe159fb139fcbc825cced5e7c62e5 /src/gallium/auxiliary/draw/draw_pt_so_emit.c | |
parent | da39d5d3b46c55f88a2f051368e09284732fd440 (diff) |
draw: fix some unsigned issue
spotted by Vinson
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_so_emit.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_so_emit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_so_emit.c b/src/gallium/auxiliary/draw/draw_pt_so_emit.c index 720c105ea1..84555a73c4 100644 --- a/src/gallium/auxiliary/draw/draw_pt_so_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_so_emit.c @@ -101,10 +101,10 @@ is_component_writable(unsigned mask, case TGSI_WRITEMASK_YZW: return compo == 1 || compo == 2 || compo == 4; case TGSI_WRITEMASK_XYZW: - return compo >= 0 && compo < 4; + return compo < 4; default: debug_assert(!"Unknown writemask in stream out"); - return compo >= 0 && compo < 4; + return compo < 4; } } @@ -162,8 +162,8 @@ static void so_emit_prim(struct pt_so_emit *so, total_written_compos += written_compos; } if (so->single_buffer) { - unsigned stride = state->stride - - sizeof(float) * total_written_compos; + int stride = (int)state->stride - + sizeof(float) * total_written_compos; debug_assert(stride >= 0); *buffer = (float*) (((char*)*buffer) + stride); |