Merge pull request #339 from magumagu/opengl-unused-parameter

OpenGL: delete unused function parameter in TextureConverter.
This commit is contained in:
Tony Wasserka 2014-05-05 20:05:08 +02:00
commit 093ee090b8
1 changed files with 5 additions and 10 deletions

View File

@ -47,7 +47,7 @@ static int s_encodingUniforms[NUM_ENCODING_PROGRAMS];
static GLuint s_PBO = 0; // for readback with different strides static GLuint s_PBO = 0; // for readback with different strides
void CreatePrograms() static void CreatePrograms()
{ {
/* TODO: Accuracy Improvements /* TODO: Accuracy Improvements
* *
@ -129,7 +129,7 @@ void CreatePrograms()
ProgramShaderCache::CompileShader(s_yuyvToRgbProgram, VProgramYuyvToRgb, FProgramYuyvToRgb); ProgramShaderCache::CompileShader(s_yuyvToRgbProgram, VProgramYuyvToRgb, FProgramYuyvToRgb);
} }
SHADER &GetOrCreateEncodingShader(u32 format) static SHADER &GetOrCreateEncodingShader(u32 format)
{ {
if (format > NUM_ENCODING_PROGRAMS) if (format > NUM_ENCODING_PROGRAMS)
{ {
@ -210,7 +210,7 @@ void Shutdown()
s_texConvFrameBuffer[1] = 0; s_texConvFrameBuffer[1] = 0;
} }
void EncodeToRamUsingShader(GLuint srcTexture, const TargetRectangle& sourceRc, static void EncodeToRamUsingShader(GLuint srcTexture,
u8* destAddr, int dstWidth, int dstHeight, int readStride, u8* destAddr, int dstWidth, int dstHeight, int readStride,
bool linearFilter) bool linearFilter)
{ {
@ -322,18 +322,13 @@ int EncodeToRamFromTexture(u32 address,GLuint source_texture, bool bFromZBuffer,
source.left, source.top, source.left, source.top,
expandedWidth, bScaleByHalf ? 2 : 1); expandedWidth, bScaleByHalf ? 2 : 1);
TargetRectangle scaledSource;
scaledSource.top = 0;
scaledSource.bottom = expandedHeight;
scaledSource.left = 0;
scaledSource.right = expandedWidth / samples;
int cacheBytes = 32; int cacheBytes = 32;
if ((format & 0x0f) == 6) if ((format & 0x0f) == 6)
cacheBytes = 64; cacheBytes = 64;
int readStride = (expandedWidth * cacheBytes) / int readStride = (expandedWidth * cacheBytes) /
TexDecoder_GetBlockWidthInTexels(format); TexDecoder_GetBlockWidthInTexels(format);
EncodeToRamUsingShader(source_texture, scaledSource, EncodeToRamUsingShader(source_texture,
dest_ptr, expandedWidth / samples, expandedHeight, readStride, dest_ptr, expandedWidth / samples, expandedHeight, readStride,
bScaleByHalf > 0 && !bFromZBuffer); bScaleByHalf > 0 && !bFromZBuffer);
return size_in_bytes; // TODO: D3D11 is calculating this value differently! return size_in_bytes; // TODO: D3D11 is calculating this value differently!
@ -351,7 +346,7 @@ void EncodeToRamYUYV(GLuint srcTexture, const TargetRectangle& sourceRc, u8* des
// We enable linear filtering, because the gamecube does filtering in the vertical direction when // We enable linear filtering, because the gamecube does filtering in the vertical direction when
// yscale is enabled. // yscale is enabled.
// Otherwise we get jaggies when a game uses yscaling (most PAL games) // Otherwise we get jaggies when a game uses yscaling (most PAL games)
EncodeToRamUsingShader(srcTexture, sourceRc, destAddr, dstWidth / 2, dstHeight, dstWidth*dstHeight*2, true); EncodeToRamUsingShader(srcTexture, destAddr, dstWidth / 2, dstHeight, dstWidth*dstHeight*2, true);
FramebufferManager::SetFramebuffer(0); FramebufferManager::SetFramebuffer(0);
TextureCache::DisableStage(0); TextureCache::DisableStage(0);
g_renderer->RestoreAPIState(); g_renderer->RestoreAPIState();