GSDX: Clear up all compiler warnings. No changes to emulation.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5840 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2014-01-26 00:58:21 +00:00
parent d4211394a5
commit 5b14ca0fb9
10 changed files with 29 additions and 25 deletions

View File

@ -145,7 +145,7 @@ public:
class GSDepthStencilOGL { class GSDepthStencilOGL {
bool m_depth_enable; bool m_depth_enable;
GLenum m_depth_func; GLenum m_depth_func;
GLboolean m_depth_mask; bool m_depth_mask;
// Note front face and back might be split but it seems they have same parameter configuration // Note front face and back might be split but it seems they have same parameter configuration
bool m_stencil_enable; bool m_stencil_enable;
GLenum m_stencil_func; GLenum m_stencil_func;
@ -168,7 +168,7 @@ public:
void EnableDepth() { m_depth_enable = true; } void EnableDepth() { m_depth_enable = true; }
void EnableStencil() { m_stencil_enable = true; } void EnableStencil() { m_stencil_enable = true; }
void SetDepth(GLenum func, GLboolean mask) { m_depth_func = func; m_depth_mask = mask; } void SetDepth(GLenum func, bool mask) { m_depth_func = func; m_depth_mask = mask; }
void SetStencil(GLenum func, GLenum pass) { m_stencil_func = func; m_stencil_spass_dpass_op = pass; } void SetStencil(GLenum func, GLenum pass) { m_stencil_func = func; m_stencil_spass_dpass_op = pass; }
void SetupDepth() void SetupDepth()
@ -188,7 +188,7 @@ public:
} }
if (GLState::depth_mask != m_depth_mask) { if (GLState::depth_mask != m_depth_mask) {
GLState::depth_mask = m_depth_mask; GLState::depth_mask = m_depth_mask;
glDepthMask(m_depth_mask); glDepthMask((GLboolean)m_depth_mask);
} }
} }
} }

View File

@ -1528,7 +1528,7 @@ void GSLocalMemory::ReadImageX(int& tx, int& ty, uint8* dst, int len, GIFRegBITB
for(; len > 0 && x < ex; len--, x += 2, pb++) for(; len > 0 && x < ex; len--, x += 2, pb++)
{ {
*pb = ReadPixel4(addr + offset[x + 0]) | (ReadPixel4(addr + offset[x + 1]) << 4); *pb = (uint8)(ReadPixel4(addr + offset[x + 0]) | (ReadPixel4(addr + offset[x + 1]) << 4));
} }
if(x == ex) {x = sx; y++;} if(x == ex) {x = sx; y++;}
@ -2082,7 +2082,7 @@ uint32* GSOffset::GetPages(const GSVector4i& rect, uint32* pages, GSVector4i* bb
} }
} }
*p++ = EOP; *p++ = (uint32)EOP;
ASSERT(p - pages <= limit); ASSERT(p - pages <= limit);

View File

@ -465,10 +465,10 @@ void GSRendererCS::Draw()
GSVector4i r2 = bbox.add32(GSVector4i(-1, -1, 1, 1)).rintersect(scissor); GSVector4i r2 = bbox.add32(GSVector4i(-1, -1, 1, 1)).rintersect(scissor);
m_vertex.buff[m_vertex.next + 0].XYZ.X = context->XYOFFSET.OFX + (r2.left << 4); m_vertex.buff[m_vertex.next + 0].XYZ.X = (uint16)(context->XYOFFSET.OFX + (r2.left << 4));
m_vertex.buff[m_vertex.next + 0].XYZ.Y = context->XYOFFSET.OFY + (r2.top << 4); m_vertex.buff[m_vertex.next + 0].XYZ.Y = (uint16)(context->XYOFFSET.OFY + (r2.top << 4));
m_vertex.buff[m_vertex.next + 1].XYZ.X = context->XYOFFSET.OFX + (r2.right << 4); m_vertex.buff[m_vertex.next + 1].XYZ.X = (uint16)(context->XYOFFSET.OFX + (r2.right << 4));
m_vertex.buff[m_vertex.next + 1].XYZ.Y = context->XYOFFSET.OFY + (r2.bottom << 4); m_vertex.buff[m_vertex.next + 1].XYZ.Y = (uint16)(context->XYOFFSET.OFY + (r2.bottom << 4));
m_index.buff[m_index.tail + 0] = m_vertex.next + 0; m_index.buff[m_index.tail + 0] = m_vertex.next + 0;
m_index.buff[m_index.tail + 1] = m_vertex.next + 1; m_index.buff[m_index.tail + 1] = m_vertex.next + 1;
@ -636,7 +636,7 @@ void GSRendererCS::Draw()
int step = PS_BATCH_SIZE * GSUtil::GetVertexCount(PRIM->PRIM); int step = PS_BATCH_SIZE * GSUtil::GetVertexCount(PRIM->PRIM);
for(int i = 0; i < m_index.tail; i += step) for(uint32 i = 0; i < m_index.tail; i += step)
{ {
dev->IASetPrimitiveTopology(topology); dev->IASetPrimitiveTopology(topology);
dev->GSSetShader(gs[0]); dev->GSSetShader(gs[0]);

View File

@ -180,7 +180,7 @@ void GSRendererDX9::SetupIA()
GSVertex* RESTRICT s = (GSVertex*)m_vertex.buff; GSVertex* RESTRICT s = (GSVertex*)m_vertex.buff;
GSVertexHW9* RESTRICT d = (GSVertexHW9*)ptr; GSVertexHW9* RESTRICT d = (GSVertexHW9*)ptr;
for(int i = 0; i < m_vertex.next; i++, s++, d++) for(uint32 i = 0; i < m_vertex.next; i++, s++, d++)
{ {
GSVector4 p = GSVector4(GSVector4i::load(s->XYZ.u32[0]).upl16()); GSVector4 p = GSVector4(GSVector4i::load(s->XYZ.u32[0]).upl16());

View File

@ -340,7 +340,7 @@ void GSSettingsDlg::UpdateControls()
bool dx9 = (i / 3) == 0; bool dx9 = (i / 3) == 0;
bool dx11 = (i / 3) == 1; bool dx11 = (i / 3) == 1;
bool hw = (i % 3) == 0; bool hw = (i % 3) == 0;
bool sw = (i % 3) == 1; //bool sw = (i % 3) == 1;
bool native = !!IsDlgButtonChecked(m_hWnd, IDC_NATIVERES); bool native = !!IsDlgButtonChecked(m_hWnd, IDC_NATIVERES);
ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO9), dx9 ? SW_SHOW : SW_HIDE); ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO9), dx9 ? SW_SHOW : SW_HIDE);

