mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
TextureCache: Extract BP enum check to VideoCommon.
We have TOO many video backends.
This commit is contained in:
@ -270,7 +270,7 @@ static void EncodeToRamUsingShader(GLuint srcTexture, u8* destAddr, u32 dst_line
|
||||
}
|
||||
|
||||
void EncodeToRamFromTexture(u8* dest_ptr, u32 format, u32 native_width, u32 bytes_per_row,
|
||||
u32 num_blocks_y, u32 memory_stride, PEControl::PixelFormat srcFormat,
|
||||
u32 num_blocks_y, u32 memory_stride, bool is_depth_copy,
|
||||
bool bIsIntensityFmt, int bScaleByHalf, const EFBRectangle& source)
|
||||
{
|
||||
g_renderer->ResetAPIState();
|
||||
@ -281,12 +281,11 @@ void EncodeToRamFromTexture(u8* dest_ptr, u32 format, u32 native_width, u32 byte
|
||||
glUniform4i(s_encodingUniforms[format], source.left, source.top, native_width,
|
||||
bScaleByHalf ? 2 : 1);
|
||||
|
||||
const GLuint read_texture = (srcFormat == PEControl::Z24) ?
|
||||
FramebufferManager::ResolveAndGetDepthTarget(source) :
|
||||
FramebufferManager::ResolveAndGetRenderTarget(source);
|
||||
const GLuint read_texture = is_depth_copy ? FramebufferManager::ResolveAndGetDepthTarget(source) :
|
||||
FramebufferManager::ResolveAndGetRenderTarget(source);
|
||||
|
||||
EncodeToRamUsingShader(read_texture, dest_ptr, bytes_per_row, num_blocks_y, memory_stride,
|
||||
bScaleByHalf > 0 && srcFormat != PEControl::Z24);
|
||||
bScaleByHalf > 0 && !is_depth_copy);
|
||||
|
||||
FramebufferManager::SetFramebuffer(0);
|
||||
g_renderer->RestoreAPIState();
|
||||
|
Reference in New Issue
Block a user