[mupen64plus-video-z64] 96/161: Fix mixing of signedness
Sven Eckelmann
ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:20:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
ecsv-guest pushed a commit to branch master
in repository mupen64plus-video-z64.
commit 49ce2113f3363a198a78b7f133c9fafb4e4fd870
Author: Sven Eckelmann <sven at narfation.org>
Date: Fri Jun 8 23:02:03 2012 +0200
Fix mixing of signedness
---
debian/changelog | 1 +
debian/patches/mixed_signedness.patch | 62 +++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 64 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 5b9b90b..a50f988 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ mupen64plus-video-z64 (1.99.4+30+daa3f1b2fe76-3) UNRELEASED; urgency=low
- Add gcc_lto.patch, Enable support for link-time optimization
- Add uninitialized_restorefbid.patch, Workaround wrong gcc warning about
uninitialized variable
+ - Add mixed_signedness.patch, Fix mixing of signedness
-- Sven Eckelmann <sven at narfation.org> Sat, 09 Jun 2012 01:36:50 +0200
diff --git a/debian/patches/mixed_signedness.patch b/debian/patches/mixed_signedness.patch
new file mode 100644
index 0000000..1602e02
--- /dev/null
+++ b/debian/patches/mixed_signedness.patch
@@ -0,0 +1,62 @@
+Description: Fix mixing of signedness
+Author: Sven Eckelmann <sven at narfation.org>
+
+---
+diff --git a/src/rdp.h b/src/rdp.h
+index 6d21b1e77b4815671ec609d51bfb030f92f40b9f..9979e3e5666cd8d5a7050b49277df4066a9ee3f2 100644
+--- a/src/rdp.h
++++ b/src/rdp.h
+@@ -122,14 +122,14 @@ struct rdpCombineModes_t {
+ #define RDP_GETCM_SUB_B_A1(cm) (((cm).w2 >> 3) & 0x7)
+ #define RDP_GETCM_ADD_A1(cm) (((cm).w2 >> 0) & 0x7)
+
+-#define RDP_COMBINE_MASK11 ((0xf<<20)|(0x1f<<15)|(0x7<<12)|(0x7<<9))
+-#define RDP_COMBINE_MASK12 ((0xf<<28)|(0x7<<15)|(0x7<<12)|(0x7<<9))
+-#define RDP_COMBINE_MASK21 ((0xf<<5)|(0x1f<<0))
+-#define RDP_COMBINE_MASK22 ((0xf<<24)|(0x7<<21)|(0x7<<18)|(0x7<<6)|(0x7<<3)|(0x7<<0))
++#define RDP_COMBINE_MASK11 ((0xfu<<20)|(0x1fu<<15)|(0x7u<<12)|(0x7u<<9))
++#define RDP_COMBINE_MASK12 ((0xfu<<28)|(0x7u<<15)|(0x7u<<12)|(0x7u<<9))
++#define RDP_COMBINE_MASK21 ((0xfu<<5)|(0x1fu<<0))
++#define RDP_COMBINE_MASK22 ((0xfu<<24)|(0x7u<<21)|(0x7u<<18)|(0x7u<<6)|(0x7u<<3)|(0x7u<<0))
+
+ static const rdpCombineModes_t rdpCombineMasks[4] = {
+ { ~RDP_COMBINE_MASK21, ~RDP_COMBINE_MASK22 },
+- { ~0, ~0 },
++ { ~0u, ~0u },
+ { ~(RDP_COMBINE_MASK11|RDP_COMBINE_MASK21), ~(RDP_COMBINE_MASK12|RDP_COMBINE_MASK22) },
+ { ~(RDP_COMBINE_MASK11|RDP_COMBINE_MASK21), ~(RDP_COMBINE_MASK12|RDP_COMBINE_MASK22) },
+ };
+@@ -181,14 +181,14 @@ struct rdpOtherModes_t {
+ #define RDP_GETOM_DITHER_ALPHA_EN(om) (((om).w2 & 0x02) ? 1 : 0)
+ #define RDP_GETOM_ALPHA_COMPARE_EN(om) (((om).w2 & 0x01) ? 1 : 0)
+
+-#define RDP_BLEND_MASK1 ((3<<30)|(3<<26)|(3<<22)|(3<<18))
+-#define RDP_BLEND_MASK2 ((3<<28)|(3<<24)|(3<<20)|(3<<16))
++#define RDP_BLEND_MASK1 ((3u<<30)|(3u<<26)|(3u<<22)|(3u<<18))
++#define RDP_BLEND_MASK2 ((3u<<28)|(3u<<24)|(3u<<20)|(3u<<16))
+
+ static const rdpOtherModes_t rdpBlendMasks[4] = {
+- { ~0, ~RDP_BLEND_MASK2 },
+- { ~0, ~0 },
+- { ~0, ~(RDP_BLEND_MASK1|RDP_BLEND_MASK2) },
+- { ~0, ~(RDP_BLEND_MASK1|RDP_BLEND_MASK2) },
++ { ~0u, ~RDP_BLEND_MASK2 },
++ { ~0u, ~0u },
++ { ~0u, ~(RDP_BLEND_MASK1|RDP_BLEND_MASK2) },
++ { ~0u, ~(RDP_BLEND_MASK1|RDP_BLEND_MASK2) },
+ };
+
+ struct rdpState_t {
+diff --git a/src/rgl_rendermode.cpp b/src/rgl_rendermode.cpp
+index e1a33327b7df002984152478fbc71caac7172f12..1e190b0be1c473b3895f0f3c09f38a90b3f60283 100644
+--- a/src/rgl_rendermode.cpp
++++ b/src/rgl_rendermode.cpp
+@@ -212,7 +212,7 @@ void rglSetCombiner(rglRenderChunk_t & chunk, int format)
+
+ rdpState_t & state = chunk.rdpState;
+ static rglCombiner_t * c;
+- int cycle = RDP_GETOM_CYCLE_TYPE(state.otherModes);
++ uint32_t cycle = RDP_GETOM_CYCLE_TYPE(state.otherModes);
+ int i; //, fmt, size;
+ char * p;
+ const char * alphaTest;
diff --git a/debian/patches/series b/debian/patches/series
index 8fee66f..b92ff7e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
printf_fixup.patch
gcc_lto.patch
uninitialized_restorefbid.patch
+mixed_signedness.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-video-z64.git
More information about the Pkg-games-commits
mailing list