@@ -396,59 +396,6 @@ macro_rules! impl_uniform_block_basic {
396
396
}
397
397
}
398
398
) ;
399
-
400
- ( [ $base_ty: expr; $num: expr] , $simd_ty: expr) => (
401
- impl UniformBlock for [ $base_ty: expr; $num: expr] {
402
- fn matches( layout: & program:: BlockLayout , base_offset: usize )
403
- -> Result <( ) , LayoutMismatchError >
404
- {
405
- if let & BlockLayout :: BasicType { ty, offset_in_buffer } = layout {
406
- if ty != $simd_ty {
407
- return Err ( LayoutMismatchError :: TypeMismatch {
408
- expected: ty,
409
- obtained: $simd_ty,
410
- } ) ;
411
- }
412
-
413
- if offset_in_buffer != base_offset {
414
- return Err ( LayoutMismatchError :: OffsetMismatch {
415
- expected: offset_in_buffer,
416
- obtained: base_offset,
417
- } ) ;
418
- }
419
-
420
- Ok ( ( ) )
421
-
422
- } else if let & BlockLayout :: Array { ref content, length } = layout {
423
- if length != $num || <$base_ty as UniformBlock >:: matches( content) . is_err( ) {
424
- return Err ( LayoutMismatchError :: LayoutMismatch {
425
- expected: layout. clone( ) ,
426
- obtained: BlockLayout :: Array {
427
- content: Box :: new( <$base_ty as UniformBlock >:: build_layout( base_offset) ) ,
428
- length: $num,
429
- } ,
430
- } ) ;
431
- }
432
-
433
- Ok ( ( ) )
434
-
435
- } else {
436
- Err ( LayoutMismatchError :: LayoutMismatch {
437
- expected: layout. clone( ) ,
438
- obtained: self . build_layout( base_offset) ,
439
- } )
440
- }
441
- }
442
-
443
- #[ inline]
444
- fn build_layout( base_offset: usize ) -> program:: BlockLayout {
445
- BlockLayout :: BasicType {
446
- ty: $simd_ty,
447
- offset_in_buffer: base_offset,
448
- }
449
- }
450
- }
451
- )
452
399
}
453
400
454
401
impl AsUniformValue for i8 {
0 commit comments