mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 04:50:35 +00:00
Clamp out-of-bounds undefined results for resinfo
This commit is contained in:
@@ -520,7 +520,7 @@ float4 main(v2f IN) : SV_Target0
|
||||
{
|
||||
uint width = 0, height = 0, numLevels = 0;
|
||||
dimtex.GetDimensions(10, width, height, numLevels);
|
||||
return float4(width, height, numLevels, 0.0f);
|
||||
return float4(max(1,width), max(1,height), numLevels, 0.0f);
|
||||
}
|
||||
|
||||
if(IN.tri == 59)
|
||||
@@ -548,7 +548,7 @@ float4 main(v2f IN) : SV_Target0
|
||||
|
||||
uint width = 0, height = 0, numLevels = 0;
|
||||
dimtex.GetDimensions(z+10, width, height, numLevels);
|
||||
return float4(width, height, numLevels, 0.0f);
|
||||
return float4(max(1,width), max(1,height), numLevels, 0.0f);
|
||||
}
|
||||
|
||||
return float4(0.4f, 0.4f, 0.4f, 0.4f);
|
||||
|
||||
Reference in New Issue
Block a user