mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
reduced frequency of dx9 ps_2_0 pixel generation errors, and made dx9 efb depth peek of 16-bit depth buffer not use 24-bit adjustment factor. shouldn't affect other the plugins.
(probably nobody else cares, but I need at least one video plugin that actually works on this computer) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6618 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -52,6 +52,7 @@ static LPDIRECT3DPIXELSHADER9 s_yuyvToRgbProgram = NULL;
|
||||
// Not all slots are taken - but who cares.
|
||||
const u32 NUM_ENCODING_PROGRAMS = 64;
|
||||
static LPDIRECT3DPIXELSHADER9 s_encodingPrograms[NUM_ENCODING_PROGRAMS];
|
||||
static bool s_encodingProgramsFailed[NUM_ENCODING_PROGRAMS];
|
||||
|
||||
void CreateRgbToYuyvProgram()
|
||||
{
|
||||
@ -121,6 +122,13 @@ LPDIRECT3DPIXELSHADER9 GetOrCreateEncodingShader(u32 format)
|
||||
|
||||
if (!s_encodingPrograms[format])
|
||||
{
|
||||
if(s_encodingProgramsFailed[format])
|
||||
{
|
||||
// we already failed to create a shader for this format,
|
||||
// so instead of re-trying and showing the same error message every frame, just return.
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* shader = TextureConversionShader::GenerateEncodingShader(format,API_D3D9);
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
@ -135,6 +143,7 @@ LPDIRECT3DPIXELSHADER9 GetOrCreateEncodingShader(u32 format)
|
||||
s_encodingPrograms[format] = D3D::CompileAndCreatePixelShader(shader, (int)strlen(shader));
|
||||
if (!s_encodingPrograms[format]) {
|
||||
ERROR_LOG(VIDEO, "Failed to create encoding fragment program");
|
||||
s_encodingProgramsFailed[format] = true;
|
||||
}
|
||||
}
|
||||
return s_encodingPrograms[format];
|
||||
@ -145,6 +154,7 @@ void Init()
|
||||
for (unsigned int i = 0; i < NUM_ENCODING_PROGRAMS; i++)
|
||||
{
|
||||
s_encodingPrograms[i] = NULL;
|
||||
s_encodingProgramsFailed[i] = false;
|
||||
}
|
||||
for (unsigned int i = 0; i < NUM_TRANSFORM_BUFFERS; i++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user