mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
HybridXFB: Fix lint errors
This commit is contained in:
@@ -43,7 +43,7 @@ const ConfigInfo<bool> GFX_CONVERT_HIRES_TEXTURES{{System::GFX, "Settings", "Con
|
||||
const ConfigInfo<bool> GFX_CACHE_HIRES_TEXTURES{{System::GFX, "Settings", "CacheHiresTextures"},
|
||||
false};
|
||||
const ConfigInfo<bool> GFX_DUMP_EFB_TARGET{{System::GFX, "Settings", "DumpEFBTarget"}, false};
|
||||
const ConfigInfo<bool> GFX_DUMP_XFB_TARGET{ { System::GFX, "Settings", "DumpXFBTarget" }, false };
|
||||
const ConfigInfo<bool> GFX_DUMP_XFB_TARGET{{System::GFX, "Settings", "DumpXFBTarget"}, false};
|
||||
const ConfigInfo<bool> GFX_DUMP_FRAMES_AS_IMAGES{{System::GFX, "Settings", "DumpFramesAsImages"},
|
||||
false};
|
||||
const ConfigInfo<bool> GFX_FREE_LOOK{{System::GFX, "Settings", "FreeLook"}, false};
|
||||
|
||||
@@ -28,17 +28,17 @@ bool IsSettingSaveable(const Config::ConfigLocation& config_location)
|
||||
// Graphics.Settings
|
||||
|
||||
Config::GFX_WIDESCREEN_HACK.location, Config::GFX_ASPECT_RATIO.location,
|
||||
Config::GFX_CROP.location,
|
||||
Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES.location, Config::GFX_SHOW_FPS.location,
|
||||
Config::GFX_SHOW_NETPLAY_PING.location, Config::GFX_SHOW_NETPLAY_MESSAGES.location,
|
||||
Config::GFX_LOG_RENDER_TIME_TO_FILE.location, Config::GFX_OVERLAY_STATS.location,
|
||||
Config::GFX_OVERLAY_PROJ_STATS.location, Config::GFX_DUMP_TEXTURES.location,
|
||||
Config::GFX_HIRES_TEXTURES.location, Config::GFX_CONVERT_HIRES_TEXTURES.location,
|
||||
Config::GFX_CACHE_HIRES_TEXTURES.location, Config::GFX_DUMP_EFB_TARGET.location,
|
||||
Config::GFX_DUMP_FRAMES_AS_IMAGES.location, Config::GFX_FREE_LOOK.location,
|
||||
Config::GFX_USE_FFV1.location, Config::GFX_DUMP_FORMAT.location,
|
||||
Config::GFX_DUMP_CODEC.location, Config::GFX_DUMP_PATH.location,
|
||||
Config::GFX_BITRATE_KBPS.location, Config::GFX_INTERNAL_RESOLUTION_FRAME_DUMPS.location,
|
||||
Config::GFX_CROP.location, Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES.location,
|
||||
Config::GFX_SHOW_FPS.location, Config::GFX_SHOW_NETPLAY_PING.location,
|
||||
Config::GFX_SHOW_NETPLAY_MESSAGES.location, Config::GFX_LOG_RENDER_TIME_TO_FILE.location,
|
||||
Config::GFX_OVERLAY_STATS.location, Config::GFX_OVERLAY_PROJ_STATS.location,
|
||||
Config::GFX_DUMP_TEXTURES.location, Config::GFX_HIRES_TEXTURES.location,
|
||||
Config::GFX_CONVERT_HIRES_TEXTURES.location, Config::GFX_CACHE_HIRES_TEXTURES.location,
|
||||
Config::GFX_DUMP_EFB_TARGET.location, Config::GFX_DUMP_FRAMES_AS_IMAGES.location,
|
||||
Config::GFX_FREE_LOOK.location, Config::GFX_USE_FFV1.location,
|
||||
Config::GFX_DUMP_FORMAT.location, Config::GFX_DUMP_CODEC.location,
|
||||
Config::GFX_DUMP_PATH.location, Config::GFX_BITRATE_KBPS.location,
|
||||
Config::GFX_INTERNAL_RESOLUTION_FRAME_DUMPS.location,
|
||||
Config::GFX_ENABLE_GPU_TEXTURE_DECODING.location, Config::GFX_ENABLE_PIXEL_LIGHTING.location,
|
||||
Config::GFX_FAST_DEPTH_CALC.location, Config::GFX_MSAA.location, Config::GFX_SSAA.location,
|
||||
Config::GFX_EFB_SCALE.location, Config::GFX_TEXFMT_OVERLAY_ENABLE.location,
|
||||
@@ -73,8 +73,7 @@ bool IsSettingSaveable(const Config::ConfigLocation& config_location)
|
||||
Config::GFX_HACK_EFB_ACCESS_ENABLE.location, Config::GFX_HACK_BBOX_ENABLE.location,
|
||||
Config::GFX_HACK_BBOX_PREFER_STENCIL_IMPLEMENTATION.location,
|
||||
Config::GFX_HACK_FORCE_PROGRESSIVE.location, Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM.location,
|
||||
Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM.location,
|
||||
Config::GFX_HACK_IMMEDIATE_XFB.location,
|
||||
Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM.location, Config::GFX_HACK_IMMEDIATE_XFB.location,
|
||||
Config::GFX_HACK_COPY_EFB_ENABLED.location,
|
||||
Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES.location,
|
||||
Config::GFX_HACK_VERTEX_ROUDING.location,
|
||||
|
||||
@@ -39,7 +39,6 @@ static void LoadFromDTM(Config::Layer* config_layer, Movie::DTMHeader* dtm)
|
||||
else
|
||||
config_layer->Set(Config::MAIN_GC_LANGUAGE, static_cast<int>(dtm->language));
|
||||
|
||||
|
||||
config_layer->Set(Config::GFX_HACK_EFB_ACCESS_ENABLE, dtm->bEFBAccessEnable);
|
||||
config_layer->Set(Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM, dtm->bSkipEFBCopyToRam);
|
||||
config_layer->Set(Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM, dtm->bSkipXFBCopyToRam);
|
||||
|
||||
@@ -799,9 +799,9 @@ void FakeVIUpdate(u32 xfb_address, u32 fb_width, u32 fb_height)
|
||||
m_VBlankTimingEven.PSB = 4;
|
||||
m_PictureConfiguration.WPL = fb_width / 16;
|
||||
m_PictureConfiguration.STD = fb_stride / 16;
|
||||
|
||||
|
||||
UpdateParameters();
|
||||
|
||||
|
||||
u32 total_halflines = GetHalfLinesPerEvenField() + GetHalfLinesPerOddField();
|
||||
|
||||
if ((s_half_line_count - s_even_field_first_hl) % total_halflines <
|
||||
|
||||
@@ -69,8 +69,7 @@ void HacksWidget::CreateWidgets()
|
||||
|
||||
m_store_xfb_copies = new GraphicsBool(tr("Store XFB Copies to Texture Only"),
|
||||
Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM);
|
||||
m_immediate_xfb = new GraphicsBool(tr("Immediately Present XFB"),
|
||||
Config::GFX_HACK_IMMEDIATE_XFB);
|
||||
m_immediate_xfb = new GraphicsBool(tr("Immediately Present XFB"), Config::GFX_HACK_IMMEDIATE_XFB);
|
||||
|
||||
xfb_layout->addWidget(m_store_xfb_copies, 1, 0);
|
||||
|
||||
@@ -171,15 +170,18 @@ void HacksWidget::AddDescriptions()
|
||||
"from RAM.\nLower accuracies cause in-game text to appear garbled in certain "
|
||||
"games.\n\nIf unsure, use the rightmost value.");
|
||||
|
||||
static const char* TR_STORE_XFB_TO_TEXTURE_DESCRIPTION = QT_TR_NOOP(
|
||||
static const char* TR_STORE_XFB_TO_TEXTURE_DESCRIPTION = QT_TR_NOOP(
|
||||
"Stores XFB Copies exclusively on the GPU, bypassing system memory. Causes graphical defects "
|
||||
"in a small number of games that need to readback from memory.\n\nEnabled = XFB Copies to Texture\nDisabled = XFB Copies to RAM "
|
||||
"in a small number of games that need to readback from memory.\n\nEnabled = XFB Copies to "
|
||||
"Texture\nDisabled = XFB Copies to RAM "
|
||||
"(and Texture)\n\nIf unsure, leave this checked.");
|
||||
|
||||
static const char* TR_IMMEDIATE_XFB_DESCRIPTION = QT_TR_NOOP(
|
||||
"Displays the XFB copies as soon as they are created, without waiting for scanout. Can cause graphical defects "
|
||||
"in some games if the game doesn't expect all XFB copies to be displayed. However, turning this setting on reduces latency."
|
||||
"\n\nIf unsure, leave this unchecked.");
|
||||
static const char* TR_IMMEDIATE_XFB_DESCRIPTION =
|
||||
QT_TR_NOOP("Displays the XFB copies as soon as they are created, without waiting for "
|
||||
"scanout. Can cause graphical defects "
|
||||
"in some games if the game doesn't expect all XFB copies to be displayed. "
|
||||
"However, turning this setting on reduces latency."
|
||||
"\n\nIf unsure, leave this unchecked.");
|
||||
|
||||
static const char* TR_GPU_DECODING_DESCRIPTION =
|
||||
QT_TR_NOOP("Enables texture decoding using the GPU instead of the CPU. This may result in "
|
||||
|
||||
@@ -1496,7 +1496,7 @@ void CFrame::ParseHotkeys()
|
||||
OSDChoice = 6;
|
||||
// Toggle immediate present of xfb
|
||||
Config::SetCurrent(Config::GFX_HACK_IMMEDIATE_XFB,
|
||||
!Config::Get(Config::GFX_HACK_IMMEDIATE_XFB));
|
||||
!Config::Get(Config::GFX_HACK_IMMEDIATE_XFB));
|
||||
}
|
||||
if (IsHotkey(HK_TOGGLE_FOG))
|
||||
{
|
||||
|
||||
@@ -202,13 +202,16 @@ static wxString skip_efb_copy_to_ram_desc = wxTRANSLATE(
|
||||
"in a small number of games.\n\nEnabled = EFB Copies to Texture\nDisabled = EFB Copies to RAM "
|
||||
"(and Texture)\n\nIf unsure, leave this checked.");
|
||||
static wxString skip_xfb_copy_to_ram_desc = wxTRANSLATE(
|
||||
"Stores XFB Copies exclusively on the GPU, bypassing system memory. Causes graphical defects "
|
||||
"in a small number of games that need to readback from memory.\n\nEnabled = XFB Copies to Texture\nDisabled = XFB Copies to RAM "
|
||||
"(and Texture)\n\nIf unsure, leave this checked.");
|
||||
static wxString immediate_xfb_desc = wxTRANSLATE(
|
||||
"Displays the XFB copies as soon as they are created, without waiting for scanout. Can cause graphical defects "
|
||||
"in some games if the game doesn't expect all XFB copies to be displayed. However, turning this setting on reduces latency."
|
||||
"\n\nIf unsure, leave this unchecked.");
|
||||
"Stores XFB Copies exclusively on the GPU, bypassing system memory. Causes graphical defects "
|
||||
"in a small number of games that need to readback from memory.\n\nEnabled = XFB Copies to "
|
||||
"Texture\nDisabled = XFB Copies to RAM "
|
||||
"(and Texture)\n\nIf unsure, leave this checked.");
|
||||
static wxString immediate_xfb_desc =
|
||||
wxTRANSLATE("Displays the XFB copies as soon as they are created, without waiting for scanout. "
|
||||
"Can cause graphical defects "
|
||||
"in some games if the game doesn't expect all XFB copies to be displayed. However, "
|
||||
"turning this setting on reduces latency."
|
||||
"\n\nIf unsure, leave this unchecked.");
|
||||
static wxString stc_desc =
|
||||
wxTRANSLATE("The \"Safe\" setting eliminates the likelihood of the GPU missing texture updates "
|
||||
"from RAM.\nLower accuracies cause in-game text to appear garbled in certain "
|
||||
@@ -248,7 +251,7 @@ static wxString cache_hires_textures_desc =
|
||||
static wxString dump_efb_desc = wxTRANSLATE(
|
||||
"Dump the contents of EFB copies to User/Dump/Textures/.\n\nIf unsure, leave this unchecked.");
|
||||
static wxString dump_xfb_desc = wxTRANSLATE(
|
||||
"Dump the contents of XFB copies to User/Dump/Textures/.\n\nIf unsure, leave this unchecked.");
|
||||
"Dump the contents of XFB copies to User/Dump/Textures/.\n\nIf unsure, leave this unchecked.");
|
||||
static wxString internal_resolution_frame_dumping_desc = wxTRANSLATE(
|
||||
"Create frame dumps and screenshots at the internal resolution of the renderer, rather than "
|
||||
"the size of the window it is displayed within. If the aspect ratio is widescreen, the output "
|
||||
@@ -779,21 +782,21 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string& title)
|
||||
szr_hacks->Add(szr_safetex, 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
||||
}
|
||||
|
||||
// - XFB
|
||||
// - XFB
|
||||
{
|
||||
wxStaticBoxSizer* const group_xfb =
|
||||
new wxStaticBoxSizer(wxVERTICAL, page_hacks, _("External Frame Buffer (XFB)"));
|
||||
|
||||
group_xfb->Add(CreateCheckBox(page_hacks, _("Store XFB Copies to Texture Only"),
|
||||
wxGetTranslation(skip_xfb_copy_to_ram_desc),
|
||||
Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM),
|
||||
0, wxLEFT | wxRIGHT, space5);
|
||||
wxGetTranslation(skip_xfb_copy_to_ram_desc),
|
||||
Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM),
|
||||
0, wxLEFT | wxRIGHT, space5);
|
||||
group_xfb->AddSpacer(space5);
|
||||
|
||||
group_xfb->Add(CreateCheckBox(page_hacks, _("Immediately Present XFB"),
|
||||
wxGetTranslation(immediate_xfb_desc),
|
||||
Config::GFX_HACK_IMMEDIATE_XFB),
|
||||
0, wxLEFT | wxRIGHT, space5);
|
||||
wxGetTranslation(immediate_xfb_desc),
|
||||
Config::GFX_HACK_IMMEDIATE_XFB),
|
||||
0, wxLEFT | wxRIGHT, space5);
|
||||
group_xfb->AddSpacer(space5);
|
||||
|
||||
szr_hacks->AddSpacer(space5);
|
||||
@@ -885,8 +888,9 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string& title)
|
||||
szr_utility->Add(CreateCheckBox(page_advanced, _("Dump EFB Target"),
|
||||
wxGetTranslation(dump_efb_desc),
|
||||
Config::GFX_DUMP_EFB_TARGET));
|
||||
szr_utility->Add(CreateCheckBox(page_advanced, _("Dump XFB Target"),
|
||||
wxGetTranslation(dump_xfb_desc), Config::GFX_DUMP_XFB_TARGET));
|
||||
szr_utility->Add(CreateCheckBox(page_advanced, _("Dump XFB Target"),
|
||||
wxGetTranslation(dump_xfb_desc),
|
||||
Config::GFX_DUMP_XFB_TARGET));
|
||||
szr_utility->Add(CreateCheckBox(page_advanced, _("Free Look"),
|
||||
wxGetTranslation(free_look_desc), Config::GFX_FREE_LOOK));
|
||||
#if defined(HAVE_FFMPEG)
|
||||
|
||||
@@ -157,7 +157,7 @@ void DXTexture::Unmap()
|
||||
{
|
||||
if (!m_staging_texture)
|
||||
return;
|
||||
|
||||
|
||||
D3D::context->Unmap(m_staging_texture, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,8 +46,8 @@ void PSTextureEncoder::Init()
|
||||
// TODO: This Texture is overly large and parts of it are unused
|
||||
// EFB2RAM copies use max (EFB_WIDTH * 4) by (EFB_HEIGHT / 4)
|
||||
// XFB2RAM copies use max (EFB_WIDTH / 2) by (EFB_HEIGHT)
|
||||
D3D11_TEXTURE2D_DESC t2dd = CD3D11_TEXTURE2D_DESC(DXGI_FORMAT_B8G8R8A8_UNORM, EFB_WIDTH * 4,
|
||||
1024, 1, 1, D3D11_BIND_RENDER_TARGET);
|
||||
D3D11_TEXTURE2D_DESC t2dd = CD3D11_TEXTURE2D_DESC(DXGI_FORMAT_B8G8R8A8_UNORM, EFB_WIDTH * 4, 1024,
|
||||
1, 1, D3D11_BIND_RENDER_TARGET);
|
||||
hr = D3D::device->CreateTexture2D(&t2dd, nullptr, &m_out);
|
||||
CHECK(SUCCEEDED(hr), "create efb encode output texture");
|
||||
D3D::SetDebugObjectName(m_out, "efb encoder output texture");
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
#include "VideoCommon/RenderState.h"
|
||||
#include "VideoCommon/SamplerCommon.h"
|
||||
#include "VideoCommon/VideoBackendBase.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
#include "VideoCommon/VideoCommon.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
#include "VideoCommon/XFMemory.h"
|
||||
|
||||
namespace DX11
|
||||
@@ -626,8 +626,8 @@ void Renderer::SwapImpl(AbstractTexture* texture, const EFBRectangle& rc, u64 ti
|
||||
auto* xfb_texture = static_cast<DXTexture*>(texture);
|
||||
TargetRectangle source_rc = xfb_texture->GetConfig().GetRect();
|
||||
|
||||
BlitScreen(source_rc, targetRc, xfb_texture->GetRawTexIdentifier(), xfb_texture->GetConfig().width,
|
||||
xfb_texture->GetConfig().height, Gamma);
|
||||
BlitScreen(source_rc, targetRc, xfb_texture->GetRawTexIdentifier(),
|
||||
xfb_texture->GetConfig().width, xfb_texture->GetConfig().height, Gamma);
|
||||
|
||||
// Reset viewport for drawing text
|
||||
D3D11_VIEWPORT vp =
|
||||
|
||||
@@ -25,7 +25,7 @@ static const char s_vertex_shader[] = "out vec2 uv0;\n"
|
||||
"void main(void) {\n"
|
||||
" vec2 rawpos = vec2(gl_VertexID&1, gl_VertexID&2);\n"
|
||||
" gl_Position = vec4(rawpos*2.0-1.0, 0.0, 1.0);\n"
|
||||
" uv0 = vec2(mix(src_rect.xy, src_rect.zw, rawpos));\n"
|
||||
" uv0 = vec2(mix(src_rect.xy, src_rect.zw, rawpos));\n"
|
||||
"}\n";
|
||||
|
||||
OpenGLPostProcessing::OpenGLPostProcessing() : m_initialized(false)
|
||||
|
||||
@@ -1353,7 +1353,8 @@ void Renderer::SwapImpl(AbstractTexture* texture, const EFBRectangle& rc, u64 ti
|
||||
|
||||
// Copy the framebuffer to screen.
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
BlitScreen(sourceRc, flipped_trc, xfb_texture->GetRawTexIdentifier(), xfb_texture->GetConfig().width, xfb_texture->GetConfig().height);
|
||||
BlitScreen(sourceRc, flipped_trc, xfb_texture->GetRawTexIdentifier(),
|
||||
xfb_texture->GetConfig().width, xfb_texture->GetConfig().height);
|
||||
|
||||
// Finish up the current frame, print some stats
|
||||
|
||||
|
||||
@@ -111,7 +111,8 @@ private:
|
||||
void UpdateEFBCache(EFBAccessType type, u32 cacheRectIdx, const EFBRectangle& efbPixelRc,
|
||||
const TargetRectangle& targetPixelRc, const void* data);
|
||||
|
||||
void DrawEFB(GLuint framebuffer, const TargetRectangle& target_rc, const TargetRectangle& source_rc);
|
||||
void DrawEFB(GLuint framebuffer, const TargetRectangle& target_rc,
|
||||
const TargetRectangle& source_rc);
|
||||
|
||||
void BlitScreen(TargetRectangle src, TargetRectangle dst, GLuint src_texture, int src_width,
|
||||
int src_height);
|
||||
|
||||
@@ -388,10 +388,10 @@ void main()
|
||||
void TextureCache::CreateTextureDecodingResources()
|
||||
{
|
||||
static const GLenum gl_view_types[TextureConversionShader::BUFFER_FORMAT_COUNT] = {
|
||||
GL_R8UI, // BUFFER_FORMAT_R8_UINT
|
||||
GL_R16UI, // BUFFER_FORMAT_R16_UINT
|
||||
GL_RG32UI, // BUFFER_FORMAT_R32G32_UINT
|
||||
GL_RGBA8UI, // BUFFER_FORMAT_RGBA8_UINT
|
||||
GL_R8UI, // BUFFER_FORMAT_R8_UINT
|
||||
GL_R16UI, // BUFFER_FORMAT_R16_UINT
|
||||
GL_RG32UI, // BUFFER_FORMAT_R32G32_UINT
|
||||
GL_RGBA8UI, // BUFFER_FORMAT_RGBA8_UINT
|
||||
};
|
||||
|
||||
glGenTextures(TextureConversionShader::BUFFER_FORMAT_COUNT,
|
||||
|
||||
@@ -22,9 +22,9 @@ void copy_region(const T* const source, const MathUtil::Rectangle<int>& srcrect,
|
||||
int destination_y = i + dstrect.top;
|
||||
int destination_offset = (destination_y * dstrect.GetWidth()) + destination_x;
|
||||
|
||||
double src_x = std::round(destination_x*x_ratio) + srcrect.left;
|
||||
double src_y = std::round(destination_y*y_ratio) + srcrect.top;
|
||||
int src_offset = static_cast<int>((src_y*srcrect.GetWidth()) + src_x);
|
||||
double src_x = std::round(destination_x * x_ratio) + srcrect.left;
|
||||
double src_y = std::round(destination_y * y_ratio) + srcrect.top;
|
||||
int src_offset = static_cast<int>((src_y * srcrect.GetWidth()) + src_x);
|
||||
|
||||
destination[destination_offset] = source[src_offset];
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
namespace EfbCopy
|
||||
{
|
||||
|
||||
void ClearEfb()
|
||||
{
|
||||
u32 clearColor = (bpmem.clearcolorAR & 0xff) << 24 | bpmem.clearcolorGB << 8 |
|
||||
@@ -34,5 +33,4 @@ void ClearEfb()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -497,7 +497,8 @@ u8* GetPixelPointer(u16 x, u16 y, bool depth)
|
||||
return &efb[GetColorOffset(x, y)];
|
||||
}
|
||||
|
||||
void EncodeXFB(yuv422_packed* xfb_in_ram, u32 memory_stride, const EFBRectangle& source_rect, float y_scale)
|
||||
void EncodeXFB(yuv422_packed* xfb_in_ram, u32 memory_stride, const EFBRectangle& source_rect,
|
||||
float y_scale)
|
||||
{
|
||||
if (!xfb_in_ram)
|
||||
{
|
||||
@@ -543,8 +544,7 @@ void EncodeXFB(yuv422_packed* xfb_in_ram, u32 memory_stride, const EFBRectangle&
|
||||
src_ptr[x].Y = scanline[i].Y + 16;
|
||||
// we mix our color differences in 10 bit space so it will round more accurately
|
||||
// U[i] = 1/4 * U[i-1] + 1/2 * U[i] + 1/4 * U[i+1]
|
||||
src_ptr[x].UV =
|
||||
128 + ((scanline[i - 1].U + (scanline[i].U << 1) + scanline[i + 1].U) >> 2);
|
||||
src_ptr[x].UV = 128 + ((scanline[i - 1].U + (scanline[i].U << 1) + scanline[i + 1].U) >> 2);
|
||||
|
||||
// YV pixel
|
||||
src_ptr[x + 1].Y = scanline[i + 1].Y + 16;
|
||||
@@ -556,7 +556,9 @@ void EncodeXFB(yuv422_packed* xfb_in_ram, u32 memory_stride, const EFBRectangle&
|
||||
}
|
||||
|
||||
// Apply y scaling and copy to the xfb memory location
|
||||
SW::copy_region(source.data(), source_rect, xfb_in_ram, EFBRectangle{ source_rect.left, source_rect.top, source_rect.right, static_cast<int>(static_cast<float>(source_rect.bottom) * y_scale) });
|
||||
SW::copy_region(source.data(), source_rect, xfb_in_ram,
|
||||
EFBRectangle{source_rect.left, source_rect.top, source_rect.right,
|
||||
static_cast<int>(static_cast<float>(source_rect.bottom) * y_scale)});
|
||||
}
|
||||
|
||||
bool ZCompare(u16 x, u16 y, u32 z)
|
||||
|
||||
@@ -57,7 +57,8 @@ u32 GetDepth(u16 x, u16 y);
|
||||
|
||||
u8* GetPixelPointer(u16 x, u16 y, bool depth);
|
||||
|
||||
void EncodeXFB(yuv422_packed* xfb_in_ram, u32 memory_stride, const EFBRectangle& source_rect, float y_scale);
|
||||
void EncodeXFB(yuv422_packed* xfb_in_ram, u32 memory_stride, const EFBRectangle& source_rect,
|
||||
float y_scale);
|
||||
|
||||
extern u32 perf_values[PQ_NUM_MEMBERS];
|
||||
inline void IncPerfCounterQuadCount(PerfQueryType type)
|
||||
|
||||
@@ -92,7 +92,7 @@ void SWOGLWindow::PrintText(const std::string& text, int x, int y, u32 color)
|
||||
|
||||
void SWOGLWindow::ShowImage(AbstractTexture* image, float aspect)
|
||||
{
|
||||
SW::SWTexture * sw_image = static_cast<SW::SWTexture*>(image);
|
||||
SW::SWTexture* sw_image = static_cast<SW::SWTexture*>(image);
|
||||
GLInterface->Update(); // just updates the render window position and the backbuffer size
|
||||
|
||||
GLsizei glWidth = (GLsizei)GLInterface->GetBackBufferWidth();
|
||||
|
||||
@@ -31,7 +31,6 @@ public:
|
||||
|
||||
private:
|
||||
SWOGLWindow() {}
|
||||
|
||||
struct TextData
|
||||
{
|
||||
std::string text;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user