chore(naga): Downgrade some log messages to debug

This commit is contained in:
Andy Leiserson authored and Teodor Tanasoaia committed 2026-02-03 12:59:48 +01:00
1 parent 28bc72f5bc
commit dbab82fe42
1 file changed
+23 -23
+23 -23
View File
@@ -273,7 +273,7 @@ impl super::Validator {
| Ti::ValuePointer { size: Some(_), .. }
| Ti::BindingArray { .. } => {}
ref other => {
log::error!("Indexing of {other:?}");
log::debug!("Indexing of {other:?}");
return Err(ExpressionError::InvalidBaseType(base));
}
};
@@ -284,7 +284,7 @@ impl super::Validator {
..
}) => {}
ref other => {
log::error!("Indexing by {other:?}");
log::debug!("Indexing by {other:?}");
return Err(ExpressionError::InvalidIndexType(index));
}
}
@@ -342,7 +342,7 @@ impl super::Validator {
}
Ti::Struct { ref members, .. } => members.len() as u32,
ref other => {
log::error!("Indexing of {other:?}");
log::debug!("Indexing of {other:?}");
return Err(ExpressionError::InvalidBaseType(top));
}
};
@@ -358,7 +358,7 @@ impl super::Validator {
E::Splat { size: _, value } => match resolver[value] {
Ti::Scalar { .. } => ShaderStages::all(),
ref other => {
log::error!("Splat scalar type {other:?}");
log::debug!("Splat scalar type {other:?}");
return Err(ExpressionError::InvalidSplatType(value));
}
},
@@ -370,7 +370,7 @@ impl super::Validator {
let vec_size = match resolver[vector] {
Ti::Vector { size: vec_size, .. } => vec_size,
ref other => {
log::error!("Swizzle vector type {other:?}");
log::debug!("Swizzle vector type {other:?}");
return Err(ExpressionError::InvalidVectorType(vector));
}
};
@@ -414,7 +414,7 @@ impl super::Validator {
.contains(TypeFlags::SIZED | TypeFlags::DATA) => {}
Ti::ValuePointer { .. } => {}
ref other => {
log::error!("Loading {other:?}");
log::debug!("Loading {other:?}");
return Err(ExpressionError::InvalidPointerType(pointer));
}
}
@@ -786,7 +786,7 @@ impl super::Validator {
| (Uo::LogicalNot, Some(Sk::Bool))
| (Uo::BitwiseNot, Some(Sk::Sint | Sk::Uint)) => {}
other => {
log::error!("Op {op:?} kind {other:?}");
log::debug!("Op {op:?} kind {other:?}");
return Err(ExpressionError::InvalidUnaryOperandType(op, expr));
}
}
@@ -903,7 +903,7 @@ impl super::Validator {
Sk::Bool | Sk::AbstractInt | Sk::AbstractFloat => false,
},
ref other => {
log::error!("Op {op:?} left type {other:?}");
log::debug!("Op {op:?} left type {other:?}");
false
}
}
@@ -915,7 +915,7 @@ impl super::Validator {
..
} => left_inner == right_inner,
ref other => {
log::error!("Op {op:?} left type {other:?}");
log::debug!("Op {op:?} left type {other:?}");
false
}
},
@@ -925,7 +925,7 @@ impl super::Validator {
Sk::Float | Sk::AbstractInt | Sk::AbstractFloat => false,
},
ref other => {
log::error!("Op {op:?} left type {other:?}");
log::debug!("Op {op:?} left type {other:?}");
false
}
},
@@ -935,7 +935,7 @@ impl super::Validator {
Sk::Bool | Sk::Float | Sk::AbstractInt | Sk::AbstractFloat => false,
},
ref other => {
log::error!("Op {op:?} left type {other:?}");
log::debug!("Op {op:?} left type {other:?}");
false
}
},
@@ -944,7 +944,7 @@ impl super::Validator {
Ti::Scalar(scalar) => (Ok(None), scalar),
Ti::Vector { size, scalar } => (Ok(Some(size)), scalar),
ref other => {
log::error!("Op {op:?} base type {other:?}");
log::debug!("Op {op:?} base type {other:?}");
(Err(()), Sc::BOOL)
}
};
@@ -955,7 +955,7 @@ impl super::Validator {
scalar: Sc { kind: Sk::Uint, .. },
} => Ok(Some(size)),
ref other => {
log::error!("Op {op:?} shift type {other:?}");
log::debug!("Op {op:?} shift type {other:?}");
Err(())
}
};
@@ -966,12 +966,12 @@ impl super::Validator {
}
};
if !good {
log::error!(
log::debug!(
"Left: {:?} of type {:?}",
function.expressions[left],
left_inner
);
log::error!(
log::debug!(
"Right: {:?} of type {:?}",
function.expressions[right],
right_inner
@@ -1060,7 +1060,7 @@ impl super::Validator {
..
} => {}
ref other => {
log::error!("All/Any of type {other:?}");
log::debug!("All/Any of type {other:?}");
return Err(ExpressionError::InvalidBooleanVector(argument));
}
},
@@ -1068,7 +1068,7 @@ impl super::Validator {
Ti::Scalar(scalar) | Ti::Vector { scalar, .. }
if scalar.kind == Sk::Float => {}
ref other => {
log::error!("Float test of type {other:?}");
log::debug!("Float test of type {other:?}");
return Err(ExpressionError::InvalidFloatArgument(argument));
}
},
@@ -1206,7 +1206,7 @@ impl super::Validator {
}
}
ref other => {
log::error!("Array length of {other:?}");
log::debug!("Array length of {other:?}");
return Err(ExpressionError::InvalidArrayType(expr));
}
},
@@ -1221,12 +1221,12 @@ impl super::Validator {
} => match resolver.types[base].inner {
Ti::RayQuery { .. } => ShaderStages::all(),
ref other => {
log::error!("Intersection result of a pointer to {other:?}");
log::debug!("Intersection result of a pointer to {other:?}");
return Err(ExpressionError::InvalidRayQueryType(query));
}
},
ref other => {
log::error!("Intersection result of {other:?}");
log::debug!("Intersection result of {other:?}");
return Err(ExpressionError::InvalidRayQueryType(query));
}
},
@@ -1242,12 +1242,12 @@ impl super::Validator {
vertex_return: true,
} => ShaderStages::all(),
ref other => {
log::error!("Intersection result of a pointer to {other:?}");
log::debug!("Intersection result of a pointer to {other:?}");
return Err(ExpressionError::InvalidRayQueryType(query));
}
},
ref other => {
log::error!("Intersection result of {other:?}");
log::debug!("Intersection result of {other:?}");
return Err(ExpressionError::InvalidRayQueryType(query));
}
},
@@ -1272,7 +1272,7 @@ impl super::Validator {
match resolver[operand] {
Ti::CooperativeMatrix { role, .. } if role == expected_role => {}
ref other => {
log::error!("{expected_role:?} operand type: {other:?}");
log::debug!("{expected_role:?} operand type: {other:?}");
return Err(ExpressionError::InvalidCooperativeOperand(a));
}
}