mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 22:30:12 +01:00
draw: fix some unsigned issue
spotted by Vinson
This commit is contained in:
parent
da39d5d3b4
commit
c85971da31
1 changed files with 4 additions and 4 deletions
|
|
@ -101,10 +101,10 @@ is_component_writable(unsigned mask,
|
||||||
case TGSI_WRITEMASK_YZW:
|
case TGSI_WRITEMASK_YZW:
|
||||||
return compo == 1 || compo == 2 || compo == 4;
|
return compo == 1 || compo == 2 || compo == 4;
|
||||||
case TGSI_WRITEMASK_XYZW:
|
case TGSI_WRITEMASK_XYZW:
|
||||||
return compo >= 0 && compo < 4;
|
return compo < 4;
|
||||||
default:
|
default:
|
||||||
debug_assert(!"Unknown writemask in stream out");
|
debug_assert(!"Unknown writemask in stream out");
|
||||||
return compo >= 0 && compo < 4;
|
return compo < 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -162,7 +162,7 @@ static void so_emit_prim(struct pt_so_emit *so,
|
||||||
total_written_compos += written_compos;
|
total_written_compos += written_compos;
|
||||||
}
|
}
|
||||||
if (so->single_buffer) {
|
if (so->single_buffer) {
|
||||||
unsigned stride = state->stride -
|
int stride = (int)state->stride -
|
||||||
sizeof(float) * total_written_compos;
|
sizeof(float) * total_written_compos;
|
||||||
|
|
||||||
debug_assert(stride >= 0);
|
debug_assert(stride >= 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue