Mesa (master): st/mesa: silence MSVC double/unsigned assignment warning

Brian Paul brianp at kemper.freedesktop.org
Wed Oct 17 16:15:52 UTC 2012


Module: Mesa
Branch: master
Commit: ead664e506be7b845e6e4ccb1e380c438f168f1b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ead664e506be7b845e6e4ccb1e380c438f168f1b

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Oct 16 18:32:57 2012 -0600

st/mesa: silence MSVC double/unsigned assignment warning

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>

---

 src/mesa/state_tracker/st_atom_msaa.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom_msaa.c b/src/mesa/state_tracker/st_atom_msaa.c
index ea9eb9a..9baa4fc 100644
--- a/src/mesa/state_tracker/st_atom_msaa.c
+++ b/src/mesa/state_tracker/st_atom_msaa.c
@@ -51,7 +51,8 @@ static void update_sample_mask( struct st_context *st )
    /* unlike in gallium/d3d10 the mask is only active if msaa is enabled */
       if (st->ctx->Multisample.SampleCoverage) {
          unsigned nr_bits;
-         nr_bits = st->ctx->Multisample.SampleCoverageValue * (float)sample_count;
+         nr_bits = (unsigned)
+            (st->ctx->Multisample.SampleCoverageValue * (float)sample_count);
          /* there's lot of ways how to do this. We just use first few bits,
             since we have no knowledge of sample positions here. When
             app-supplied mask though is used too might need to be smarter.




More information about the mesa-commit mailing list