fix depth-only render pass invocation + throw instead of return
parent
db66fbf115
commit
0c6bb538fb
|
@ -34,14 +34,12 @@ namespace MoonWorks.Graphics
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
if (colorAttachmentInfos.Length == 0)
|
if (colorAttachmentInfos.Length == 0)
|
||||||
{
|
{
|
||||||
Logger.LogError("Render pass must contain at least one attachment!");
|
throw new System.ArgumentException("Render pass must contain at least one attachment!");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (colorAttachmentInfos.Length > 4)
|
if (colorAttachmentInfos.Length > 4)
|
||||||
{
|
{
|
||||||
Logger.LogError("Render pass cannot have more than 4 color attachments!");
|
throw new System.ArgumentException("Render pass cannot have more than 4 color attachments!");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -78,16 +76,9 @@ namespace MoonWorks.Graphics
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
if (colorAttachmentInfos.Length == 0)
|
|
||||||
{
|
|
||||||
Logger.LogError("Render pass must contain at least one attachment!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (colorAttachmentInfos.Length > 4)
|
if (colorAttachmentInfos.Length > 4)
|
||||||
{
|
{
|
||||||
Logger.LogError("Render pass cannot have more than 4 color attachments!");
|
throw new System.ArgumentException("Render pass cannot have more than 4 color attachments!");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -128,14 +119,12 @@ namespace MoonWorks.Graphics
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
if (colorAttachmentInfos.Length == 0)
|
if (colorAttachmentInfos.Length == 0)
|
||||||
{
|
{
|
||||||
Logger.LogError("Render pass must contain at least one attachment!");
|
throw new System.ArgumentException("Render pass must contain at least one attachment!");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (colorAttachmentInfos.Length > 4)
|
if (colorAttachmentInfos.Length > 4)
|
||||||
{
|
{
|
||||||
Logger.LogError("Render pass cannot have more than 4 color attachments!");
|
throw new System.ArgumentException("Render pass cannot have more than 4 color attachments!");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -174,16 +163,9 @@ namespace MoonWorks.Graphics
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
if (colorAttachmentInfos.Length == 0)
|
|
||||||
{
|
|
||||||
Logger.LogError("Render pass must contain at least one attachment!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (colorAttachmentInfos.Length > 4)
|
if (colorAttachmentInfos.Length > 4)
|
||||||
{
|
{
|
||||||
Logger.LogError("Render pass cannot have more than 4 color attachments!");
|
throw new System.ArgumentException("Render pass cannot have more than 4 color attachments!");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue