Fixed cloth automated tests. (#1400)

Bone transforms buffer is not valid when using Null renderer, which caused the test to fail since it reported an error and ultimately crashing as well. For now it's been worked around by checking the pointer is valid and not printing the error when null renderer is used, a task for the Atom team has been created to fix this properly in the future (ATOM-15807).
main
Aaron Ruiz Mora 5 years ago committed by GitHub
parent 593e8e6ca1
commit 7781307afe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,12 +24,11 @@ from base import TestAutomationBase
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
class TestAutomation(TestAutomationBase):
@pytest.mark.xfail(reason="Running with atom null renderer is causing this test to fail")
def test_C18977329_NvCloth_AddClothSimulationToMesh(self, request, workspace, editor, launcher_platform):
from . import C18977329_NvCloth_AddClothSimulationToMesh as test_module
self._run_test(request, workspace, editor, test_module)
@pytest.mark.xfail(reason="Running with atom null renderer is causing this test to fail")
def test_C18977330_NvCloth_AddClothSimulationToActor(self, request, workspace, editor, launcher_platform):
from . import C18977330_NvCloth_AddClothSimulationToActor as test_module
self._run_test(request, workspace, editor, test_module)

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e15d484113e8151072b410924747a8ad304f6f12457fad577308c0491693ab34
size 5472
oid sha256:6517300fb1ce70c4696286e14715c547cfd175eabbb2042f7f2a456b15054224
size 5253

@ -1,6 +1,6 @@
<download name="C18977329_NvCloth_AddClothSimulationToMesh" type="Map">
<index src="filelist.xml" dest="filelist.xml"/>
<files>
<file src="level.pak" dest="level.pak" size="97C8" md5="64e64e1e3345dacace01dde152c72250"/>
<file src="level.pak" dest="level.pak" size="96A3" md5="db8a235878128076005ade018587f536"/>
</files>
</download>

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:64de37c805b0be77cdb7a85b5406af58b7f845e7d97fec1721ac5d789bb641db
size 38856
oid sha256:ce32a7cdf3ed37751385b3bb18f05206702978363f325d06727b5eb20d40b7eb
size 38563

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7b595323d4d51211463dea0338abb6ce2a4a0a8d41efb12ac3c9dccd1f972171
size 5504
oid sha256:89dbcec013cb819e52ec0f8fed0a9e417fd32eac8aeb67d3958266bb6089ec21
size 5505

@ -1,6 +1,6 @@
<download name="C18977330_NvCloth_AddClothSimulationToActor" type="Map">
<index src="filelist.xml" dest="filelist.xml"/>
<files>
<file src="level.pak" dest="level.pak" size="9941" md5="297730934d657d7ca57a7357ee9cd566"/>
<file src="level.pak" dest="level.pak" size="E16" md5="036b4a87cbb256f76823549ab4b18c05"/>
</files>
</download>

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:617c455668fc41cb7fd69de690e4aa3c80f2cb36deaa371902b79de18fcd1cb2
size 39233
oid sha256:622c2624b04e07b704520f32c458b50d5a50de1ef116b7bc9c3c0ccb6f4a4ecc
size 3606

@ -133,9 +133,12 @@ namespace AZ
}
void SkinnedMeshRenderProxy::SetSkinningMatrices(const AZStd::vector<float>& data)
{
if (m_boneTransforms)
{
WriteToBuffer(m_boneTransforms->GetRHIBuffer(), data);
}
}
void SkinnedMeshRenderProxy::SetMorphTargetWeights(uint32_t lodIndex, const AZStd::vector<float>& weights)
{

@ -28,6 +28,8 @@
#include <EMotionFX/Source/Node.h>
#include <MCore/Source/AzCoreConversions.h>
#include <Atom/RHI/RHIUtils.h>
#include <Atom/RPI.Public/AuxGeom/AuxGeomDraw.h>
#include <Atom/RPI.Public/AuxGeom/AuxGeomFeatureProcessorInterface.h>
#include <Atom/RPI.Public/Scene.h>
@ -461,7 +463,7 @@ namespace AZ
if (m_skinnedMeshInputBuffers)
{
m_boneTransforms = CreateBoneTransformBufferFromActorInstance(m_actorInstance, GetSkinningMethod());
AZ_Error("AtomActorInstance", m_boneTransforms, "Failed to create bone transform buffer.");
AZ_Error("AtomActorInstance", m_boneTransforms || AZ::RHI::IsNullRenderer(), "Failed to create bone transform buffer.");
// If the instance is created before the default materials on the model have finished loading, the mesh feature processor will ignore it.
// Wait for them all to be ready before creating the instance

@ -15,6 +15,7 @@
#include <AzCore/Math/PackedVector3.h>
#include <AtomLyIntegration/CommonFeatures/Mesh/MeshComponentBus.h>
#include <Atom/RHI/RHIUtils.h>
#include <NvCloth/IClothSystem.h>
#include <NvCloth/IFabricCooker.h>
@ -552,7 +553,7 @@ namespace NvCloth
if (!destVerticesBuffer)
{
AZ_Error("ClothComponentMesh", false,
AZ_Error("ClothComponentMesh", AZ::RHI::IsNullRenderer(),
"Invalid vertex position buffer obtained from the render mesh to be modified.");
continue;
}

Loading…
Cancel
Save