mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-14 18:00:54 +00:00
Fix error messages and check that we're actually validating floats
This commit is contained in:
1 parent
792f9f1766
commit
3e0b71de60
1 file changed
+15
-18
@@ -3655,38 +3655,35 @@ State State::GetNext(GlobalState &global, State quad[4]) const
|
||||
|
||||
for(uint32_t i = 0; i < ddxCalc.columns; i++)
|
||||
{
|
||||
if(_isnan(ddxCalc.value.fv[i]) || !_finite(ddxCalc.value.fv[i]))
|
||||
if(ddxType == 0 && (_isnan(ddxCalc.value.fv[i]) || !_finite(ddxCalc.value.fv[i])))
|
||||
{
|
||||
RDCWARN("NaN or Inf in texlookup");
|
||||
ddxCalc.value.fv[i] = 0.0f;
|
||||
|
||||
device->AddDebugMessage(
|
||||
eDbgCategory_Shaders, eDbgSeverity_High, eDbgSource_RuntimeWarning,
|
||||
StringFormat::Fmt(
|
||||
"Shader debugging %d: %s\nNaN or Inf found in texture lookup - using 0.0 instead",
|
||||
s.nextInstruction - 1, op.str));
|
||||
device->AddDebugMessage(eDbgCategory_Shaders, eDbgSeverity_High, eDbgSource_RuntimeWarning,
|
||||
StringFormat::Fmt("Shader debugging %d: %s\nNaN or Inf found in "
|
||||
"texture lookup ddx - using 0.0 instead",
|
||||
s.nextInstruction - 1, op.str.c_str()));
|
||||
}
|
||||
if(_isnan(ddyCalc.value.fv[i]) || !_finite(ddyCalc.value.fv[i]))
|
||||
if(ddyType == 0 && (_isnan(ddyCalc.value.fv[i]) || !_finite(ddyCalc.value.fv[i])))
|
||||
{
|
||||
RDCWARN("NaN or Inf in texlookup");
|
||||
ddyCalc.value.fv[i] = 0.0f;
|
||||
|
||||
device->AddDebugMessage(
|
||||
eDbgCategory_Shaders, eDbgSeverity_High, eDbgSource_RuntimeWarning,
|
||||
StringFormat::Fmt(
|
||||
"Shader debugging %d: %s\nNaN or Inf found in texture lookup - using 0.0 instead",
|
||||
s.nextInstruction - 1, op.str));
|
||||
device->AddDebugMessage(eDbgCategory_Shaders, eDbgSeverity_High, eDbgSource_RuntimeWarning,
|
||||
StringFormat::Fmt("Shader debugging %d: %s\nNaN or Inf found in "
|
||||
"texture lookup ddy - using 0.0 instead",
|
||||
s.nextInstruction - 1, op.str.c_str()));
|
||||
}
|
||||
if(_isnan(uv.value.fv[i]) || !_finite(uv.value.fv[i]))
|
||||
if(texcoordType == 0 && (_isnan(uv.value.fv[i]) || !_finite(uv.value.fv[i])))
|
||||
{
|
||||
RDCWARN("NaN or Inf in texlookup");
|
||||
uv.value.fv[i] = 0.0f;
|
||||
|
||||
device->AddDebugMessage(
|
||||
eDbgCategory_Shaders, eDbgSeverity_High, eDbgSource_RuntimeWarning,
|
||||
StringFormat::Fmt(
|
||||
"Shader debugging %d: %s\nNaN or Inf found in texture lookup - using 0.0 instead",
|
||||
s.nextInstruction - 1, op.str));
|
||||
device->AddDebugMessage(eDbgCategory_Shaders, eDbgSeverity_High, eDbgSource_RuntimeWarning,
|
||||
StringFormat::Fmt("Shader debugging %d: %s\nNaN or Inf found in "
|
||||
"texture lookup uv - using 0.0 instead",
|
||||
s.nextInstruction - 1, op.str.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user