diff options
author | José Fonseca <[email protected]> | 2011-10-31 19:35:55 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2011-11-01 11:29:31 +0000 |
commit | 0cbb49aff59f7a671d153d9baa70aa78b07da538 (patch) | |
tree | 2715f49ae4db3b2b3fda641ce4f0ae6c6eba17ec /src/gallium/drivers/llvmpipe/lp_state_derived.c | |
parent | 4a0afa2c3b7a7b7460fda061bc46240876283a4b (diff) |
llvmpipe: Use -1 instead of ~0 for "no slot".
As the value of unsigned ~0 depends on the bit-width.
Fixes fdo 42411.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_derived.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_derived.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c index 8725ea39fe9..a8b3142d8cf 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_derived.c +++ b/src/gallium/drivers/llvmpipe/lp_state_derived.c @@ -53,10 +53,10 @@ compute_vertex_info(struct llvmpipe_context *llvmpipe) unsigned vs_index; uint i; - llvmpipe->color_slot[0] = ~0; - llvmpipe->color_slot[1] = ~0; - llvmpipe->bcolor_slot[0] = ~0; - llvmpipe->bcolor_slot[1] = ~0; + llvmpipe->color_slot[0] = -1; + llvmpipe->color_slot[1] = -1; + llvmpipe->bcolor_slot[0] = -1; + llvmpipe->bcolor_slot[1] = -1; /* * Match FS inputs against VS outputs, emitting the necessary @@ -84,7 +84,7 @@ compute_vertex_info(struct llvmpipe_context *llvmpipe) if (lpfs->info.base.input_semantic_name[i] == TGSI_SEMANTIC_COLOR && lpfs->info.base.input_semantic_index[i] < 2) { int idx = lpfs->info.base.input_semantic_index[i]; - llvmpipe->color_slot[idx] = vinfo->num_attribs; + llvmpipe->color_slot[idx] = (int)vinfo->num_attribs; } /* @@ -100,7 +100,7 @@ compute_vertex_info(struct llvmpipe_context *llvmpipe) TGSI_SEMANTIC_BCOLOR, i); if (vs_index > 0) { - llvmpipe->bcolor_slot[i] = vinfo->num_attribs; + llvmpipe->bcolor_slot[i] = (int)vinfo->num_attribs; draw_emit_vertex_attr(vinfo, EMIT_4F, INTERP_PERSPECTIVE, vs_index); } } |