File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,7 +111,6 @@ inline bool isDepthFormat(TextureFormat Format) {
111111 return Format == TextureFormat::D32Float;
112112}
113113
114- // / DepthStencil cannot be combined with RenderTarget or Storage.
115114inline bool isValidTextureUsage (TextureUsage Usage) {
116115 if ((Usage & DepthStencil) != 0 ) {
117116 if ((Usage & RenderTarget) != 0 )
@@ -122,20 +121,16 @@ inline bool isValidTextureUsage(TextureUsage Usage) {
122121 return true ;
123122}
124123
125- // / Depth formats require DepthStencil usage and cannot be used as RenderTarget
126- // / or Storage. Non-depth formats cannot be used with DepthStencil usage.
127124inline bool isValidTextureUsageAndFormat (TextureUsage Usage,
128125 TextureFormat Format) {
129126 if (!isValidTextureUsage (Usage))
130127 return false ;
131128 if (isDepthFormat (Format)) {
132- // Depth formats can only be used as DepthStencil and/or Sampled.
133129 if ((Usage & RenderTarget) != 0 )
134130 return false ;
135131 if ((Usage & Storage) != 0 )
136132 return false ;
137133 } else {
138- // Non-depth formats cannot be used as DepthStencil.
139134 if ((Usage & DepthStencil) != 0 )
140135 return false ;
141136 }
You can’t perform that action at this time.
0 commit comments