gl/debug: More fixes

This commit is contained in:
kd-11 2017-03-16 17:27:13 +03:00
parent e7271179f7
commit 85f80cfbd1
4 changed files with 10 additions and 6 deletions

View file

@ -14,6 +14,7 @@
#include "GLRenderTargets.h"
#include "../Common/TextureUtils.h"
#include "../../Memory/vm.h"
#include "Utilities/Config.h"
class GLGSRender;

View file

@ -543,7 +543,7 @@ namespace rsx
}
}
if (need_convert)
if (need_convert || need_clip)
{
//For now, only use this for actual scaled images, there are use cases that should not go through 3d engine, e.g program ucode transfer
//TODO: Figure out more instances where we can use this without problems

View file

@ -30,12 +30,15 @@ namespace rsx
void clip_image(u8 *dst, const u8 *src, int clip_x, int clip_y, int clip_w, int clip_h, int bpp, int src_pitch, int dst_pitch)
{
u8 *pixels_src = (u8*)src + clip_y * src_pitch + clip_x * bpp;
u8 *pixels_dst = dst;
const u32 row_length = clip_w * bpp;
for (int y = 0; y < clip_h; ++y)
{
u8 *dst_row = dst + y * dst_pitch;
const u8 *src_row = src + (y + clip_y) * src_pitch + clip_x * bpp;
std::memmove(dst_row, src_row, clip_w * bpp);
std::memmove(pixels_dst, pixels_src, row_length);
pixels_src += src_pitch;
pixels_dst += dst_pitch;
}
}

View file

@ -69,7 +69,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\rsx_program_decompiler\rsx_decompiler;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Disabled</Optimization>
<Optimization>Full</Optimization>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">