LYN-6882 release builds are executing code in asserts (#4305)
* adding Windows/release to PR-validation builds Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * changing trace back to expand to nothing for release Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * typo Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * more fixes Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * fixing some more unused variable cases Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * renaming file in ScriptCanvas that causes a msbuild warning Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * reverting a previous change Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -1078,7 +1078,9 @@ namespace AZ
|
||||
template<typename T>
|
||||
void ModelAssetBuilderComponent::ValidateStreamSize([[maybe_unused]] size_t expectedVertexCount, [[maybe_unused]] const AZStd::vector<T>& bufferData, [[maybe_unused]] AZ::RHI::Format format, [[maybe_unused]] const char* streamName) const
|
||||
{
|
||||
#if defined(AZ_ENABLE_TRACING)
|
||||
size_t actualVertexCount = (bufferData.size() * sizeof(T)) / RHI::GetFormatSize(format);
|
||||
#endif
|
||||
AZ_Error(s_builderName, expectedVertexCount == actualVertexCount, "VertexStream '%s' does not match the expected vertex count. This typically means multiple sub-meshes have mis-matched vertex stream layouts (such as one having more uv sets than the other) but are assigned the same material in the dcc tool so they were merged.", streamName);
|
||||
}
|
||||
|
||||
|
||||
@@ -417,14 +417,16 @@ namespace AZ
|
||||
template const Color& MaterialFunctor::EditorContext::GetMaterialPropertyValue<Color> (const MaterialPropertyIndex& index) const;
|
||||
template const Data::Instance<Image>& MaterialFunctor::EditorContext::GetMaterialPropertyValue<Data::Instance<Image>> (const MaterialPropertyIndex& index) const;
|
||||
|
||||
void CheckPropertyAccess(const MaterialPropertyIndex& index, const MaterialPropertyFlags& materialPropertyDependencies, [[maybe_unused]] const MaterialPropertiesLayout& materialPropertiesLayout)
|
||||
void CheckPropertyAccess([[maybe_unused]] const MaterialPropertyIndex& index, [[maybe_unused]] const MaterialPropertyFlags& materialPropertyDependencies, [[maybe_unused]] const MaterialPropertiesLayout& materialPropertiesLayout)
|
||||
{
|
||||
#if defined(AZ_ENABLE_TRACING)
|
||||
if (!materialPropertyDependencies.test(index.GetIndex()))
|
||||
{
|
||||
const MaterialPropertyDescriptor* propertyDescriptor = materialPropertiesLayout.GetPropertyDescriptor(index);
|
||||
AZ_Error("MaterialFunctor", false, "Material functor accessing an unregistered material property '%s'.",
|
||||
propertyDescriptor ? propertyDescriptor->GetName().GetCStr() : "<unknown>");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
const MaterialPropertyValue& MaterialFunctor::RuntimeContext::GetMaterialPropertyValue(const MaterialPropertyIndex& index) const
|
||||
|
||||
Reference in New Issue
Block a user