Merge pull request #52 from cxd4/master

Start to debug memory leaks or RDP messages in Glide64 debug.
This commit is contained in:
zilmar 2015-02-05 08:59:36 +11:00
commit 40efe91224
4 changed files with 13 additions and 13 deletions

View File

@ -15612,7 +15612,7 @@ void Combine ()
current = left + ((right-left) >> 1); current = left + ((right-left) >> 1);
if (current == last) if (current == last)
{ {
FRDP("Warning! Could not initialize current_combiner to valid index.\n"); FRDP_E("Could not initialize current_combiner to valid index.\n");
current_combine = ~0u; /* Debug uncertain case, and fix warning (cxd4). */ current_combine = ~0u; /* Debug uncertain case, and fix warning (cxd4). */
break; // can't be found! break; // can't be found!
} }
@ -16018,7 +16018,7 @@ void ColorCombinerToExtension ()
ext_local_a = GR_CMBX_ITALPHA; ext_local_a = GR_CMBX_ITALPHA;
break; break;
default: default:
FRDP("Invalid combiner locality %u.\n", cmb.c_loc); FRDP_E("Invalid combiner locality %u.\n", cmb.c_loc);
case GR_COMBINE_LOCAL_CONSTANT: case GR_COMBINE_LOCAL_CONSTANT:
ext_local = GR_CMBX_CONSTANT_COLOR; ext_local = GR_CMBX_CONSTANT_COLOR;
ext_local_a = GR_CMBX_CONSTANT_ALPHA; ext_local_a = GR_CMBX_CONSTANT_ALPHA;
@ -16035,7 +16035,7 @@ void ColorCombinerToExtension ()
ext_other_a = GR_CMBX_TEXTURE_ALPHA; ext_other_a = GR_CMBX_TEXTURE_ALPHA;
break; break;
default: default:
FRDP("Invalid combiner flag %u.\n", cmb.c_oth); FRDP_E("Invalid combiner flag %u.\n", cmb.c_oth);
case GR_COMBINE_OTHER_CONSTANT: case GR_COMBINE_OTHER_CONSTANT:
ext_other = GR_CMBX_CONSTANT_COLOR; ext_other = GR_CMBX_CONSTANT_COLOR;
ext_other_a = GR_CMBX_CONSTANT_ALPHA; ext_other_a = GR_CMBX_CONSTANT_ALPHA;
@ -16382,7 +16382,7 @@ void TexColorCombinerToExtension (GrChipID_t tmu)
tc_ext_c_invert = 1; tc_ext_c_invert = 1;
break; break;
default: default:
FRDP("Invalid combiner TMU factor %u.\n", tmu_fac); FRDP_E("Invalid combiner TMU factor %u.\n", tmu_fac);
case GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR: case GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR:
tc_ext_c = GR_CMBX_DETAIL_FACTOR; tc_ext_c = GR_CMBX_DETAIL_FACTOR;
tc_ext_c_invert = 1; tc_ext_c_invert = 1;
@ -16478,7 +16478,7 @@ void TexColorCombinerToExtension (GrChipID_t tmu)
tc_ext_d_invert = 0; tc_ext_d_invert = 0;
break; break;
default: default:
FRDP("Invalid combiner TMU function %u.\n", tmu_func); FRDP_E("Invalid combiner TMU function %u.\n", tmu_func);
case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA: case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA:
tc_ext_a = GR_CMBX_LOCAL_TEXTURE_RGB; tc_ext_a = GR_CMBX_LOCAL_TEXTURE_RGB;
tc_ext_a_mode = GR_FUNC_MODE_ZERO; tc_ext_a_mode = GR_FUNC_MODE_ZERO;
@ -16563,7 +16563,7 @@ void TexAlphaCombinerToExtension (GrChipID_t tmu)
ta_ext_c_invert = 1; ta_ext_c_invert = 1;
break; break;
default: default:
FRDP("Invalid combiner alpha factor %u.\n", tmu_a_fac); FRDP_E("Invalid combiner alpha factor %u.\n", tmu_a_fac);
case GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR: case GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR:
ta_ext_c = GR_CMBX_DETAIL_FACTOR; ta_ext_c = GR_CMBX_DETAIL_FACTOR;
ta_ext_c_invert = 1; ta_ext_c_invert = 1;
@ -16628,7 +16628,7 @@ void TexAlphaCombinerToExtension (GrChipID_t tmu)
ta_ext_d_invert = 0; ta_ext_d_invert = 0;
break; break;
default: default:
FRDP("Invalid combiner alpha coverage function %u.\n", tmu_a_func); FRDP_E("Invalid combiner alpha coverage function %u.\n", tmu_a_func);
case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL: case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL:
case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA: case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA:
ta_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA;