View File

@ -228,10 +228,6 @@ GSTextureOGL::GSTextureOGL(int type, int w, int h, int format, GLuint fbo_read)
m_int_alignment = 0; m_int_alignment = 0;
m_int_shift = 0; m_int_shift = 0;
break; break;
m_int_format = 0;
m_int_type = 0;
m_int_alignment = 0;
m_int_shift = 0;
default: default:
ASSERT(0); ASSERT(0);
} }

View File

@ -2458,10 +2458,11 @@ public:
m = _mm_cvtepi32_ps(_mm_unpacklo_epi32(_mm_cvtsi32_si128(x), _mm_cvtsi32_si128(y))); m = _mm_cvtepi32_ps(_mm_unpacklo_epi32(_mm_cvtsi32_si128(x), _mm_cvtsi32_si128(y)));
} }
__forceinline GSVector4(const GSVector4& v) //Not currently used, just causes a compiler warning
/*__forceinline GSVector4(const GSVector4& v)
{ {
m = v.m; m = v.m;
} }*/
__forceinline explicit GSVector4(const GSVector2& v) __forceinline explicit GSVector4(const GSVector2& v)
{ {
@ -2967,7 +2968,6 @@ public:
#endif #endif
return *this;
} }
template<int i> __forceinline int extract32() const template<int i> __forceinline int extract32() const

View File

@ -37,7 +37,8 @@ bool GSWndWGL::CreateContext(int major, int minor)
} }
// GL2 context are quite easy but we need GL3 which is another painful story... // GL2 context are quite easy but we need GL3 which is another painful story...
if (!(m_context = wglCreateContext(m_NativeDisplay))) { m_context = wglCreateContext(m_NativeDisplay);
if (!m_context) {
fprintf(stderr, "Failed to create a 2.0 context\n"); fprintf(stderr, "Failed to create a 2.0 context\n");
return false; return false;
} }
@ -173,13 +174,14 @@ bool GSWndWGL::OpenWGLDisplay()
0, 0, 0 // Layer Masks Ignored 0, 0, 0 // Layer Masks Ignored
}; };
if (!(m_NativeDisplay = GetDC(m_NativeWindow))) m_NativeDisplay = GetDC(m_NativeWindow);
if (!m_NativeDisplay)
{ {
MessageBox(NULL, "(1) Can't Create A GL Device Context.", "ERROR", MB_OK | MB_ICONEXCLAMATION); MessageBox(NULL, "(1) Can't Create A GL Device Context.", "ERROR", MB_OK | MB_ICONEXCLAMATION);
return false; return false;
} }
PixelFormat = ChoosePixelFormat(m_NativeDisplay, &pfd);
if (!(PixelFormat = ChoosePixelFormat(m_NativeDisplay, &pfd))) if (!PixelFormat)
{ {
MessageBox(NULL, "(2) Can't Find A Suitable PixelFormat.", "ERROR", MB_OK | MB_ICONEXCLAMATION); MessageBox(NULL, "(2) Can't Find A Suitable PixelFormat.", "ERROR", MB_OK | MB_ICONEXCLAMATION);
return false; return false;

View File

@ -117,8 +117,11 @@ HRESULT CAMSchedule::Unadvise(DWORD_PTR dwAdviseCookie)
CAdvisePacket * p_prev = &head; CAdvisePacket * p_prev = &head;
CAdvisePacket * p_n; CAdvisePacket * p_n;
m_Serialize.Lock(); m_Serialize.Lock();
while ( p_n = p_prev->Next() ) // The Next() method returns NULL when it hits z while (1) // The Next() method returns NULL when it hits z
{ {
p_n = p_prev->Next();
if (!p_n) break;
if ( p_n->m_dwAdviseCookie == dwAdviseCookie ) if ( p_n->m_dwAdviseCookie == dwAdviseCookie )
{ {
Delete( p_prev->RemoveNext() ); Delete( p_prev->RemoveNext() );

View File

@ -417,7 +417,10 @@ lstrcpynWInternal(
ASSERT(iMaxLength); ASSERT(iMaxLength);
LPWSTR lpReturn = lpString1; LPWSTR lpReturn = lpString1;
if (iMaxLength) { if (iMaxLength) {
while (--iMaxLength && (*lpString1++ = *lpString2++)); while (--iMaxLength) {
if (!*lpString2) break;
*lpString1++ = *lpString2++;
};
// If we ran out of room (which will be the case if // If we ran out of room (which will be the case if
// iMaxLength is now 0) we still need to terminate the // iMaxLength is now 0) we still need to terminate the