mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-18 11:42:36 +00:00
On linux use the current desktop resolution for the default fullscreen resolution, instead of the hard coded 640x480 resolution.
Also if the OpenGL backend throw a panic alert if the RGB to/from YUYV shaders fail to compile instead of an error log. If these shaders fail to compile it should be reported. I am not sure that a panic alert should be thrown in general when any shader fails to compile (as was discussed on IRC). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7677 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
2eb1565aaa
commit
a154df1e7c
@ -219,8 +219,10 @@ void XRRConfiguration::Update()
|
|||||||
char *output_name = NULL;
|
char *output_name = NULL;
|
||||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.find(':') ==
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.find(':') ==
|
||||||
std::string::npos)
|
std::string::npos)
|
||||||
sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(),
|
{
|
||||||
"%ux%u", &fullWidth, &fullHeight);
|
fullWidth = fb_width;
|
||||||
|
fullHeight = fb_height;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(),
|
sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(),
|
||||||
"%a[^:]: %ux%u", &output_name, &fullWidth, &fullHeight);
|
"%a[^:]: %ux%u", &output_name, &fullWidth, &fullHeight);
|
||||||
|
@ -77,9 +77,8 @@ void CreateRgbToYuyvProgram()
|
|||||||
" ocol0 = float4(dot(c1,y_const),dot(c01,u_const),dot(c0,y_const),dot(c01, v_const)) + const3;\n"
|
" ocol0 = float4(dot(c1,y_const),dot(c01,u_const),dot(c0,y_const),dot(c01, v_const)) + const3;\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
|
|
||||||
if (!PixelShaderCache::CompilePixelShader(s_rgbToYuyvProgram, FProgram)) {
|
if (!PixelShaderCache::CompilePixelShader(s_rgbToYuyvProgram, FProgram))
|
||||||
ERROR_LOG(VIDEO, "Failed to create RGB to YUYV fragment program");
|
PanicAlertT("Failed to create RGB to YUYV fragment program\nReport this issue.");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateYuyvToRgbProgram()
|
void CreateYuyvToRgbProgram()
|
||||||
@ -104,9 +103,8 @@ void CreateYuyvToRgbProgram()
|
|||||||
" 1.0f);\n"
|
" 1.0f);\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
|
|
||||||
if (!PixelShaderCache::CompilePixelShader(s_yuyvToRgbProgram, FProgram)) {
|
if (!PixelShaderCache::CompilePixelShader(s_yuyvToRgbProgram, FProgram))
|
||||||
ERROR_LOG(VIDEO, "Failed to create YUYV to RGB fragment program");
|
PanicAlertT("Failed to create YUYV to RGB fragment program\nReport this issue.");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FRAGMENTSHADER &GetOrCreateEncodingShader(u32 format)
|
FRAGMENTSHADER &GetOrCreateEncodingShader(u32 format)
|
||||||
@ -122,7 +120,8 @@ FRAGMENTSHADER &GetOrCreateEncodingShader(u32 format)
|
|||||||
const char* shader = TextureConversionShader::GenerateEncodingShader(format,API_OPENGL);
|
const char* shader = TextureConversionShader::GenerateEncodingShader(format,API_OPENGL);
|
||||||
|
|
||||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||||
if (g_ActiveConfig.iLog & CONF_SAVESHADERS && shader) {
|
if (g_ActiveConfig.iLog & CONF_SAVESHADERS && shader)
|
||||||
|
{
|
||||||
static int counter = 0;
|
static int counter = 0;
|
||||||
char szTemp[MAX_PATH];
|
char szTemp[MAX_PATH];
|
||||||
sprintf(szTemp, "%senc_%04i.txt", File::GetUserPath(D_DUMP_IDX).c_str(), counter++);
|
sprintf(szTemp, "%senc_%04i.txt", File::GetUserPath(D_DUMP_IDX).c_str(), counter++);
|
||||||
@ -176,7 +175,8 @@ void Shutdown()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EncodeToRamUsingShader(FRAGMENTSHADER& shader, GLuint srcTexture, const TargetRectangle& sourceRc,
|
void EncodeToRamUsingShader(FRAGMENTSHADER& shader, GLuint srcTexture, const TargetRectangle& sourceRc,
|
||||||
u8* destAddr, int dstWidth, int dstHeight, int readStride, bool toTexture, bool linearFilter)
|
u8* destAddr, int dstWidth, int dstHeight, int readStride,
|
||||||
|
bool toTexture, bool linearFilter)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@ -441,11 +441,13 @@ void DecodeToTexture(u32 xfbAddr, int srcWidth, int srcHeight, GLuint destTextur
|
|||||||
// TODO: make this less slow. (How?)
|
// TODO: make this less slow. (How?)
|
||||||
if((GLsizei)s_srcTextureWidth == (GLsizei)srcFmtWidth && (GLsizei)s_srcTextureHeight == (GLsizei)srcHeight)
|
if((GLsizei)s_srcTextureWidth == (GLsizei)srcFmtWidth && (GLsizei)s_srcTextureHeight == (GLsizei)srcHeight)
|
||||||
{
|
{
|
||||||
glTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB, 0,0,0,s_srcTextureWidth, s_srcTextureHeight, GL_BGRA, GL_UNSIGNED_BYTE, srcAddr);
|
glTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB, 0,0,0,s_srcTextureWidth, s_srcTextureHeight,
|
||||||
|
GL_BGRA, GL_UNSIGNED_BYTE, srcAddr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8, (GLsizei)srcFmtWidth, (GLsizei)srcHeight, 0, GL_BGRA, GL_UNSIGNED_BYTE, srcAddr);
|
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8, (GLsizei)srcFmtWidth, (GLsizei)srcHeight,
|
||||||
|
0, GL_BGRA, GL_UNSIGNED_BYTE, srcAddr);
|
||||||
s_srcTextureWidth = (GLsizei)srcFmtWidth;
|
s_srcTextureWidth = (GLsizei)srcFmtWidth;
|
||||||
s_srcTextureHeight = (GLsizei)srcHeight;
|
s_srcTextureHeight = (GLsizei)srcHeight;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user