VideoCommon: Fix -Wsign-compare warnings.
This commit is contained in:
parent
d4125231f3
commit
239eaf122a
|
@ -55,7 +55,7 @@ public:
|
|||
static int ScaleToVirtualXfbWidth(int x, unsigned int backbuffer_width);
|
||||
static int ScaleToVirtualXfbHeight(int y, unsigned int backbuffer_height);
|
||||
|
||||
static int GetEFBLayers() { return m_EFBLayers; }
|
||||
static unsigned int GetEFBLayers() { return m_EFBLayers; }
|
||||
|
||||
protected:
|
||||
struct VirtualXFB
|
||||
|
|
|
@ -893,16 +893,17 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
|
|||
unsigned int scaled_tex_w = g_ActiveConfig.bCopyEFBScaled ? Renderer::EFBToScaledX(tex_w) : tex_w;
|
||||
unsigned int scaled_tex_h = g_ActiveConfig.bCopyEFBScaled ? Renderer::EFBToScaledY(tex_h) : tex_h;
|
||||
|
||||
const unsigned int efb_layers = FramebufferManagerBase::GetEFBLayers();
|
||||
|
||||
TCacheEntryBase *entry = textures[dstAddr];
|
||||
if (entry)
|
||||
{
|
||||
if (entry->type == TCET_EC_DYNAMIC && entry->native_width == tex_w && entry->native_height == tex_h && entry->num_layers == FramebufferManagerBase::GetEFBLayers())
|
||||
if (entry->type == TCET_EC_DYNAMIC && entry->native_width == tex_w && entry->native_height == tex_h && entry->num_layers == efb_layers)
|
||||
{
|
||||
scaled_tex_w = tex_w;
|
||||
scaled_tex_h = tex_h;
|
||||
}
|
||||
else if (!(entry->type == TCET_EC_VRAM && entry->virtual_width == scaled_tex_w && entry->virtual_height == scaled_tex_h && entry->num_layers == FramebufferManagerBase::GetEFBLayers()))
|
||||
else if (!(entry->type == TCET_EC_VRAM && entry->virtual_width == scaled_tex_w && entry->virtual_height == scaled_tex_h && entry->num_layers == efb_layers))
|
||||
{
|
||||
if (entry->type == TCET_EC_VRAM)
|
||||
{
|
||||
|
@ -925,7 +926,7 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
|
|||
textures[dstAddr] = entry = AllocateRenderTarget(scaled_tex_w, scaled_tex_h);
|
||||
|
||||
// TODO: Using the wrong dstFormat, dumb...
|
||||
entry->SetGeneralParameters(dstAddr, 0, dstFormat, 1, FramebufferManagerBase::GetEFBLayers());
|
||||
entry->SetGeneralParameters(dstAddr, 0, dstFormat, 1, efb_layers);
|
||||
entry->SetDimensions(tex_w, tex_h, scaled_tex_w, scaled_tex_h);
|
||||
entry->SetHashes(TEXHASH_INVALID);
|
||||
entry->type = TCET_EC_VRAM;
|
||||
|
|
Loading…
Reference in New Issue