Explorar o código

forbid array of textures (should use TextureArray instead)

ncannasse %!s(int64=7) %!d(string=hai) anos
pai
achega
b4f5bb9067
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      hxsl/Checker.hx

+ 2 - 0
hxsl/Checker.hx

@@ -762,6 +762,8 @@ class Checker {
 			case TStruct(_):
 				error("Array of structures are not allowed", pos);
 			default:
+				if( t.isSampler() )
+					error("Array of textures are not allowed, use Sampler2DArray instead", pos);
 			}
 			var s = switch( size ) {
 			case SConst(_): size;