From 8385d94630d4c7bcc4503dddf55e8b9ca08e4848 Mon Sep 17 00:00:00 2001 From: Junbo Liang <68558268+junbo75@users.noreply.github.com> Date: Mon, 18 Oct 2021 14:28:40 -0700 Subject: [PATCH 1/2] Expose base matchmaking request type to behavior context (#4720) Signed-off-by: Junbo Liang --- .../Source/Request/AWSGameLiftAcceptMatchRequest.cpp | 5 +++++ .../Source/Request/AWSGameLiftStartMatchmakingRequest.cpp | 5 +++++ .../Source/Request/AWSGameLiftStopMatchmakingRequest.cpp | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Request/AWSGameLiftAcceptMatchRequest.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Request/AWSGameLiftAcceptMatchRequest.cpp index 8a8327b92b..0d5f2c7198 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Request/AWSGameLiftAcceptMatchRequest.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Request/AWSGameLiftAcceptMatchRequest.cpp @@ -33,6 +33,11 @@ namespace AWSGameLift if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { + behaviorContext->Class("AcceptMatchRequest") + ->Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::Value) + // Expose base type to BehaviorContext, but hide it to be used directly + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All); + behaviorContext->Class("AWSGameLiftAcceptMatchRequest") ->Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::Value) ->Property("AcceptMatch", BehaviorValueProperty(&AWSGameLiftAcceptMatchRequest::m_acceptMatch)) diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Request/AWSGameLiftStartMatchmakingRequest.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Request/AWSGameLiftStartMatchmakingRequest.cpp index 31e9c5eff7..3ec98d554f 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Request/AWSGameLiftStartMatchmakingRequest.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Request/AWSGameLiftStartMatchmakingRequest.cpp @@ -40,6 +40,11 @@ namespace AWSGameLift if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { + behaviorContext->Class("StartMatchmakingRequest") + ->Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::Value) + // Expose base type to BehaviorContext, but hide it to be used directly + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All); + behaviorContext->Class("AWSGameLiftStartMatchmakingRequest") ->Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::Value) ->Property("TicketId", BehaviorValueProperty(&AWSGameLiftStartMatchmakingRequest::m_ticketId)) diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Request/AWSGameLiftStopMatchmakingRequest.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Request/AWSGameLiftStopMatchmakingRequest.cpp index bcea1fa8fe..c462d45da7 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Request/AWSGameLiftStopMatchmakingRequest.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Request/AWSGameLiftStopMatchmakingRequest.cpp @@ -33,6 +33,11 @@ namespace AWSGameLift if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { + behaviorContext->Class("StopMatchmakingRequest") + ->Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::Value) + // Expose base type to BehaviorContext, but hide it to be used directly + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All); + behaviorContext->Class("AWSGameLiftStopMatchmakingRequest") ->Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::Value) ->Property("TicketId", BehaviorValueProperty(&AWSGameLiftStopMatchmakingRequest::m_ticketId)); From c8dc309b328984336e1ba043a0b044287bc45ea0 Mon Sep 17 00:00:00 2001 From: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com> Date: Mon, 18 Oct 2021 14:30:11 -0700 Subject: [PATCH 2/2] Fixed dds loader issue with certain dds formats. (#4733) Signed-off-by: Qing Tao --- .../Code/Source/ImageLoader/DdsLoader.cpp | 39 +++++++++++++++++-- .../Code/Source/Processing/DDSHeader.h | 2 + 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/DdsLoader.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/DdsLoader.cpp index d7f36398e3..9642a32938 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/DdsLoader.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/DdsLoader.cpp @@ -122,14 +122,45 @@ namespace ImageProcessingAtom { format = ePixelFormat_BC1; } - else if (header.ddspf.dwFourCC == FOURCC_DXT5 || header.ddspf.dwFourCC == FOURCC_DXT4) + else if (header.ddspf.dwFourCC == FOURCC_DXT5) { format = ePixelFormat_BC3; } - else + else if (header.ddspf.dwFourCC == FOURCC_3DCP) { - AZ_Error("Image Processing", false, "unsupported fourCC format: 0x%x", header.ddspf.dwFourCC); - return nullptr; + format = ePixelFormat_BC4; + } + else if (header.ddspf.dwFourCC == FOURCC_3DC) + { + format = ePixelFormat_BC5; + } + else if (header.ddspf.dwFourCC == DDS_FOURCC_R32F) + { + format = ePixelFormat_R32F; + } + else if (header.ddspf.dwFourCC == DDS_FOURCC_G32R32F) + { + format = ePixelFormat_R32G32F; + } + else if (header.ddspf.dwFourCC == DDS_FOURCC_A32B32G32R32F) + { + format = ePixelFormat_R32G32B32A32F; + } + else if (header.ddspf.dwFourCC == DDS_FOURCC_R16F) + { + format = ePixelFormat_R16F; + } + else if (header.ddspf.dwFourCC == DDS_FOURCC_G16R16F) + { + format = ePixelFormat_R16G16F; + } + else if (header.ddspf.dwFourCC == DDS_FOURCC_A16B16G16R16F) + { + format = ePixelFormat_R16G16B16A16F; + } + else if (header.ddspf.dwFourCC == DDS_FOURCC_A16B16G16R16) + { + format = ePixelFormat_R16G16B16A16; } } else diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/DDSHeader.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/DDSHeader.h index 0f953897c9..1b25f1a8a9 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/DDSHeader.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/DDSHeader.h @@ -260,4 +260,6 @@ namespace ImageProcessingAtom const static AZ::u32 FOURCC_DXT3 = IMAGE_BUIDER_MAKEFOURCC('D', 'X', 'T', '3'); const static AZ::u32 FOURCC_DXT4 = IMAGE_BUIDER_MAKEFOURCC('D', 'X', 'T', '4'); const static AZ::u32 FOURCC_DXT5 = IMAGE_BUIDER_MAKEFOURCC('D', 'X', 'T', '5'); + const static AZ::u32 FOURCC_3DCP = IMAGE_BUIDER_MAKEFOURCC('A', 'T', 'I', '1'); + const static AZ::u32 FOURCC_3DC = IMAGE_BUIDER_MAKEFOURCC('A', 'T', 'I', '2'); }