diff options
| author | degasus <wickmarkus@web.de> | 2013-01-24 16:58:28 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2013-01-24 16:58:28 +0100 |
| commit | e0ffdda26e5fb34b2f0d59d5d45b0deda9c90c19 (patch) | |
| tree | 8e289ea93c97fe7430ae501200b60327f572c7e2 /Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.cpp | |
| parent | d5748ebaef93cd601ae6ab5e12f39dd201593ad0 (diff) | |
| parent | d60cc373d1b389215eb63c4e20fe24e902680c7a (diff) | |
Merge branch 'immediate-removal' into GLSL-master
Conflicts:
Source/Core/VideoCommon/Src/PixelShaderGen.cpp
Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp
immediate-removal is a new created branch seperated from master but reverted the revert of immediate-removal
so we get less conflicts by merging
Diffstat (limited to 'Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.cpp')
| -rw-r--r-- | Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.cpp index 8ee2243719..57fc57a906 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.cpp @@ -62,8 +62,8 @@ void SaveTexture(const char* filename, u32 texmap, s32 mip) TexImage0& ti0 = texUnit.texImage0[subTexmap]; - int width = ti0.width + 1; - int height = ti0.height + 1; + u32 width = ti0.width + 1; + u32 height = ti0.height + 1; u8 *data = new u8[width * height * 4]; @@ -74,19 +74,23 @@ void SaveTexture(const char* filename, u32 texmap, s32 mip) delete []data; } -void GetTextureBGRA(u8 *dst, u32 texmap, s32 mip, int width, int height) +void GetTextureBGRA(u8 *dst, u32 texmap, s32 mip, u32 width, u32 height) { u8 sample[4]; - for (int y = 0; y < height; y++) - for (int x = 0; x < width; x++) { + for (u32 y = 0; y < height; y++) + { + for (u32 x = 0; x < width; x++) + { TextureSampler::SampleMip(x << 7, y << 7, mip, false, texmap, sample); - // rgba to bgra + + // RGBA to BGRA *(dst++) = sample[2]; *(dst++) = sample[1]; *(dst++) = sample[0]; *(dst++) = sample[3]; } + } } s32 GetMaxTextureLod(u32 texmap) |