View File

@ -38,7 +38,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(Root)Source/3rd Party/wx/include&quot;;&quot;$(Root)Source/3rd Party/wx/include/msvc&quot;;inc" AdditionalIncludeDirectories="&quot;$(Root)Source/3rd Party/wx/include&quot;;&quot;$(Root)Source/3rd Party/wx/include/msvc&quot;;inc"
PreprocessorDefinitions="__MSC__;" PreprocessorDefinitions="__MSC__;RDP_LOGGING;RDP_ERROR_LOG;"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
/> />
<Tool <Tool

View File

@ -49,7 +49,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>$(Root)Source/3rd Party/wx/include;$(Root)Source/3rd Party/wx/include/msvc;inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(Root)Source/3rd Party/wx/include;$(Root)Source/3rd Party/wx/include/msvc;inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>__MSC__;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>__MSC__;RDP_LOGGING;RDP_ERROR_LOG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader /> <PrecompiledHeader />
</ClCompile> </ClCompile>
<Link> <Link>

View File

@ -100,7 +100,7 @@ static void uc9_draw_object (wxUint8 * addr, wxUint32 type)
wxUint32 textured, vnum, vsize; wxUint32 textured, vnum, vsize;
switch (type) { switch (type) {
default: /* added to fix uninitialized variable warnings + debugging */ default: /* added to fix uninitialized variable warnings + debugging */
FRDP("Unknown geometric primitive type %u.\n", type); FRDP_E("Unknown geometric primitive type %u.\n", type);
case 0: //null case 0: //null
textured = vnum = vsize = 0; textured = vnum = vsize = 0;
break; break;
@ -268,7 +268,7 @@ static void uc9_fmlight ()
break; break;
default: default:
m = NULL; /* allowing segfaults to debug in case of PJGlide64 bugs */ m = NULL; /* allowing segfaults to debug in case of PJGlide64 bugs */
FRDP("Invalid FM light matrix ID %u.\n", mid); FRDP_E("Invalid FM light matrix ID %u.\n", mid);
break; break;
} }
@ -407,7 +407,7 @@ static void uc9_mtxcat ()
LRDP("Comb * "); LRDP("Comb * ");
break; break;
default: default:
FRDP("Invalid mutex S-coordinate: %u\n", S); FRDP_E("Invalid mutex S-coordinate: %u\n", S);
s = NULL; /* intentional segfault to alert for bugs in PJGlide64 (cxd4) */ s = NULL; /* intentional segfault to alert for bugs in PJGlide64 (cxd4) */
break; break;
} }
@ -425,7 +425,7 @@ static void uc9_mtxcat ()
t = (M44*)rdp.combined; t = (M44*)rdp.combined;
break; break;
default: default:
FRDP("Invalid mutex T-coordinate: %u\n", T); FRDP_E("Invalid mutex T-coordinate: %u\n", T);
t = NULL; /* intentional segfault to alert for bugs in PJGlide64 (cxd4) */ t = NULL; /* intentional segfault to alert for bugs in PJGlide64 (cxd4) */
break; break;
} }