diff --git a/cmake/PalBuildParameters.cmake b/cmake/PalBuildParameters.cmake index e1f31480d..416ce3903 100644 --- a/cmake/PalBuildParameters.cmake +++ b/cmake/PalBuildParameters.cmake @@ -196,13 +196,19 @@ pal_client_bp(PAL_BUILD_GFX ON PAL_BUILD_GFX ) +#if PAL_BUILD_NAVI44 + pal_client_bp(PAL_BUILD_NAVI44 ON + DEPENDS_ON + PAL_BUILD_GFX12 + ) +#endif + #if PAL_BUILD_NAVI48 pal_client_bp(PAL_BUILD_NAVI48 ON DEPENDS_ON PAL_BUILD_GFX12 ) #endif -#endif ##################################################################################### diff --git a/cmake/PalCompileDefinitions.cmake b/cmake/PalCompileDefinitions.cmake index f3def316c..b3177d98e 100644 --- a/cmake/PalCompileDefinitions.cmake +++ b/cmake/PalCompileDefinitions.cmake @@ -84,6 +84,11 @@ function(pal_compile_definitions_gpu TARGET) target_compile_definitions(${TARGET} PUBLIC PAL_BUILD_NAVI48=$) target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI48=$) #endif + +#if PAL_BUILD_NAVI44 + target_compile_definitions(${TARGET} PUBLIC PAL_BUILD_NAVI44=$) + target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI44=$) +#endif #endif endif() diff --git a/cmake/PalOverrides.cmake b/cmake/PalOverrides.cmake index f20ac3dde..af3780bcd 100644 --- a/cmake/PalOverrides.cmake +++ b/cmake/PalOverrides.cmake @@ -98,6 +98,12 @@ if(PAL_BUILD_GFX12) set(PAL_SWD_BUILD_NAVI48 ${PAL_BUILD_NAVI48}) #endif +#if PAL_BUILD_NAVI44 + pal_set_or(ADDR_GFX12_BUILD ${PAL_BUILD_NAVI44}) + pal_set_or(PAL_SWD_BUILD_NAVI4X ${PAL_BUILD_NAVI44}) + set(PAL_SWD_BUILD_NAVI44 ${PAL_BUILD_NAVI44}) +#endif + endif() # PAL_BUILD_GFX12 #endif diff --git a/inc/core/palLib.h b/inc/core/palLib.h index 4191943f3..33be160f2 100644 --- a/inc/core/palLib.h +++ b/inc/core/palLib.h @@ -114,6 +114,9 @@ enum class NullGpuId : uint32 #if PAL_BUILD_NAVI48 Navi48, ///< 12.0.1 #endif +#if PAL_BUILD_NAVI44 + Navi44, ///< 12.0.0 +#endif #endif #if (PAL_CLIENT_INTERFACE_MAJOR_VERSION>= 888) #endif @@ -215,6 +218,9 @@ enum class AsicRevision : uint32 #if PAL_BUILD_STRIX_HALO StrixHalo = 0x3C, ///< 11.5.1 #endif +#if PAL_BUILD_NAVI44 + Navi44 = 0x3D, ///< 12.0.0 +#endif #if PAL_BUILD_NAVI48 Navi48 = 0x3E, ///< 12.0.1 #endif diff --git a/inc/core/palPipelineAbi.h b/inc/core/palPipelineAbi.h index 8a9683780..b5e22c38a 100644 --- a/inc/core/palPipelineAbi.h +++ b/inc/core/palPipelineAbi.h @@ -102,6 +102,9 @@ enum class AmdGpuMachineType : uint8 #if PAL_BUILD_STRIX_HALO Gfx1151 = 0x4A, ///< EF_AMDGPU_MACH_AMDGCN_GFX1151 #endif +#if PAL_BUILD_NAVI44 + Gfx1200 = 0x4D, ///< IDK +#endif #if PAL_BUILD_NAVI48 Gfx1201 = 0x4E, ///< EF_AMDGPU_MACH_AMDGCN_GFX1200 #endif @@ -181,6 +184,10 @@ enum GfxIpStepping : uint16 GfxIpSteppingStrixHalo = 1, #endif +#if PAL_BUILD_NAVI44 + GfxIpSteppingNavi44 = 0, +#endif + #if PAL_BUILD_NAVI48 GfxIpSteppingNavi48 = 1, #endif @@ -865,3 +872,4 @@ enum class ZOrder : uint8 } //PalAbi } //Pal + \ No newline at end of file diff --git a/inc/core/palPipelineAbiUtils.h b/inc/core/palPipelineAbiUtils.h index 8a7c4658d..93bf39330 100644 --- a/inc/core/palPipelineAbiUtils.h +++ b/inc/core/palPipelineAbiUtils.h @@ -597,4 +597,4 @@ inline Result DeserializeCodeObjectMetadata( } } //Abi -} //Pal +} //Pal \ No newline at end of file diff --git a/inc/gpuUtil/mlaa/g_mlaaComputePipelineBinaries.h b/inc/gpuUtil/mlaa/g_mlaaComputePipelineBinaries.h index b3f7c3324..6ea91cd5d 100644 --- a/inc/gpuUtil/mlaa/g_mlaaComputePipelineBinaries.h +++ b/inc/gpuUtil/mlaa/g_mlaaComputePipelineBinaries.h @@ -8479,6 +8479,97 @@ inline constexpr Util::uint8 MlaaFindSepEdge_Cs_4AC1E1C2[] = }; #endif +#if (PAL_BUILD_GFX12&& 0) || (PAL_BUILD_GFX12&& PAL_BUILD_NAVI44) || (PAL_BUILD_GFX12&& (PAL_BUILD_NAVI44&& 0)) || (PAL_BUILD_GFX12&& (0 && 0)) +// Mlaa Calc Sep Edge Length compute shader binary for Navi 44 +inline constexpr Util::uint8 MlaaCalcSepSomething[] = +{ + 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x00, 0x08, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x06, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x06, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, + 0xc2, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x69, 0x64, 0x78, 0x00, 0x05, 0x00, 0x08, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, + 0x6c, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x44, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x61, 0x74, 0x61, 0x00, 0x00, + 0x06, 0x00, 0x06, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x61, 0x74, 0x61, 0x00, 0x00, + 0x05, 0x00, 0x03, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x49, 0x6e, 0x70, 0x75, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, + 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x03, 0x00, 0x11, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x48, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, + 0x1a, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x04, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x03, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x03, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x3b, 0x00, 0x04, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, + 0x0d, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0f, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x3d, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x1d, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, + 0x1b, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x84, 0x00, 0x05, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, + 0x1f, 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00 +}; +#endif + // Table of compute pipeline binaries for 10_1_0 inline constexpr PipelineBinary mlaaComputeBinaryTable10_1_0[] = { @@ -8571,5 +8662,14 @@ inline constexpr PipelineBinary mlaaComputeBinaryTable12_0_1[] = }; #endif +#if PAL_BUILD_GFX12 && PAL_BUILD_NAVI44 +// Table of compute pipeline binaries for 12_1_1 +inline constexpr PipelineBinary mlaaComputeBinaryTable12_0_0[] = +{ + // TODO: not sure what this should be called and even where the name is generated?? + {MlaaCalcSepSomething, sizeof(MlaaCalcSepSomething)}, +}; +#endif + } // Mlaa } // GpuUtil diff --git a/inc/gpuUtil/mlaa/g_mlaaComputePipelineInitImpl.h b/inc/gpuUtil/mlaa/g_mlaaComputePipelineInitImpl.h index 00c3d432e..94bb53992 100644 --- a/inc/gpuUtil/mlaa/g_mlaaComputePipelineInitImpl.h +++ b/inc/gpuUtil/mlaa/g_mlaaComputePipelineInitImpl.h @@ -135,6 +135,12 @@ Pal::Result CreateMlaaComputePipelines( break; #endif +#if PAL_BUILD_GFX12 && PAL_BUILD_NAVI44 + case Pal::IpTriple({ 12, 0, 0 }): + pTable = mlaaComputeBinaryTable12_0_0; + break; +#endif + #if PAL_BUILD_GFX12 && PAL_BUILD_NAVI48 case Pal::IpTriple({ 12, 0, 1 }): pTable = mlaaComputeBinaryTable12_0_1; diff --git a/shared/devdriver/third_party/rapidjson/include/rapidjson/document.h b/shared/devdriver/third_party/rapidjson/include/rapidjson/document.h index e3e20dfbd..b0f1f70be 100644 --- a/shared/devdriver/third_party/rapidjson/include/rapidjson/document.h +++ b/shared/devdriver/third_party/rapidjson/include/rapidjson/document.h @@ -316,8 +316,6 @@ struct GenericStringRef { GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {} - GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; } - //! implicit conversion to plain CharType pointer operator const Ch *() const { return s; } diff --git a/src/core/device.h b/src/core/device.h index 51c464fa4..8dbae988d 100644 --- a/src/core/device.h +++ b/src/core/device.h @@ -2425,6 +2425,13 @@ inline bool IsNavi48(const Device& device) return AMDGPU_IS_NAVI48(device.ChipProperties().familyId, device.ChipProperties().eRevId); } #endif + +#if PAL_BUILD_NAVI44 +inline bool IsNavi44(const Device& device) +{ + return AMDGPU_IS_NAVI44(device.ChipProperties().familyId, device.ChipProperties().eRevId); +} +#endif #endif constexpr bool IsGfx10(GfxIpLevel gfxLevel) diff --git a/src/core/hw/amdgpu_asic.h b/src/core/hw/amdgpu_asic.h index d8525d710..9e1f75ec5 100644 --- a/src/core/hw/amdgpu_asic.h +++ b/src/core/hw/amdgpu_asic.h @@ -100,9 +100,13 @@ #define AMDGPU_STRIX_HALO_RANGE 0xC0, 0xFF // 192 <= x < 255 (tentative) #endif +// Gfx12 #if PAL_BUILD_NAVI48 #define AMDGPU_NAVI48_RANGE 0x50, 0xff #endif +#if PAL_BUILD_NAVI44 +#define AMDGPU_NAVI44_RANGE 0x01, 0x50 // 1 <= x < 80 +#endif #define AMDGPU_EXPAND_FIX(x) x #define AMDGPU_RANGE_HELPER(val, min, max) ((val >= min) && (val < max)) @@ -148,6 +152,10 @@ #define ASICREV_IS_NAVI48(r) ASICREV_IS(r, NAVI48) #endif +#if PAL_BUILD_NAVI44 +#define ASICREV_IS_NAVI44(r) ASICREV_IS(r, NAVI44) +#endif + // AMDGPU_IS(familyId, eRevisionId, familyName, revisionName) #define AMDGPU_IS(f, r, fn, rn) (FAMILY_IS(f, fn) && ASICREV_IS(r, rn)) @@ -184,9 +192,13 @@ #define AMDGPU_IS_STRIX_HALO(f,r) AMDGPU_IS(f, r, STX, STRIX_HALO) #endif +// Gfx12 #if PAL_BUILD_NAVI48 #define AMDGPU_IS_NAVI48(f, r) AMDGPU_IS(f, r, NV4, NAVI48) #endif +#if PAL_BUILD_NAVI44 +#define AMDGPU_IS_NAVI44(f, r) AMDGPU_IS(f, r, NV4, NAVI44) +#endif // Device IDs // Gfx10.1 @@ -224,6 +236,10 @@ #define DEVICE_ID_NAVI48_94 0x94 #endif +#if PAL_BUILD_NAVI44 +#define DEVICE_ID_NAVI44_7590 0x7590 +#endif + // DEVICE_IS(deviceId, deviceName) #define DEVICE_IS(d, dn) (d == DEVICE_ID_##dn) @@ -259,6 +275,11 @@ #define STRIX_HALO_P 0xC0 #endif +// Gfx12 +#if PAL_BUILD_NAVI44 +#define NAVI44_P 0x50 +#endif + #if PAL_BUILD_NAVI48 #define NAVI48_P 0x51 #endif @@ -330,10 +351,15 @@ #define PRID_STX_STRIX_HALO_00 0x00 #endif +// Gfx12 #if PAL_BUILD_NAVI48 #define PRID_NV_NAVI48_00 0x00 #endif +#if PAL_BUILD_NAVI44 +#define PRID_NV_NAVI44_00 0x00 +#endif + // VARIANT_IS(prid, variantName) #define VARIANT_IS(v, vn) (v == PRID_##vn) diff --git a/src/core/hw/gfxip/gfx12/chip/gfx12_merged_enum.h b/src/core/hw/gfxip/gfx12/chip/gfx12_merged_enum.h index 6619eefa4..8422cfe3c 100644 --- a/src/core/hw/gfxip/gfx12/chip/gfx12_merged_enum.h +++ b/src/core/hw/gfxip/gfx12/chip/gfx12_merged_enum.h @@ -9269,7 +9269,7 @@ enum PerfCtrId MaxPerfCtrId = 40, }; -#if CHIP_HDR_NAVI48 +#if CHIP_HDR_NAVI48 || CHIP_HDR_NAVI44 constexpr unsigned int Nv48MaxPerfEventIds[MaxPerfCtrId] = { CB_PERF_SEL_EXPORT_KILLED_BY_NULL_TARGET_SHADER_MASK, diff --git a/src/core/hw/gfxip/gfx12/gfx12Device.cpp b/src/core/hw/gfxip/gfx12/gfx12Device.cpp index 3ffd9196c..9f26d8804 100644 --- a/src/core/hw/gfxip/gfx12/gfx12Device.cpp +++ b/src/core/hw/gfxip/gfx12/gfx12Device.cpp @@ -392,6 +392,34 @@ void InitializeGpuChipProperties( pInfo->gfxip.mallSizeInBytes = 64_MiB; pInfo->gfxip.tccSizeInBytes = 8_MiB; // gl2c_total_cache_size_KB + } +#endif +#if PAL_BUILD_NAVI44 + if (AMDGPU_IS_NAVI44(pInfo->familyId, pInfo->eRevId)) + { + uint32 stepping = Abi::GfxIpSteppingNavi44; + + pInfo->gfx9.rbPlus = 1; + + pInfo->gpuType = GpuType::Discrete; + pInfo->revision = AsicRevision::Navi44; + pInfo->gfxStepping = stepping; + pInfo->gfxTriple.stepping = stepping; + pInfo->gfx9.numShaderEngines = 2; + pInfo->gfx9.numSdpInterfaces = 32; + pInfo->gfx9.maxNumCuPerSh = 16; + pInfo->gfx9.maxNumRbPerSe = 4; + + // The GL2C is the TCC + pInfo->gfx9.gfx10.numGl2a = 2; + pInfo->gfx9.gfx10.numGl2c = 16; + pInfo->gfx9.numTccBlocks = pInfo->gfx9.gfx10.numGl2c; + + pInfo->gfx9.gfx10.numWgpAboveSpi = 2; + pInfo->gfx9.gfx10.numWgpBelowSpi = 0; + + pInfo->gfxip.mallSizeInBytes = 32_MiB; + pInfo->gfxip.tccSizeInBytes = 4_MiB; } else #endif diff --git a/src/core/hw/gfxip/gfx12/gfx12PerfCtrInfo.cpp b/src/core/hw/gfxip/gfx12/gfx12PerfCtrInfo.cpp index 5eb91f364..84b53fde5 100644 --- a/src/core/hw/gfxip/gfx12/gfx12PerfCtrInfo.cpp +++ b/src/core/hw/gfxip/gfx12/gfx12PerfCtrInfo.cpp @@ -123,6 +123,11 @@ static const MaxEventIds& GetEventLimits( case Pal::AsicRevision::Navi48: pOut = &Nv48MaxPerfEventIds; break; +#endif +#if PAL_BUILD_NAVI44 + case Pal::AsicRevision::Navi44: + pOut = &Nv48MaxPerfEventIds; + break; #endif default: PAL_ASSERT_ALWAYS(); // What chip is this? diff --git a/src/core/hw/gfxip/pipeline.h b/src/core/hw/gfxip/pipeline.h index 69cb431fb..5258eb16b 100644 --- a/src/core/hw/gfxip/pipeline.h +++ b/src/core/hw/gfxip/pipeline.h @@ -122,7 +122,7 @@ static Util::Abi::ApiShaderType PalShaderTypeToAbiShaderType(ShaderType stage) inline bool PipelineSupportsGenericEntryPoint( const Util::PalAbi::CodeObjectMetadata& metadata) { - return Util::PalAbi::PalMetadataVersionAtLeast(metadata, 3, 6); + return PalMetadataVersionAtLeast(metadata, 3, 6); } constexpr uint32 MaxGfxShaderLibraryCount = 3; diff --git a/src/core/hw/gfxip/pipelineAbiReader.cpp b/src/core/hw/gfxip/pipelineAbiReader.cpp index 4a359c3d0..0b9baf61b 100644 --- a/src/core/hw/gfxip/pipelineAbiReader.cpp +++ b/src/core/hw/gfxip/pipelineAbiReader.cpp @@ -332,8 +332,7 @@ Result PipelineAbiReader::GetMetadata( pRawMetadata = pDesc; metadataSize = descSize; - result = - PalAbi::GetPalMetadataVersion(pReader, pDesc, descSize, &metadataMajorVer, &metadataMinorVer); + result = PalAbi::GetPalMetadataVersion(pReader, pDesc, descSize, &metadataMajorVer, &metadataMinorVer); break; } @@ -452,7 +451,7 @@ void PipelineAbiReader::GetGfxIpVersion( ) const { AmdGpuMachineType machineType = static_cast(GetElfReader().GetHeader().e_flags); - MachineTypeToGfxIpVersion(machineType, pGfxIpMajorVer, pGfxIpMinorVer, pGfxIpStepping); + Util::Abi::MachineTypeToGfxIpVersion(machineType, pGfxIpMajorVer, pGfxIpMinorVer, pGfxIpStepping); } // ===================================================================================================================== diff --git a/src/core/hw/gfxip/rpm/g_rpmComputePipelineBinaries.h b/src/core/hw/gfxip/rpm/g_rpmComputePipelineBinaries.h index cae4ca346..df1a28054 100644 --- a/src/core/hw/gfxip/rpm/g_rpmComputePipelineBinaries.h +++ b/src/core/hw/gfxip/rpm/g_rpmComputePipelineBinaries.h @@ -96068,4 +96068,138 @@ inline constexpr PipelineBinary rpmComputeBinaryTable12_0_1[] = }; #endif +#if PAL_BUILD_GFX12 && PAL_BUILD_NAVI44 +// Table of compute pipeline binaries for 12_0_1 +inline constexpr PipelineBinary rpmComputeBinaryTable12_0_0[] = +{ + {ClearBuffer_Cs_4AC1E1C2, sizeof(ClearBuffer_Cs_4AC1E1C2)}, + {ClearImage96Bpp_Cs_4AC1E1C2, sizeof(ClearImage96Bpp_Cs_4AC1E1C2)}, + {ClearImage_Cs_4AC1E1C2, sizeof(ClearImage_Cs_4AC1E1C2)}, + {nullptr, 0}, + {ClearImageMsaaSampleMajor_Cs_4AC1E1C2, sizeof(ClearImageMsaaSampleMajor_Cs_4AC1E1C2)}, + {CopyBufferByte_Cs_4AC1E1C2, sizeof(CopyBufferByte_Cs_4AC1E1C2)}, + {CopyBufferDqword_Cs_4AC1E1C2, sizeof(CopyBufferDqword_Cs_4AC1E1C2)}, + {CopyBufferDword_Cs_4AC1E1C2, sizeof(CopyBufferDword_Cs_4AC1E1C2)}, + {CopyImage2d_Cs_4AC1E1C2, sizeof(CopyImage2d_Cs_4AC1E1C2)}, + {CopyImage2dMorton2x_Cs_4AC1E1C2, sizeof(CopyImage2dMorton2x_Cs_4AC1E1C2)}, + {CopyImage2dMorton4x_Cs_4AC1E1C2, sizeof(CopyImage2dMorton4x_Cs_4AC1E1C2)}, + {CopyImage2dMorton8x_Cs_4AC1E1C2, sizeof(CopyImage2dMorton8x_Cs_4AC1E1C2)}, + {CopyImage2dms2x_Cs_4AC1E1C2, sizeof(CopyImage2dms2x_Cs_4AC1E1C2)}, + {CopyImage2dms4x_Cs_4AC1E1C2, sizeof(CopyImage2dms4x_Cs_4AC1E1C2)}, + {CopyImage2dms8x_Cs_4AC1E1C2, sizeof(CopyImage2dms8x_Cs_4AC1E1C2)}, + {CopyImage2dShaderMipLevel_Cs_4AC1E1C2, sizeof(CopyImage2dShaderMipLevel_Cs_4AC1E1C2)}, + {CopyImageGammaCorrect2d_Cs_4AC1E1C2, sizeof(CopyImageGammaCorrect2d_Cs_4AC1E1C2)}, + {CopyImgToMem1d_Cs_4AC1E1C2, sizeof(CopyImgToMem1d_Cs_4AC1E1C2)}, + {CopyImgToMem2d_Cs_4AC1E1C2, sizeof(CopyImgToMem2d_Cs_4AC1E1C2)}, + {CopyImgToMem2dms2x_Cs_4AC1E1C2, sizeof(CopyImgToMem2dms2x_Cs_4AC1E1C2)}, + {CopyImgToMem2dms4x_Cs_4AC1E1C2, sizeof(CopyImgToMem2dms4x_Cs_4AC1E1C2)}, + {CopyImgToMem2dms8x_Cs_4AC1E1C2, sizeof(CopyImgToMem2dms8x_Cs_4AC1E1C2)}, + {CopyImgToMem3d_Cs_4AC1E1C2, sizeof(CopyImgToMem3d_Cs_4AC1E1C2)}, + {CopyMemToImg1d_Cs_4AC1E1C2, sizeof(CopyMemToImg1d_Cs_4AC1E1C2)}, + {CopyMemToImg2d_Cs_4AC1E1C2, sizeof(CopyMemToImg2d_Cs_4AC1E1C2)}, + {CopyMemToImg2dms2x_Cs_4AC1E1C2, sizeof(CopyMemToImg2dms2x_Cs_4AC1E1C2)}, + {CopyMemToImg2dms4x_Cs_4AC1E1C2, sizeof(CopyMemToImg2dms4x_Cs_4AC1E1C2)}, + {CopyMemToImg2dms8x_Cs_4AC1E1C2, sizeof(CopyMemToImg2dms8x_Cs_4AC1E1C2)}, + {CopyMemToImg3d_Cs_4AC1E1C2, sizeof(CopyMemToImg3d_Cs_4AC1E1C2)}, + {CopyTypedBuffer1d_Cs_4AC1E1C2, sizeof(CopyTypedBuffer1d_Cs_4AC1E1C2)}, + {CopyTypedBuffer2d_Cs_4AC1E1C2, sizeof(CopyTypedBuffer2d_Cs_4AC1E1C2)}, + {CopyTypedBuffer3d_Cs_4AC1E1C2, sizeof(CopyTypedBuffer3d_Cs_4AC1E1C2)}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {FillMemDword_Cs_4AC1E1C2, sizeof(FillMemDword_Cs_4AC1E1C2)}, + {GenerateMipmaps_Cs_4AC1E1C2, sizeof(GenerateMipmaps_Cs_4AC1E1C2)}, + {GenerateMipmapsLowp_Cs_4AC1E1C2, sizeof(GenerateMipmapsLowp_Cs_4AC1E1C2)}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {MsaaResolve2x_Cs_4AC1E1C2, sizeof(MsaaResolve2x_Cs_4AC1E1C2)}, + {MsaaResolve2xMax_Cs_4AC1E1C2, sizeof(MsaaResolve2xMax_Cs_4AC1E1C2)}, + {MsaaResolve2xMin_Cs_4AC1E1C2, sizeof(MsaaResolve2xMin_Cs_4AC1E1C2)}, + {MsaaResolve4x_Cs_4AC1E1C2, sizeof(MsaaResolve4x_Cs_4AC1E1C2)}, + {MsaaResolve4xMax_Cs_4AC1E1C2, sizeof(MsaaResolve4xMax_Cs_4AC1E1C2)}, + {MsaaResolve4xMin_Cs_4AC1E1C2, sizeof(MsaaResolve4xMin_Cs_4AC1E1C2)}, + {MsaaResolve8x_Cs_4AC1E1C2, sizeof(MsaaResolve8x_Cs_4AC1E1C2)}, + {MsaaResolve8xMax_Cs_4AC1E1C2, sizeof(MsaaResolve8xMax_Cs_4AC1E1C2)}, + {MsaaResolve8xMin_Cs_4AC1E1C2, sizeof(MsaaResolve8xMin_Cs_4AC1E1C2)}, + {MsaaResolveStencil2xMax_Cs_4AC1E1C2, sizeof(MsaaResolveStencil2xMax_Cs_4AC1E1C2)}, + {MsaaResolveStencil2xMin_Cs_4AC1E1C2, sizeof(MsaaResolveStencil2xMin_Cs_4AC1E1C2)}, + {MsaaResolveStencil4xMax_Cs_4AC1E1C2, sizeof(MsaaResolveStencil4xMax_Cs_4AC1E1C2)}, + {MsaaResolveStencil4xMin_Cs_4AC1E1C2, sizeof(MsaaResolveStencil4xMin_Cs_4AC1E1C2)}, + {MsaaResolveStencil8xMax_Cs_4AC1E1C2, sizeof(MsaaResolveStencil8xMax_Cs_4AC1E1C2)}, + {MsaaResolveStencil8xMin_Cs_4AC1E1C2, sizeof(MsaaResolveStencil8xMin_Cs_4AC1E1C2)}, + {MsaaScaledCopyImage2d_Cs_4AC1E1C2, sizeof(MsaaScaledCopyImage2d_Cs_4AC1E1C2)}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {RgbToYuvPacked_Cs_4AC1E1C2, sizeof(RgbToYuvPacked_Cs_4AC1E1C2)}, + {RgbToYuvPlanar_Cs_4AC1E1C2, sizeof(RgbToYuvPlanar_Cs_4AC1E1C2)}, + {ScaledCopyImage2d_Cs_4AC1E1C2, sizeof(ScaledCopyImage2d_Cs_4AC1E1C2)}, + {ScaledCopyImage2dMorton2x_Cs_4AC1E1C2, sizeof(ScaledCopyImage2dMorton2x_Cs_4AC1E1C2)}, + {ScaledCopyImage2dMorton4x_Cs_4AC1E1C2, sizeof(ScaledCopyImage2dMorton4x_Cs_4AC1E1C2)}, + {ScaledCopyImage2dMorton8x_Cs_4AC1E1C2, sizeof(ScaledCopyImage2dMorton8x_Cs_4AC1E1C2)}, + {ScaledCopyImage3d_Cs_4AC1E1C2, sizeof(ScaledCopyImage3d_Cs_4AC1E1C2)}, + {ScaledCopyTypedBufferToImg2D_Cs_4AC1E1C2, sizeof(ScaledCopyTypedBufferToImg2D_Cs_4AC1E1C2)}, + {YuvIntToRgb_Cs_4AC1E1C2, sizeof(YuvIntToRgb_Cs_4AC1E1C2)}, + {YuvToRgb_Cs_4AC1E1C2, sizeof(YuvToRgb_Cs_4AC1E1C2)}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {Gfx10PrtPlusResolveResidencyMapDecode_Cs_4AC1E1C2, sizeof(Gfx10PrtPlusResolveResidencyMapDecode_Cs_4AC1E1C2)}, + {Gfx10PrtPlusResolveResidencyMapEncode_Cs_4AC1E1C2, sizeof(Gfx10PrtPlusResolveResidencyMapEncode_Cs_4AC1E1C2)}, + {Gfx10PrtPlusResolveSamplingStatusMap_Cs_4AC1E1C2, sizeof(Gfx10PrtPlusResolveSamplingStatusMap_Cs_4AC1E1C2)}, + {nullptr, 0}, + {nullptr, 0}, + {Gfx12EchoGlobalTable_Cs_4AC1E1C2, sizeof(Gfx12EchoGlobalTable_Cs_4AC1E1C2)}, + {Gfx12FillMem128b_Cs_4AC1E1C2, sizeof(Gfx12FillMem128b_Cs_4AC1E1C2)}, + {Gfx12FillMem128bNoalloc_Cs_4AC1E1C2, sizeof(Gfx12FillMem128bNoalloc_Cs_4AC1E1C2)}, + {Gfx12ResolveOcclusionQuery_Cs_4AC1E1C2, sizeof(Gfx12ResolveOcclusionQuery_Cs_4AC1E1C2)}, + {Gfx12ResolvePipelineStatsQuery_Cs_4AC1E1C2, sizeof(Gfx12ResolvePipelineStatsQuery_Cs_4AC1E1C2)}, + {Gfx12ResolveStreamoutStatsQuery_Cs_4AC1E1C2, sizeof(Gfx12ResolveStreamoutStatsQuery_Cs_4AC1E1C2)}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, + {nullptr, 0}, +}; +#endif + } // Pal diff --git a/src/core/hw/gfxip/rpm/g_rpmComputePipelineInit.cpp b/src/core/hw/gfxip/rpm/g_rpmComputePipelineInit.cpp index 644d2777e..dc1a7f439 100644 --- a/src/core/hw/gfxip/rpm/g_rpmComputePipelineInit.cpp +++ b/src/core/hw/gfxip/rpm/g_rpmComputePipelineInit.cpp @@ -25,18 +25,21 @@ #include "core/device.h" #include "core/internalMemMgr.h" -#include "core/hw/gfxip/computePipeline.h" -#include "core/hw/gfxip/rpm/g_rpmComputePipelineInit.h" -#include "core/hw/gfxip/rpm/g_rpmComputePipelineBinaries.h" +#include "core/hw/gfxip/graphicsPipeline.h" +#include "core/hw/gfxip/rpm/g_rpmGfxPipelineInit.h" +#if PAL_BUILD_RPM_GFX_SHADERS +#include "core/hw/gfxip/rpm/g_rpmGfxPipelineBinaries.h" +#endif using namespace Util; namespace Pal { +#if PAL_BUILD_RPM_GFX_SHADERS // ===================================================================================================================== -// Helper function that returns a compute pipeline table for a given gfxIP -static const PipelineBinary*const GetRpmComputePipelineTable( +// Helper function that returns a graphics pipeline table for a given gfxIP +static const PipelineBinary*const GetRpmGraphicsPipelineTable( const GpuChipProperties& properties) { const PipelineBinary* pTable = nullptr; @@ -44,8 +47,11 @@ static const PipelineBinary*const GetRpmComputePipelineTable( { case Pal::IpTriple({ 10, 1, 0 }): case Pal::IpTriple({ 10, 1, 1 }): + pTable = rpmGfxBinaryTable10_1_0; + break; + case Pal::IpTriple({ 10, 1, 2 }): - pTable = rpmComputeBinaryTable10_1_0; + pTable = rpmGfxBinaryTable10_1_2; break; case Pal::IpTriple({ 10, 3, 0 }): @@ -53,39 +59,43 @@ static const PipelineBinary*const GetRpmComputePipelineTable( case Pal::IpTriple({ 10, 3, 2 }): case Pal::IpTriple({ 10, 3, 4 }): case Pal::IpTriple({ 10, 3, 5 }): - pTable = rpmComputeBinaryTable10_3_0; + pTable = rpmGfxBinaryTable10_3_0; break; case Pal::IpTriple({ 10, 3, 6 }): - pTable = rpmComputeBinaryTable10_3_6; + pTable = rpmGfxBinaryTable10_3_6; break; case Pal::IpTriple({ 11, 0, 0 }): case Pal::IpTriple({ 11, 0, 1 }): - pTable = rpmComputeBinaryTable11_0_0; - break; - case Pal::IpTriple({ 11, 0, 2 }): - pTable = rpmComputeBinaryTable11_0_2; + pTable = rpmGfxBinaryTable11_0_0; break; case Pal::IpTriple({ 11, 0, 3 }): - pTable = rpmComputeBinaryTable11_0_3; + pTable = rpmGfxBinaryTable11_0_3; break; case Pal::IpTriple({ 11, 5, 0 }): - pTable = rpmComputeBinaryTable11_5_0; + pTable = rpmGfxBinaryTable11_5_0; break; #if PAL_BUILD_STRIX_HALO case Pal::IpTriple({ 11, 5, 1 }): - pTable = rpmComputeBinaryTable11_5_1; + pTable = rpmGfxBinaryTable11_5_1; + break; +#endif + +#if PAL_BUILD_GFX12 && PAL_BUILD_NAVI44 + // reuse 12_0_1 for Navi44 as well. Not even sure what this is? Would like some guidance please. + case Pal::IpTriple({ 12, 0, 0 }): + pTable = rpmGfxBinaryTable12_0_1; break; #endif #if PAL_BUILD_GFX12 && PAL_BUILD_NAVI48 case Pal::IpTriple({ 12, 0, 1 }): - pTable = rpmComputeBinaryTable12_0_1; + pTable = rpmGfxBinaryTable12_0_1; break; #endif @@ -93,17 +103,22 @@ static const PipelineBinary*const GetRpmComputePipelineTable( return pTable; } +#endif // ===================================================================================================================== -// Creates all compute pipeline objects required by RsrcProcMgr. -Result CreateRpmComputePipelines( - GfxDevice* pDevice, - ComputePipeline** pPipelineMem) +// Creates all graphics pipeline objects required by RsrcProcMgr. +Result CreateRpmGraphicsPipelines( + GfxDevice* pDevice, + GraphicsPipeline** pPipelineMem) { Result result = Result::Success; +#if PAL_BUILD_RPM_GFX_SHADERS + GraphicsPipelineCreateInfo pipeInfo = { }; + GraphicsPipelineInternalCreateInfo internalInfo = { }; + const GraphicsPipelineInternalCreateInfo NullInternalInfo = { }; const GpuChipProperties& properties = pDevice->Parent()->ChipProperties(); - const PipelineBinary*const pTable = GetRpmComputePipelineTable(properties); + const PipelineBinary*const pTable = GetRpmGraphicsPipelineTable(properties); if (pTable == nullptr) { @@ -111,1350 +126,1832 @@ Result CreateRpmComputePipelines( return Result::ErrorUnknown; } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ClearBuffer)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ClearBuffer); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ClearImage96Bpp)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ClearImage96Bpp); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ClearImage)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ClearImage); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ClearImageMsaaPlanar)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ClearImageMsaaPlanar); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ClearImageMsaaSampleMajor)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ClearImageMsaaSampleMajor); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyBufferByte)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyBufferByte); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyBufferDqword)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyBufferDqword); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyBufferDword)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyBufferDword); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dMorton2x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dMorton2x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dMorton4x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dMorton4x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dMorton8x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dMorton8x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dms2x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dms2x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dms4x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dms4x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dms8x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dms8x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dShaderMipLevel)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dShaderMipLevel); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImageGammaCorrect2d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImageGammaCorrect2d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImgToMem1d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImgToMem1d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImgToMem2d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImgToMem2d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImgToMem2dms2x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImgToMem2dms2x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImgToMem2dms4x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImgToMem2dms4x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImgToMem2dms8x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImgToMem2dms8x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImgToMem3d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyImgToMem3d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyMemToImg1d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyMemToImg1d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyMemToImg2d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyMemToImg2d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyMemToImg2dms2x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyMemToImg2dms2x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyMemToImg2dms4x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyMemToImg2dms4x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyMemToImg2dms8x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyMemToImg2dms8x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyMemToImg3d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyMemToImg3d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyTypedBuffer1d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyTypedBuffer1d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyTypedBuffer2d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyTypedBuffer2d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyTypedBuffer3d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::CopyTypedBuffer3d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ExpandMaskRam)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ExpandMaskRam); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ExpandMaskRamMs2x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ExpandMaskRamMs2x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ExpandMaskRamMs4x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ExpandMaskRamMs4x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ExpandMaskRamMs8x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ExpandMaskRamMs8x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::FastDepthClear)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::FastDepthClear); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::FastDepthExpClear)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::FastDepthExpClear); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::FastDepthStExpClear)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::FastDepthStExpClear); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::FillMem4xDword)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::FillMem4xDword); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - pipeInfo.interleaveSize = DispatchInterleaveSize::Disable; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::FillMemDword)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::FillMemDword); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - pipeInfo.interleaveSize = DispatchInterleaveSize::Disable; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::GenerateMipmaps)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::GenerateMipmaps); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::GenerateMipmapsLowp)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::GenerateMipmapsLowp); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::HtileCopyAndFixUp)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::HtileCopyAndFixUp); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::HtileSR4xUpdate)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::HtileSR4xUpdate); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::HtileSRUpdate)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::HtileSRUpdate); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskCopyImage)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskCopyImage); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskCopyImageOptimized)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskCopyImageOptimized); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskCopyImgToMem)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[CopyDepth].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskCopyImgToMem); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[CopyDepth].pBuffer; + pipeInfo.pipelineBinarySize = pTable[CopyDepth].size; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskExpand2x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskExpand2x); + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[CopyDepth], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskExpand4x)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[CopyDepthStencil].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskExpand4x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[CopyDepthStencil].pBuffer; + pipeInfo.pipelineBinarySize = pTable[CopyDepthStencil].size; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskExpand8x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskExpand8x); + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[CopyDepthStencil], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve1xEqaa)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[CopyMsaaDepth].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve1xEqaa); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[CopyMsaaDepth].pBuffer; + pipeInfo.pipelineBinarySize = pTable[CopyMsaaDepth].size; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve2x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve2x); + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[CopyMsaaDepth], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve2xEqaa)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[CopyMsaaDepthStencil].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve2xEqaa); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[CopyMsaaDepthStencil].pBuffer; + pipeInfo.pipelineBinarySize = pTable[CopyMsaaDepthStencil].size; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve2xEqaaMax)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve2xEqaaMax); + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[CopyMsaaDepthStencil], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve2xEqaaMin)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[CopyMsaaStencil].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve2xEqaaMin); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[CopyMsaaStencil].pBuffer; + pipeInfo.pipelineBinarySize = pTable[CopyMsaaStencil].size; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve2xMax)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve2xMax); + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x1; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[CopyMsaaStencil], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve2xMin)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[CopyStencil].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve2xMin); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[CopyStencil].pBuffer; + pipeInfo.pipelineBinarySize = pTable[CopyStencil].size; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve4x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve4x); + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x1; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[CopyStencil], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve4xEqaa)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[DccDecompress].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve4xEqaa); + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[DccDecompress].pBuffer; + pipeInfo.pipelineBinarySize = pTable[DccDecompress].size; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve4xEqaaMax)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve4xEqaaMax); + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + internalInfo = { }; + internalInfo.flags.dccDecompress = true; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + internalInfo, + &pPipelineMem[DccDecompress], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve4xEqaaMin)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[DepthExpand].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve4xEqaaMin); + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[DepthExpand].pBuffer; + pipeInfo.pipelineBinarySize = pTable[DepthExpand].size; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve4xMax)].pBuffer != nullptr)) + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[DepthExpand], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[DepthResummarize].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve4xMax); + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[DepthResummarize].pBuffer; + pipeInfo.pipelineBinarySize = pTable[DepthResummarize].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[DepthResummarize], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve4xMin)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve4xMin); + if ((result == Result::Success) && (pTable[DepthSlowDraw].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[DepthSlowDraw].pBuffer; + pipeInfo.pipelineBinarySize = pTable[DepthSlowDraw].size; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve8x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve8x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[DepthSlowDraw], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve8xEqaa)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[FastClearElim].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve8xEqaa); + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[FastClearElim].pBuffer; + pipeInfo.pipelineBinarySize = pTable[FastClearElim].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + internalInfo = { }; + internalInfo.flags.fastClearElim = true; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + internalInfo, + &pPipelineMem[FastClearElim], + AllocInternal); + } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve8xEqaaMax)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[FmaskDecompress].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve8xEqaaMax); + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[FmaskDecompress].pBuffer; + pipeInfo.pipelineBinarySize = pTable[FmaskDecompress].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve8xEqaaMin)].pBuffer != nullptr)) + internalInfo = { }; + internalInfo.flags.fmaskDecompress = true; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + internalInfo, + &pPipelineMem[FmaskDecompress], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Copy_32ABGR].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Copy_32ABGR].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Copy_32ABGR].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32Z32W32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Copy_32ABGR], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Copy_32GR].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Copy_32GR].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Copy_32GR].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x3; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Copy_32GR], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Copy_32R].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Copy_32R].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Copy_32R].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x1; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Copy_32R], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Copy_FP16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Copy_FP16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Copy_FP16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Copy_FP16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Copy_SINT16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Copy_SINT16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Copy_SINT16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Sint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Copy_SINT16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Copy_SNORM16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Copy_SNORM16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Copy_SNORM16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Snorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Copy_SNORM16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Copy_UINT16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Copy_UINT16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Copy_UINT16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Copy_UINT16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Copy_UNORM16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Copy_UNORM16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Copy_UNORM16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Copy_UNORM16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ResolveFixedFunc_32ABGR].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_32ABGR].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_32ABGR].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32Z32W32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + internalInfo = { }; + internalInfo.flags.resolveFixedFunc = true; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + internalInfo, + &pPipelineMem[ResolveFixedFunc_32ABGR], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ResolveFixedFunc_32GR].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_32GR].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_32GR].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x3; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + internalInfo = { }; + internalInfo.flags.resolveFixedFunc = true; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + internalInfo, + &pPipelineMem[ResolveFixedFunc_32GR], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ResolveFixedFunc_32R].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_32R].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_32R].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x1; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + internalInfo = { }; + internalInfo.flags.resolveFixedFunc = true; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + internalInfo, + &pPipelineMem[ResolveFixedFunc_32R], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ResolveFixedFunc_FP16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_FP16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_FP16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + internalInfo = { }; + internalInfo.flags.resolveFixedFunc = true; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + internalInfo, + &pPipelineMem[ResolveFixedFunc_FP16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ResolveFixedFunc_SINT16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_SINT16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_SINT16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Sint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + internalInfo = { }; + internalInfo.flags.resolveFixedFunc = true; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + internalInfo, + &pPipelineMem[ResolveFixedFunc_SINT16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ResolveFixedFunc_SNORM16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_SNORM16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_SNORM16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Snorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + internalInfo = { }; + internalInfo.flags.resolveFixedFunc = true; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + internalInfo, + &pPipelineMem[ResolveFixedFunc_SNORM16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ResolveFixedFunc_UINT16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_UINT16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_UINT16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + internalInfo = { }; + internalInfo.flags.resolveFixedFunc = true; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + internalInfo, + &pPipelineMem[ResolveFixedFunc_UINT16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ResolveFixedFunc_UNORM16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_UNORM16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_UNORM16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + internalInfo = { }; + internalInfo.flags.resolveFixedFunc = true; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + internalInfo, + &pPipelineMem[ResolveFixedFunc_UNORM16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy2d_32ABGR].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_32ABGR].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_32ABGR].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32Z32W32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy2d_32ABGR], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy2d_32GR].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_32GR].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_32GR].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x3; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy2d_32GR], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy2d_32R].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_32R].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_32R].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x1; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy2d_32R], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy2d_FP16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_FP16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_FP16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy2d_FP16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy2d_SINT16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_SINT16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_SINT16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Sint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy2d_SINT16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy2d_SNORM16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_SNORM16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_SNORM16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Snorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy2d_SNORM16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy2d_UINT16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_UINT16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_UINT16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy2d_UINT16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy2d_UNORM16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_UNORM16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_UNORM16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy2d_UNORM16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy3d_32ABGR].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_32ABGR].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_32ABGR].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32Z32W32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy3d_32ABGR], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy3d_32GR].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_32GR].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_32GR].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x3; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy3d_32GR], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy3d_32R].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_32R].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_32R].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x1; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy3d_32R], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy3d_FP16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_FP16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_FP16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy3d_FP16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy3d_SINT16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_SINT16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_SINT16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Sint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy3d_SINT16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy3d_SNORM16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_SNORM16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_SNORM16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Snorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy3d_SNORM16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy3d_UINT16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_UINT16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_UINT16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy3d_UINT16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ScaledCopy3d_UNORM16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_UNORM16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_UNORM16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopy3d_UNORM16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[SlowColorClear_32ABGR].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[SlowColorClear_32ABGR].pBuffer; + pipeInfo.pipelineBinarySize = pTable[SlowColorClear_32ABGR].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32Z32W32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[SlowColorClear_32ABGR], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[SlowColorClear_32GR].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[SlowColorClear_32GR].pBuffer; + pipeInfo.pipelineBinarySize = pTable[SlowColorClear_32GR].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x3; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[SlowColorClear_32GR], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[SlowColorClear_32R].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[SlowColorClear_32R].pBuffer; + pipeInfo.pipelineBinarySize = pTable[SlowColorClear_32R].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x1; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[SlowColorClear_32R], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[SlowColorClear_FP16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[SlowColorClear_FP16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[SlowColorClear_FP16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[SlowColorClear_FP16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[SlowColorClear_SINT16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[SlowColorClear_SINT16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[SlowColorClear_SINT16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Sint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[SlowColorClear_SINT16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[SlowColorClear_SNORM16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[SlowColorClear_SNORM16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[SlowColorClear_SNORM16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Snorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[SlowColorClear_SNORM16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[SlowColorClear_UINT16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[SlowColorClear_UINT16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[SlowColorClear_UINT16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[SlowColorClear_UINT16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[SlowColorClear_UNORM16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[SlowColorClear_UNORM16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[SlowColorClear_UNORM16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[SlowColorClear_UNORM16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_32ABGR].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_32ABGR].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_32ABGR].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32Z32W32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Gfx11ResolveGraphics_32ABGR], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_32GR].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_32GR].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_32GR].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x3; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Gfx11ResolveGraphics_32GR], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_32R].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_32R].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_32R].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x1; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Gfx11ResolveGraphics_32R], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_FP16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_FP16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_FP16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Gfx11ResolveGraphics_FP16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_SINT16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_SINT16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_SINT16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Sint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Gfx11ResolveGraphics_SINT16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_SNORM16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_SNORM16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_SNORM16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Snorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Gfx11ResolveGraphics_SNORM16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_UINT16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_UINT16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_UINT16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Gfx11ResolveGraphics_UINT16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_UNORM16].pBuffer != nullptr)) + { + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_UNORM16].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_UNORM16].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[Gfx11ResolveGraphics_UNORM16], + AllocInternal); + } + + if ((result == Result::Success) && (pTable[ResolveDepth].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve8xEqaaMin); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ResolveDepth].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ResolveDepth].size; + + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ResolveDepth], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve8xMax)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[ResolveDepthCopy].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve8xMax); + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ResolveDepthCopy].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ResolveDepthCopy].size; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x1; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Float; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ResolveDepthCopy], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve8xMin)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[ResolveStencil].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve8xMin); + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ResolveStencil].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ResolveStencil].size; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ResolveStencil], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskScaledCopy)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[ResolveStencilCopy].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskScaledCopy); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ResolveStencilCopy].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ResolveStencilCopy].size; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve2x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve2x); + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x2; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::Y, ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ResolveStencilCopy], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve2xMax)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[ScaledCopyDepth].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve2xMax); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopyDepth].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopyDepth].size; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve2xMin)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve2xMin); + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopyDepth], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve4x)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[ScaledCopyDepthStencil].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve4x); + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopyDepthStencil].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopyDepthStencil].size; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopyDepthStencil], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve4xMax)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[ScaledCopyImageColorKey].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve4xMax); + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopyImageColorKey].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopyImageColorKey].size; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0xF; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopyImageColorKey], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve4xMin)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[ScaledCopyMsaaDepth].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve4xMin); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopyMsaaDepth].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopyMsaaDepth].size; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve8x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve8x); + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopyMsaaDepth], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve8xMax)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[ScaledCopyMsaaDepthStencil].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve8xMax); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopyMsaaDepthStencil].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopyMsaaDepthStencil].size; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve8xMin)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve8xMin); + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopyMsaaDepthStencil], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolveStencil2xMax)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[ScaledCopyMsaaStencil].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolveStencil2xMax); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopyMsaaStencil].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopyMsaaStencil].size; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolveStencil2xMin)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolveStencil2xMin); + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x1; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopyMsaaStencil], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolveStencil4xMax)].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[ScaledCopyStencil].pBuffer != nullptr)) { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolveStencil4xMax); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[ScaledCopyStencil].pBuffer; + pipeInfo.pipelineBinarySize = pTable[ScaledCopyStencil].size; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolveStencil4xMin)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolveStencil4xMin); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolveStencil8xMax)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolveStencil8xMax); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolveStencil8xMin)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolveStencil8xMin); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaScaledCopyImage2d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::MsaaScaledCopyImage2d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ResolveOcclusionQuery)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ResolveOcclusionQuery); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ResolvePipelineStatsQuery)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ResolvePipelineStatsQuery); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ResolveStreamoutStatsQuery)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ResolveStreamoutStatsQuery); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::RgbToYuvPacked)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::RgbToYuvPacked); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::RgbToYuvPlanar)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::RgbToYuvPlanar); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ScaledCopyImage2d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ScaledCopyImage2d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ScaledCopyImage2dMorton2x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ScaledCopyImage2dMorton2x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ScaledCopyImage2dMorton4x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ScaledCopyImage2dMorton4x); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ScaledCopyImage2dMorton8x)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ScaledCopyImage2dMorton8x); + pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; + pipeInfo.viewportInfo.depthClipNearEnable = false; + pipeInfo.viewportInfo.depthClipFarEnable = false; + pipeInfo.cbState.logicOp = LogicOp::Copy; + pipeInfo.cbState.target[0].channelWriteMask = 0x1; + pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8_Uint; + pipeInfo.cbState.target[0].swizzledFormat.swizzle = + { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; + pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; + pipeInfo.rsState.binningOverride = BinningOverride::Disable; + pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + result = pDevice->CreateGraphicsPipelineInternal( + pipeInfo, + NullInternalInfo, + &pPipelineMem[ScaledCopyStencil], + AllocInternal); } - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ScaledCopyImage3d)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ScaledCopyImage3d); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ScaledCopyTypedBufferToImg2D)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::ScaledCopyTypedBufferToImg2D); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::YuvIntToRgb)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::YuvIntToRgb); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::YuvToRgb)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::YuvToRgb); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx9EchoGlobalTable)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx9EchoGlobalTable); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - pipeInfo.interleaveSize = DispatchInterleaveSize::Disable; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10BuildDccLookupTable)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10BuildDccLookupTable); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10ClearDccComputeSetFirstPixel)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10ClearDccComputeSetFirstPixel); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10ClearDccComputeSetFirstPixelMsaa)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10ClearDccComputeSetFirstPixelMsaa); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10GenerateCmdDispatch)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10GenerateCmdDispatch); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10GenerateCmdDispatchTaskMesh)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10GenerateCmdDispatchTaskMesh); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10GenerateCmdDraw)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10GenerateCmdDraw); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10GfxDccToDisplayDcc)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10GfxDccToDisplayDcc); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10PrtPlusResolveResidencyMapDecode)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10PrtPlusResolveResidencyMapDecode); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10PrtPlusResolveResidencyMapEncode)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10PrtPlusResolveResidencyMapEncode); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10PrtPlusResolveSamplingStatusMap)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10PrtPlusResolveSamplingStatusMap); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10VrsHtile)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10VrsHtile); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx11GenerateCmdDispatchTaskMesh)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx11GenerateCmdDispatchTaskMesh); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } - -#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx12EchoGlobalTable)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx12EchoGlobalTable); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - pipeInfo.interleaveSize = DispatchInterleaveSize::Disable; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } -#endif - -#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx12FillMem128b)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx12FillMem128b); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - pipeInfo.interleaveSize = DispatchInterleaveSize::Disable; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } -#endif - -#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx12FillMem128bNoalloc)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx12FillMem128bNoalloc); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - pipeInfo.interleaveSize = DispatchInterleaveSize::Disable; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } #endif - -#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx12ResolveOcclusionQuery)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx12ResolveOcclusionQuery); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } -#endif - -#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx12ResolvePipelineStatsQuery)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx12ResolvePipelineStatsQuery); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } -#endif - -#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) - if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx12ResolveStreamoutStatsQuery)].pBuffer != nullptr)) - { - constexpr uint32 Index = uint32(RpmComputePipeline::Gfx12ResolveStreamoutStatsQuery); - - ComputePipelineCreateInfo pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Index].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Index].size; - - result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); - } -#endif - return result; } diff --git a/src/core/hw/gfxip/rpm/g_rpmComputePipelineInit.h b/src/core/hw/gfxip/rpm/g_rpmComputePipelineInit.h index 9b0540583..32898f097 100644 --- a/src/core/hw/gfxip/rpm/g_rpmComputePipelineInit.h +++ b/src/core/hw/gfxip/rpm/g_rpmComputePipelineInit.h @@ -150,22 +150,22 @@ enum class RpmComputePipeline : uint32 Gfx10PrtPlusResolveSamplingStatusMap = 111, Gfx10VrsHtile = 112, Gfx11GenerateCmdDispatchTaskMesh = 113, -#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) +#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48 || PAL_BUILD_NAVI44) Gfx12EchoGlobalTable = 114, #endif -#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) +#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48 || PAL_BUILD_NAVI44) Gfx12FillMem128b = 115, #endif -#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) +#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48 || PAL_BUILD_NAVI44) Gfx12FillMem128bNoalloc = 116, #endif -#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) +#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48 || PAL_BUILD_NAVI44) Gfx12ResolveOcclusionQuery = 117, #endif -#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) +#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48 || PAL_BUILD_NAVI44) Gfx12ResolvePipelineStatsQuery = 118, #endif -#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) +#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48 || PAL_BUILD_NAVI44) Gfx12ResolveStreamoutStatsQuery = 119, #endif Count diff --git a/src/core/hw/gfxip/rpm/g_rpmGfxPipelineInit.cpp b/src/core/hw/gfxip/rpm/g_rpmGfxPipelineInit.cpp index 9f084f8bc..b4357e8fd 100644 --- a/src/core/hw/gfxip/rpm/g_rpmGfxPipelineInit.cpp +++ b/src/core/hw/gfxip/rpm/g_rpmGfxPipelineInit.cpp @@ -25,21 +25,18 @@ #include "core/device.h" #include "core/internalMemMgr.h" -#include "core/hw/gfxip/graphicsPipeline.h" -#include "core/hw/gfxip/rpm/g_rpmGfxPipelineInit.h" -#if PAL_BUILD_RPM_GFX_SHADERS -#include "core/hw/gfxip/rpm/g_rpmGfxPipelineBinaries.h" -#endif +#include "core/hw/gfxip/computePipeline.h" +#include "core/hw/gfxip/rpm/g_rpmComputePipelineInit.h" +#include "core/hw/gfxip/rpm/g_rpmComputePipelineBinaries.h" using namespace Util; namespace Pal { -#if PAL_BUILD_RPM_GFX_SHADERS // ===================================================================================================================== -// Helper function that returns a graphics pipeline table for a given gfxIP -static const PipelineBinary*const GetRpmGraphicsPipelineTable( +// Helper function that returns a compute pipeline table for a given gfxIP +static const PipelineBinary*const GetRpmComputePipelineTable( const GpuChipProperties& properties) { const PipelineBinary* pTable = nullptr; @@ -47,11 +44,8 @@ static const PipelineBinary*const GetRpmGraphicsPipelineTable( { case Pal::IpTriple({ 10, 1, 0 }): case Pal::IpTriple({ 10, 1, 1 }): - pTable = rpmGfxBinaryTable10_1_0; - break; - case Pal::IpTriple({ 10, 1, 2 }): - pTable = rpmGfxBinaryTable10_1_2; + pTable = rpmComputeBinaryTable10_1_0; break; case Pal::IpTriple({ 10, 3, 0 }): @@ -59,36 +53,45 @@ static const PipelineBinary*const GetRpmGraphicsPipelineTable( case Pal::IpTriple({ 10, 3, 2 }): case Pal::IpTriple({ 10, 3, 4 }): case Pal::IpTriple({ 10, 3, 5 }): - pTable = rpmGfxBinaryTable10_3_0; + pTable = rpmComputeBinaryTable10_3_0; break; case Pal::IpTriple({ 10, 3, 6 }): - pTable = rpmGfxBinaryTable10_3_6; + pTable = rpmComputeBinaryTable10_3_6; break; case Pal::IpTriple({ 11, 0, 0 }): case Pal::IpTriple({ 11, 0, 1 }): + pTable = rpmComputeBinaryTable11_0_0; + break; + case Pal::IpTriple({ 11, 0, 2 }): - pTable = rpmGfxBinaryTable11_0_0; + pTable = rpmComputeBinaryTable11_0_2; break; case Pal::IpTriple({ 11, 0, 3 }): - pTable = rpmGfxBinaryTable11_0_3; + pTable = rpmComputeBinaryTable11_0_3; break; case Pal::IpTriple({ 11, 5, 0 }): - pTable = rpmGfxBinaryTable11_5_0; + pTable = rpmComputeBinaryTable11_5_0; break; #if PAL_BUILD_STRIX_HALO case Pal::IpTriple({ 11, 5, 1 }): - pTable = rpmGfxBinaryTable11_5_1; + pTable = rpmComputeBinaryTable11_5_1; + break; +#endif + +#if PAL_BUILD_GFX12 && PAL_BUILD_NAVI44 + case Pal::IpTriple({ 12, 0, 0 }): + pTable = rpmComputeBinaryTable12_0_0; break; #endif #if PAL_BUILD_GFX12 && PAL_BUILD_NAVI48 case Pal::IpTriple({ 12, 0, 1 }): - pTable = rpmGfxBinaryTable12_0_1; + pTable = rpmComputeBinaryTable12_0_1; break; #endif @@ -96,22 +99,17 @@ static const PipelineBinary*const GetRpmGraphicsPipelineTable( return pTable; } -#endif // ===================================================================================================================== -// Creates all graphics pipeline objects required by RsrcProcMgr. -Result CreateRpmGraphicsPipelines( - GfxDevice* pDevice, - GraphicsPipeline** pPipelineMem) +// Creates all compute pipeline objects required by RsrcProcMgr. +Result CreateRpmComputePipelines( + GfxDevice* pDevice, + ComputePipeline** pPipelineMem) { Result result = Result::Success; -#if PAL_BUILD_RPM_GFX_SHADERS - GraphicsPipelineCreateInfo pipeInfo = { }; - GraphicsPipelineInternalCreateInfo internalInfo = { }; - const GraphicsPipelineInternalCreateInfo NullInternalInfo = { }; const GpuChipProperties& properties = pDevice->Parent()->ChipProperties(); - const PipelineBinary*const pTable = GetRpmGraphicsPipelineTable(properties); + const PipelineBinary*const pTable = GetRpmComputePipelineTable(properties); if (pTable == nullptr) { @@ -119,1833 +117,1351 @@ Result CreateRpmGraphicsPipelines( return Result::ErrorUnknown; } - if ((result == Result::Success) && (pTable[CopyDepth].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ClearBuffer)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ClearBuffer); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ClearImage96Bpp)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ClearImage96Bpp); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ClearImage)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ClearImage); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ClearImageMsaaPlanar)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ClearImageMsaaPlanar); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ClearImageMsaaSampleMajor)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ClearImageMsaaSampleMajor); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyBufferByte)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyBufferByte); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyBufferDqword)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyBufferDqword); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyBufferDword)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyBufferDword); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dMorton2x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dMorton2x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dMorton4x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dMorton4x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dMorton8x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dMorton8x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dms2x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dms2x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dms4x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dms4x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dms8x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dms8x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImage2dShaderMipLevel)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImage2dShaderMipLevel); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImageGammaCorrect2d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImageGammaCorrect2d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImgToMem1d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImgToMem1d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImgToMem2d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImgToMem2d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImgToMem2dms2x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImgToMem2dms2x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImgToMem2dms4x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImgToMem2dms4x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImgToMem2dms8x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImgToMem2dms8x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyImgToMem3d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyImgToMem3d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyMemToImg1d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyMemToImg1d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyMemToImg2d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyMemToImg2d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyMemToImg2dms2x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyMemToImg2dms2x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyMemToImg2dms4x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyMemToImg2dms4x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyMemToImg2dms8x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyMemToImg2dms8x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyMemToImg3d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyMemToImg3d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyTypedBuffer1d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyTypedBuffer1d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyTypedBuffer2d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyTypedBuffer2d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::CopyTypedBuffer3d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::CopyTypedBuffer3d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ExpandMaskRam)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ExpandMaskRam); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ExpandMaskRamMs2x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ExpandMaskRamMs2x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ExpandMaskRamMs4x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ExpandMaskRamMs4x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ExpandMaskRamMs8x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ExpandMaskRamMs8x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::FastDepthClear)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::FastDepthClear); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::FastDepthExpClear)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::FastDepthExpClear); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::FastDepthStExpClear)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::FastDepthStExpClear); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::FillMem4xDword)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::FillMem4xDword); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + pipeInfo.interleaveSize = DispatchInterleaveSize::Disable; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::FillMemDword)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::FillMemDword); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + pipeInfo.interleaveSize = DispatchInterleaveSize::Disable; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::GenerateMipmaps)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::GenerateMipmaps); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::GenerateMipmapsLowp)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::GenerateMipmapsLowp); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::HtileCopyAndFixUp)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::HtileCopyAndFixUp); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::HtileSR4xUpdate)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::HtileSR4xUpdate); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::HtileSRUpdate)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::HtileSRUpdate); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskCopyImage)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskCopyImage); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskCopyImageOptimized)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskCopyImageOptimized); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskCopyImgToMem)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[CopyDepth].pBuffer; - pipeInfo.pipelineBinarySize = pTable[CopyDepth].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskCopyImgToMem); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskExpand2x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskExpand2x); - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[CopyDepth], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[CopyDepthStencil].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskExpand4x)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[CopyDepthStencil].pBuffer; - pipeInfo.pipelineBinarySize = pTable[CopyDepthStencil].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskExpand4x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskExpand8x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskExpand8x); - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[CopyDepthStencil], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[CopyMsaaDepth].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve1xEqaa)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[CopyMsaaDepth].pBuffer; - pipeInfo.pipelineBinarySize = pTable[CopyMsaaDepth].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve1xEqaa); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve2x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve2x); - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[CopyMsaaDepth], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[CopyMsaaDepthStencil].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve2xEqaa)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[CopyMsaaDepthStencil].pBuffer; - pipeInfo.pipelineBinarySize = pTable[CopyMsaaDepthStencil].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve2xEqaa); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve2xEqaaMax)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve2xEqaaMax); - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[CopyMsaaDepthStencil], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[CopyMsaaStencil].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve2xEqaaMin)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[CopyMsaaStencil].pBuffer; - pipeInfo.pipelineBinarySize = pTable[CopyMsaaStencil].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve2xEqaaMin); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve2xMax)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve2xMax); - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x1; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[CopyMsaaStencil], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[CopyStencil].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve2xMin)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[CopyStencil].pBuffer; - pipeInfo.pipelineBinarySize = pTable[CopyStencil].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve2xMin); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve4x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve4x); - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x1; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[CopyStencil], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[DccDecompress].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve4xEqaa)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[DccDecompress].pBuffer; - pipeInfo.pipelineBinarySize = pTable[DccDecompress].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve4xEqaa); - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve4xEqaaMax)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve4xEqaaMax); - internalInfo = { }; - internalInfo.flags.dccDecompress = true; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - internalInfo, - &pPipelineMem[DccDecompress], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[DepthExpand].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve4xEqaaMin)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[DepthExpand].pBuffer; - pipeInfo.pipelineBinarySize = pTable[DepthExpand].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve4xEqaaMin); - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[DepthExpand], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[DepthResummarize].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve4xMax)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[DepthResummarize].pBuffer; - pipeInfo.pipelineBinarySize = pTable[DepthResummarize].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve4xMax); - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[DepthResummarize], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[DepthSlowDraw].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[DepthSlowDraw].pBuffer; - pipeInfo.pipelineBinarySize = pTable[DepthSlowDraw].size; + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve4xMin)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve4xMin); - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[DepthSlowDraw], - AllocInternal); + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve8x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve8x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[FastClearElim].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve8xEqaa)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[FastClearElim].pBuffer; - pipeInfo.pipelineBinarySize = pTable[FastClearElim].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve8xEqaa); - internalInfo = { }; - internalInfo.flags.fastClearElim = true; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - internalInfo, - &pPipelineMem[FastClearElim], - AllocInternal); - } + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - if ((result == Result::Success) && (pTable[FmaskDecompress].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve8xEqaaMax)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[FmaskDecompress].pBuffer; - pipeInfo.pipelineBinarySize = pTable[FmaskDecompress].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve8xEqaaMax); - internalInfo = { }; - internalInfo.flags.fmaskDecompress = true; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - internalInfo, - &pPipelineMem[FmaskDecompress], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Copy_32ABGR].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Copy_32ABGR].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Copy_32ABGR].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32Z32W32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Copy_32ABGR], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Copy_32GR].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Copy_32GR].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Copy_32GR].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x3; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Copy_32GR], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Copy_32R].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Copy_32R].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Copy_32R].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x1; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Copy_32R], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Copy_FP16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Copy_FP16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Copy_FP16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Copy_FP16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Copy_SINT16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Copy_SINT16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Copy_SINT16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Sint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Copy_SINT16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Copy_SNORM16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Copy_SNORM16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Copy_SNORM16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Snorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Copy_SNORM16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Copy_UINT16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Copy_UINT16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Copy_UINT16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Copy_UINT16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Copy_UNORM16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Copy_UNORM16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Copy_UNORM16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Copy_UNORM16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ResolveFixedFunc_32ABGR].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_32ABGR].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_32ABGR].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32Z32W32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - internalInfo = { }; - internalInfo.flags.resolveFixedFunc = true; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - internalInfo, - &pPipelineMem[ResolveFixedFunc_32ABGR], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ResolveFixedFunc_32GR].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_32GR].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_32GR].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x3; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - internalInfo = { }; - internalInfo.flags.resolveFixedFunc = true; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - internalInfo, - &pPipelineMem[ResolveFixedFunc_32GR], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ResolveFixedFunc_32R].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_32R].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_32R].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x1; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - internalInfo = { }; - internalInfo.flags.resolveFixedFunc = true; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - internalInfo, - &pPipelineMem[ResolveFixedFunc_32R], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ResolveFixedFunc_FP16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_FP16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_FP16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - internalInfo = { }; - internalInfo.flags.resolveFixedFunc = true; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - internalInfo, - &pPipelineMem[ResolveFixedFunc_FP16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ResolveFixedFunc_SINT16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_SINT16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_SINT16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Sint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - internalInfo = { }; - internalInfo.flags.resolveFixedFunc = true; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - internalInfo, - &pPipelineMem[ResolveFixedFunc_SINT16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ResolveFixedFunc_SNORM16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_SNORM16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_SNORM16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Snorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - internalInfo = { }; - internalInfo.flags.resolveFixedFunc = true; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - internalInfo, - &pPipelineMem[ResolveFixedFunc_SNORM16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ResolveFixedFunc_UINT16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_UINT16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_UINT16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - internalInfo = { }; - internalInfo.flags.resolveFixedFunc = true; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - internalInfo, - &pPipelineMem[ResolveFixedFunc_UINT16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ResolveFixedFunc_UNORM16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ResolveFixedFunc_UNORM16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ResolveFixedFunc_UNORM16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - internalInfo = { }; - internalInfo.flags.resolveFixedFunc = true; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - internalInfo, - &pPipelineMem[ResolveFixedFunc_UNORM16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy2d_32ABGR].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_32ABGR].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_32ABGR].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32Z32W32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy2d_32ABGR], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy2d_32GR].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_32GR].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_32GR].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x3; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy2d_32GR], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy2d_32R].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_32R].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_32R].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x1; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy2d_32R], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy2d_FP16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_FP16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_FP16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy2d_FP16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy2d_SINT16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_SINT16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_SINT16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Sint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy2d_SINT16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy2d_SNORM16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_SNORM16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_SNORM16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Snorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy2d_SNORM16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy2d_UINT16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_UINT16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_UINT16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy2d_UINT16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy2d_UNORM16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy2d_UNORM16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy2d_UNORM16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy2d_UNORM16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy3d_32ABGR].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_32ABGR].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_32ABGR].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32Z32W32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy3d_32ABGR], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy3d_32GR].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_32GR].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_32GR].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x3; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy3d_32GR], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy3d_32R].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_32R].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_32R].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x1; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy3d_32R], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy3d_FP16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_FP16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_FP16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy3d_FP16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy3d_SINT16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_SINT16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_SINT16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Sint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy3d_SINT16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy3d_SNORM16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_SNORM16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_SNORM16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Snorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy3d_SNORM16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy3d_UINT16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_UINT16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_UINT16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy3d_UINT16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ScaledCopy3d_UNORM16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopy3d_UNORM16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopy3d_UNORM16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopy3d_UNORM16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[SlowColorClear_32ABGR].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[SlowColorClear_32ABGR].pBuffer; - pipeInfo.pipelineBinarySize = pTable[SlowColorClear_32ABGR].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32Z32W32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[SlowColorClear_32ABGR], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[SlowColorClear_32GR].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[SlowColorClear_32GR].pBuffer; - pipeInfo.pipelineBinarySize = pTable[SlowColorClear_32GR].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x3; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[SlowColorClear_32GR], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[SlowColorClear_32R].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[SlowColorClear_32R].pBuffer; - pipeInfo.pipelineBinarySize = pTable[SlowColorClear_32R].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x1; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[SlowColorClear_32R], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[SlowColorClear_FP16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[SlowColorClear_FP16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[SlowColorClear_FP16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[SlowColorClear_FP16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[SlowColorClear_SINT16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[SlowColorClear_SINT16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[SlowColorClear_SINT16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Sint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[SlowColorClear_SINT16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[SlowColorClear_SNORM16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[SlowColorClear_SNORM16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[SlowColorClear_SNORM16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Snorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[SlowColorClear_SNORM16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[SlowColorClear_UINT16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[SlowColorClear_UINT16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[SlowColorClear_UINT16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[SlowColorClear_UINT16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[SlowColorClear_UNORM16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[SlowColorClear_UNORM16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[SlowColorClear_UNORM16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[SlowColorClear_UNORM16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_32ABGR].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_32ABGR].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_32ABGR].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32Z32W32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Gfx11ResolveGraphics_32ABGR], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_32GR].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_32GR].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_32GR].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x3; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32Y32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Gfx11ResolveGraphics_32GR], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_32R].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_32R].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_32R].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x1; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Gfx11ResolveGraphics_32R], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_FP16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_FP16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_FP16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Gfx11ResolveGraphics_FP16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_SINT16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_SINT16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_SINT16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Sint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Gfx11ResolveGraphics_SINT16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_SNORM16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_SNORM16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_SNORM16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Snorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Gfx11ResolveGraphics_SNORM16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_UINT16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_UINT16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_UINT16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Gfx11ResolveGraphics_UINT16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[Gfx11ResolveGraphics_UNORM16].pBuffer != nullptr)) - { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[Gfx11ResolveGraphics_UNORM16].pBuffer; - pipeInfo.pipelineBinarySize = pTable[Gfx11ResolveGraphics_UNORM16].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X16Y16Z16W16_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[Gfx11ResolveGraphics_UNORM16], - AllocInternal); - } - - if ((result == Result::Success) && (pTable[ResolveDepth].pBuffer != nullptr)) + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve8xEqaaMin)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ResolveDepth].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ResolveDepth].size; - - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve8xEqaaMin); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ResolveDepth], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[ResolveDepthCopy].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve8xMax)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ResolveDepthCopy].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ResolveDepthCopy].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve8xMax); - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x1; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X32_Float; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ResolveDepthCopy], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[ResolveStencil].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskResolve8xMin)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ResolveStencil].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ResolveStencil].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskResolve8xMin); - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; - - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ResolveStencil], - AllocInternal); + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[ResolveStencilCopy].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaFmaskScaledCopy)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ResolveStencilCopy].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ResolveStencilCopy].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaFmaskScaledCopy); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve2x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve2x); - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x2; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::Y, ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ResolveStencilCopy], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[ScaledCopyDepth].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve2xMax)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopyDepth].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopyDepth].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve2xMax); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve2xMin)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve2xMin); - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopyDepth], - AllocInternal); + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[ScaledCopyDepthStencil].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve4x)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopyDepthStencil].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopyDepthStencil].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve4x); - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopyDepthStencil], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[ScaledCopyImageColorKey].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve4xMax)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopyImageColorKey].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopyImageColorKey].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve4xMax); - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0xF; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8Y8Z8W8_Unorm; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Y, ChannelSwizzle::Z, ChannelSwizzle::W }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; - - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopyImageColorKey], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[ScaledCopyMsaaDepth].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve4xMin)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopyMsaaDepth].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopyMsaaDepth].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve4xMin); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve8x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve8x); - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopyMsaaDepth], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[ScaledCopyMsaaDepthStencil].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve8xMax)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopyMsaaDepthStencil].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopyMsaaDepthStencil].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve8xMax); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolve8xMin)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolve8xMin); - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopyMsaaDepthStencil], - AllocInternal); + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[ScaledCopyMsaaStencil].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolveStencil2xMax)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopyMsaaStencil].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopyMsaaStencil].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolveStencil2xMax); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x1; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolveStencil2xMin)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolveStencil2xMin); - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopyMsaaStencil], - AllocInternal); + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } - if ((result == Result::Success) && (pTable[ScaledCopyStencil].pBuffer != nullptr)) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolveStencil4xMax)].pBuffer != nullptr)) { - pipeInfo = { }; - pipeInfo.pPipelineBinary = pTable[ScaledCopyStencil].pBuffer; - pipeInfo.pipelineBinarySize = pTable[ScaledCopyStencil].size; + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolveStencil4xMax); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - pipeInfo.iaState.topologyInfo.primitiveType = PrimitiveType::Rect; + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolveStencil4xMin)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolveStencil4xMin); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolveStencil8xMax)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolveStencil8xMax); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaResolveStencil8xMin)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaResolveStencil8xMin); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::MsaaScaledCopyImage2d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::MsaaScaledCopyImage2d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ResolveOcclusionQuery)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ResolveOcclusionQuery); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ResolvePipelineStatsQuery)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ResolvePipelineStatsQuery); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ResolveStreamoutStatsQuery)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ResolveStreamoutStatsQuery); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::RgbToYuvPacked)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::RgbToYuvPacked); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::RgbToYuvPlanar)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::RgbToYuvPlanar); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ScaledCopyImage2d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ScaledCopyImage2d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ScaledCopyImage2dMorton2x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ScaledCopyImage2dMorton2x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ScaledCopyImage2dMorton4x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ScaledCopyImage2dMorton4x); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ScaledCopyImage2dMorton8x)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ScaledCopyImage2dMorton8x); - pipeInfo.viewportInfo.depthClipNearEnable = false; - pipeInfo.viewportInfo.depthClipFarEnable = false; - pipeInfo.cbState.logicOp = LogicOp::Copy; - pipeInfo.cbState.target[0].channelWriteMask = 0x1; - pipeInfo.cbState.target[0].swizzledFormat.format = ChNumFormat::X8_Uint; - pipeInfo.cbState.target[0].swizzledFormat.swizzle = - { ChannelSwizzle::X, ChannelSwizzle::Zero, ChannelSwizzle::Zero, ChannelSwizzle::One }; - pipeInfo.viewportInfo.depthRange = DepthRange::ZeroToOne; - pipeInfo.rsState.binningOverride = BinningOverride::Disable; - pipeInfo.rsState.depthClampMode = DepthClampMode::_None; + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; - result = pDevice->CreateGraphicsPipelineInternal( - pipeInfo, - NullInternalInfo, - &pPipelineMem[ScaledCopyStencil], - AllocInternal); + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); } + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ScaledCopyImage3d)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ScaledCopyImage3d); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::ScaledCopyTypedBufferToImg2D)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::ScaledCopyTypedBufferToImg2D); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::YuvIntToRgb)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::YuvIntToRgb); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::YuvToRgb)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::YuvToRgb); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx9EchoGlobalTable)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx9EchoGlobalTable); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + pipeInfo.interleaveSize = DispatchInterleaveSize::Disable; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10BuildDccLookupTable)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10BuildDccLookupTable); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10ClearDccComputeSetFirstPixel)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10ClearDccComputeSetFirstPixel); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10ClearDccComputeSetFirstPixelMsaa)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10ClearDccComputeSetFirstPixelMsaa); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10GenerateCmdDispatch)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10GenerateCmdDispatch); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10GenerateCmdDispatchTaskMesh)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10GenerateCmdDispatchTaskMesh); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10GenerateCmdDraw)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10GenerateCmdDraw); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10GfxDccToDisplayDcc)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10GfxDccToDisplayDcc); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10PrtPlusResolveResidencyMapDecode)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10PrtPlusResolveResidencyMapDecode); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10PrtPlusResolveResidencyMapEncode)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10PrtPlusResolveResidencyMapEncode); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10PrtPlusResolveSamplingStatusMap)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10PrtPlusResolveSamplingStatusMap); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx10VrsHtile)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx10VrsHtile); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx11GenerateCmdDispatchTaskMesh)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx11GenerateCmdDispatchTaskMesh); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } + +#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx12EchoGlobalTable)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx12EchoGlobalTable); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + pipeInfo.interleaveSize = DispatchInterleaveSize::Disable; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } +#endif + +#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx12FillMem128b)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx12FillMem128b); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + pipeInfo.interleaveSize = DispatchInterleaveSize::Disable; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } +#endif + +#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx12FillMem128bNoalloc)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx12FillMem128bNoalloc); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + pipeInfo.interleaveSize = DispatchInterleaveSize::Disable; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } #endif + +#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx12ResolveOcclusionQuery)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx12ResolveOcclusionQuery); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } +#endif + +#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx12ResolvePipelineStatsQuery)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx12ResolvePipelineStatsQuery); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } +#endif + +#if PAL_BUILD_GFX12&& ((0 && 0) || (PAL_BUILD_NAVI48&& 0) || PAL_BUILD_NAVI48) + if ((result == Result::Success) && (pTable[uint32(RpmComputePipeline::Gfx12ResolveStreamoutStatsQuery)].pBuffer != nullptr)) + { + constexpr uint32 Index = uint32(RpmComputePipeline::Gfx12ResolveStreamoutStatsQuery); + + ComputePipelineCreateInfo pipeInfo = { }; + pipeInfo.pPipelineBinary = pTable[Index].pBuffer; + pipeInfo.pipelineBinarySize = pTable[Index].size; + + result = pDevice->CreateComputePipelineInternal(pipeInfo, &pPipelineMem[Index], AllocInternal); + } +#endif + return result; } -} // Pal +} // Pal \ No newline at end of file diff --git a/src/core/imported/SwWarDetection/SwdInclude.cmake b/src/core/imported/SwWarDetection/SwdInclude.cmake index c6ab6bb64..fb7b77fa4 100644 --- a/src/core/imported/SwWarDetection/SwdInclude.cmake +++ b/src/core/imported/SwWarDetection/SwdInclude.cmake @@ -77,6 +77,11 @@ function(swd_add_to_target TARGET PREFIX) target_compile_definitions(${TARGET} PRIVATE SWD_BUILD_NAVI48=$) #endif +#if SWD_BUILD_NAVI4X && SWD_BUILD_GFX12 && SWD_BUILD_NAVI44 + swd_bp(${PREFIX}_SWD_BUILD_NAVI44 OFF DEPENDS_ON "${PREFIX}_SWD_BUILD_NAVI4X;${PREFIX}_SWD_BUILD_GFX12") + target_compile_definitions(${TARGET} PRIVATE SWD_BUILD_NAVI44=$) +#endif + target_sources(${TARGET} PRIVATE ${SWD_SOURCE_DIR}/inc/g_gfx11SwWarDetection.h) set_source_files_properties(${SWD_SOURCE_DIR}/inc/g_gfx11SwWarDetection.h TARGET_DIRECTORY ${TARGET} PROPERTIES GENERATED ON) #if SWD_BUILD_GFX12 diff --git a/src/core/imported/SwWarDetection/inc/g_gfx12SwWarDetection.h b/src/core/imported/SwWarDetection/inc/g_gfx12SwWarDetection.h index 2a8d81edf..4731eabbe 100644 --- a/src/core/imported/SwWarDetection/inc/g_gfx12SwWarDetection.h +++ b/src/core/imported/SwWarDetection/inc/g_gfx12SwWarDetection.h @@ -93,61 +93,61 @@ union Gfx12SwWarDetection { struct { -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t controlCp4xDDIDNotSupported_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t shaderSqShaderSqcShaderSqgSQ_SQCAndSQGLegacyPerfCounterUsageIsBrokenWithNewGRBMArch__A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t sioSpiBci12_12412_125GLGWhenSpiGrpLaunchGuaranteeEnable_csGlgDisableIsSetAndGSTriggersGLG_UnexpectedSoftlockMaskIsSetOnHSShader_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t ppScIssueWithWALKALIGN8PRIMFITSST_1And64KScreenSpace_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t ppScDBD16comp2ndDrawFailedWithFastSet_ZFrom0_50__A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t geoGeTessOnGESPIGsgrpMismatchDueToSEStateBeingOutOfSync_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t controlImuIMUBusyNotConsideringRsmuFifoTransaction_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t controlImuIMUBusyNotConsideringRsmuFifoTransaction_B_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t textureTaGFX12RTTACanIncorrectlyCullProceduralNodes_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t ppDbECRRTLFixForConservativeZPASSCounts_A_ : 1; #else uint32_t : 1; @@ -155,67 +155,67 @@ union Gfx12SwWarDetection uint32_t : 1; -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t cmmGl2AtomicOpcodeCONDSUBNoRtnIsNotSupported_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t ppDbudbOreoScoreBoard_udbOsbData_udbOsbdMonitor_ostSampleMaskMismatchOREOScoreboardStoresInvalidEWaveIDAndIncorrectlySetsRespectiveValidBit_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t cmmGl2GL2CPERFSELSECTORSPerformanceCounterRTLBug_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t shaderSqShaderSqcsGetpcB64DoesntSignExtendTheResult_CausingSubsequentMemoryAccessToFail_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t controlCpRS64GFX12CPGRTLBugInCpgParserRs64Block_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t geoGeDRAWOPAQUERegUpdatesWithin5CyclesOnDifferentContextsCausesGEIssue_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t ppDbShaderSqSioSpiBciPixelWaitSyncPRECOLORModeLeadsToExportHang_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t cmmGl2RequestsToSameAddressNotOrderedForIOSpace_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t geoGeGeoPaUpdateToPHMQProgrammingGuideRelatedToTheProgrammingOfPHRingRegisters_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t ppDbMEMDIFFTOOLZSurfaceMismatchWithXorSwizzleBits_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t textureTcpGfx12MainTCPHangsWhenSClauseHasTooManyInstrWithNoValidThreads_A_ : 1; #else uint32_t : 1; @@ -223,37 +223,37 @@ union Gfx12SwWarDetection uint32_t : 1; -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t shaderSqGFX11GFX12TrapAfterInstructionIsSometimesNotReportedCorrectly_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t geoGeGeoPaPpScSioPcSioSpiBciSioSxBackPressureFromSCPC_SCSPICanCauseDeadlock_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t shaderSqSSLEEPVARAndSALLOCVGPRAliasWithCertainSQRegisterAddresses_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t gcDvIBHangAtASetkillInstructionWhenTheWaveIsInTrapAfterInstModeAndTrapOnEndIsSet_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t shaderSqVALUSGPRReadFifosGatherMaskDoesNotUpdateCorrectly_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t ppDbDataCorruptionDBFailedToMarkCacheValidForFastSetsTiles_A_ : 1; #else uint32_t : 1; @@ -263,7 +263,7 @@ union Gfx12SwWarDetection uint32_t : 1; -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t selectAllBlocksThatAreAffectedShaderSpsingleuseVdstFalsePositiveKillWhenVOPDInstructionIsPresentInTheSIMD_A_ : 1; #else uint32_t : 1; @@ -273,49 +273,49 @@ union Gfx12SwWarDetection uint32_t : 1; -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t shaderSpInlineConstantsDoNotWorkForPseudoScalarTransF16Opcodes_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t shaderSqSQSHGlobalLoadTransposeWritesToOutOfRangeVGPR_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t ppDbTSCEvictionTimeoutCanLeadToSCHangDueToHiZSCacheInflightCountCorruption_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t allSubsystems4xSBufferLoadU16WithStridedBuffersReturns0InsteadOfValue_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t allSubsystems4xSBufferLoadU16WithStridedBuffersReturns0InsteadOfValue_B_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t allSubsystems4xSBufferLoadU16WithStridedBuffersReturns0InsteadOfValue_C_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t ppDbDBStencilCorruptionDueToMSAA_ZFASTNOOP_StencilFASTSET_A_ : 1; #else uint32_t : 1; #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 uint32_t ppScIncorrectHiStencilUpdateEquationForSResultsOrCanLeadToImageCorruption__A_ : 1; #else uint32_t : 1; @@ -333,7 +333,7 @@ static_assert(sizeof(Gfx12InactiveMask) == sizeof(Gfx12SwWarDetection), namespace swd_internal { -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 // ===================================================================================================================== void DetectNavi48A1Workarounds( Gfx12SwWarDetection* pWorkarounds) @@ -413,217 +413,217 @@ std::string StringifyActiveGfx12Workarounds( { std::string output = "Workarounds enabled for Gfx12:\n"; -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.controlCp4xDDIDNotSupported_A_ != 0) { output += " - controlCp4xDDIDNotSupported_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.shaderSqShaderSqcShaderSqgSQ_SQCAndSQGLegacyPerfCounterUsageIsBrokenWithNewGRBMArch__A_ != 0) { output += " - shaderSqShaderSqcShaderSqgSQ_SQCAndSQGLegacyPerfCounterUsageIsBrokenWithNewGRBMArch__A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.sioSpiBci12_12412_125GLGWhenSpiGrpLaunchGuaranteeEnable_csGlgDisableIsSetAndGSTriggersGLG_UnexpectedSoftlockMaskIsSetOnHSShader_A_ != 0) { output += " - sioSpiBci12_12412_125GLGWhenSpiGrpLaunchGuaranteeEnable_csGlgDisableIsSetAndGSTriggersGLG_UnexpectedSoftlockMaskIsSetOnHSShader_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.ppScIssueWithWALKALIGN8PRIMFITSST_1And64KScreenSpace_A_ != 0) { output += " - ppScIssueWithWALKALIGN8PRIMFITSST_1And64KScreenSpace_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.ppScDBD16comp2ndDrawFailedWithFastSet_ZFrom0_50__A_ != 0) { output += " - ppScDBD16comp2ndDrawFailedWithFastSet_ZFrom0_50__A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.geoGeTessOnGESPIGsgrpMismatchDueToSEStateBeingOutOfSync_A_ != 0) { output += " - geoGeTessOnGESPIGsgrpMismatchDueToSEStateBeingOutOfSync_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.controlImuIMUBusyNotConsideringRsmuFifoTransaction_A_ != 0) { output += " - controlImuIMUBusyNotConsideringRsmuFifoTransaction_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.controlImuIMUBusyNotConsideringRsmuFifoTransaction_B_ != 0) { output += " - controlImuIMUBusyNotConsideringRsmuFifoTransaction_B_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.textureTaGFX12RTTACanIncorrectlyCullProceduralNodes_A_ != 0) { output += " - textureTaGFX12RTTACanIncorrectlyCullProceduralNodes_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.ppDbECRRTLFixForConservativeZPASSCounts_A_ != 0) { output += " - ppDbECRRTLFixForConservativeZPASSCounts_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.cmmGl2AtomicOpcodeCONDSUBNoRtnIsNotSupported_A_ != 0) { output += " - cmmGl2AtomicOpcodeCONDSUBNoRtnIsNotSupported_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.ppDbudbOreoScoreBoard_udbOsbData_udbOsbdMonitor_ostSampleMaskMismatchOREOScoreboardStoresInvalidEWaveIDAndIncorrectlySetsRespectiveValidBit_A_ != 0) { output += " - ppDbudbOreoScoreBoard_udbOsbData_udbOsbdMonitor_ostSampleMaskMismatchOREOScoreboardStoresInvalidEWaveIDAndIncorrectlySetsRespectiveValidBit_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.cmmGl2GL2CPERFSELSECTORSPerformanceCounterRTLBug_A_ != 0) { output += " - cmmGl2GL2CPERFSELSECTORSPerformanceCounterRTLBug_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.shaderSqShaderSqcsGetpcB64DoesntSignExtendTheResult_CausingSubsequentMemoryAccessToFail_A_ != 0) { output += " - shaderSqShaderSqcsGetpcB64DoesntSignExtendTheResult_CausingSubsequentMemoryAccessToFail_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.controlCpRS64GFX12CPGRTLBugInCpgParserRs64Block_A_ != 0) { output += " - controlCpRS64GFX12CPGRTLBugInCpgParserRs64Block_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.geoGeDRAWOPAQUERegUpdatesWithin5CyclesOnDifferentContextsCausesGEIssue_A_ != 0) { output += " - geoGeDRAWOPAQUERegUpdatesWithin5CyclesOnDifferentContextsCausesGEIssue_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.ppDbShaderSqSioSpiBciPixelWaitSyncPRECOLORModeLeadsToExportHang_A_ != 0) { output += " - ppDbShaderSqSioSpiBciPixelWaitSyncPRECOLORModeLeadsToExportHang_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.cmmGl2RequestsToSameAddressNotOrderedForIOSpace_A_ != 0) { output += " - cmmGl2RequestsToSameAddressNotOrderedForIOSpace_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.geoGeGeoPaUpdateToPHMQProgrammingGuideRelatedToTheProgrammingOfPHRingRegisters_A_ != 0) { output += " - geoGeGeoPaUpdateToPHMQProgrammingGuideRelatedToTheProgrammingOfPHRingRegisters_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.ppDbMEMDIFFTOOLZSurfaceMismatchWithXorSwizzleBits_A_ != 0) { output += " - ppDbMEMDIFFTOOLZSurfaceMismatchWithXorSwizzleBits_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.textureTcpGfx12MainTCPHangsWhenSClauseHasTooManyInstrWithNoValidThreads_A_ != 0) { output += " - textureTcpGfx12MainTCPHangsWhenSClauseHasTooManyInstrWithNoValidThreads_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.shaderSqGFX11GFX12TrapAfterInstructionIsSometimesNotReportedCorrectly_A_ != 0) { output += " - shaderSqGFX11GFX12TrapAfterInstructionIsSometimesNotReportedCorrectly_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.geoGeGeoPaPpScSioPcSioSpiBciSioSxBackPressureFromSCPC_SCSPICanCauseDeadlock_A_ != 0) { output += " - geoGeGeoPaPpScSioPcSioSpiBciSioSxBackPressureFromSCPC_SCSPICanCauseDeadlock_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.shaderSqSSLEEPVARAndSALLOCVGPRAliasWithCertainSQRegisterAddresses_A_ != 0) { output += " - shaderSqSSLEEPVARAndSALLOCVGPRAliasWithCertainSQRegisterAddresses_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.gcDvIBHangAtASetkillInstructionWhenTheWaveIsInTrapAfterInstModeAndTrapOnEndIsSet_A_ != 0) { output += " - gcDvIBHangAtASetkillInstructionWhenTheWaveIsInTrapAfterInstModeAndTrapOnEndIsSet_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.shaderSqVALUSGPRReadFifosGatherMaskDoesNotUpdateCorrectly_A_ != 0) { output += " - shaderSqVALUSGPRReadFifosGatherMaskDoesNotUpdateCorrectly_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.ppDbDataCorruptionDBFailedToMarkCacheValidForFastSetsTiles_A_ != 0) { output += " - ppDbDataCorruptionDBFailedToMarkCacheValidForFastSetsTiles_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.selectAllBlocksThatAreAffectedShaderSpsingleuseVdstFalsePositiveKillWhenVOPDInstructionIsPresentInTheSIMD_A_ != 0) { output += " - selectAllBlocksThatAreAffectedShaderSpsingleuseVdstFalsePositiveKillWhenVOPDInstructionIsPresentInTheSIMD_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.shaderSpInlineConstantsDoNotWorkForPseudoScalarTransF16Opcodes_A_ != 0) { output += " - shaderSpInlineConstantsDoNotWorkForPseudoScalarTransF16Opcodes_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.shaderSqSQSHGlobalLoadTransposeWritesToOutOfRangeVGPR_A_ != 0) { output += " - shaderSqSQSHGlobalLoadTransposeWritesToOutOfRangeVGPR_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.ppDbTSCEvictionTimeoutCanLeadToSCHangDueToHiZSCacheInflightCountCorruption_A_ != 0) { output += " - ppDbTSCEvictionTimeoutCanLeadToSCHangDueToHiZSCacheInflightCountCorruption_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.allSubsystems4xSBufferLoadU16WithStridedBuffersReturns0InsteadOfValue_A_ != 0) { output += " - allSubsystems4xSBufferLoadU16WithStridedBuffersReturns0InsteadOfValue_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.allSubsystems4xSBufferLoadU16WithStridedBuffersReturns0InsteadOfValue_B_ != 0) { output += " - allSubsystems4xSBufferLoadU16WithStridedBuffersReturns0InsteadOfValue_B_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.allSubsystems4xSBufferLoadU16WithStridedBuffersReturns0InsteadOfValue_C_ != 0) { output += " - allSubsystems4xSBufferLoadU16WithStridedBuffersReturns0InsteadOfValue_C_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.ppDbDBStencilCorruptionDueToMSAA_ZFASTNOOP_StencilFASTSET_A_ != 0) { output += " - ppDbDBStencilCorruptionDueToMSAA_ZFASTNOOP_StencilFASTSET_A_\n"; } #endif -#if SWD_BUILD_NAVI48 +#if SWD_BUILD_NAVI48 || SWD_BUILD_NAVI44 if (workarounds.ppScIncorrectHiStencilUpdateEquationForSResultsOrCanLeadToImageCorruption__A_ != 0) { output += " - ppScIncorrectHiStencilUpdateEquationForSResultsOrCanLeadToImageCorruption__A_\n"; @@ -670,6 +670,15 @@ bool DetermineGfx12Target( (*pStepping) = 1; successful = true; } +#endif +#if SWD_BUILD_NAVI44 + else if ((0x01 <= eRevId) && (eRevId < 0x50)) + { + (*pMajor) = 12; + (*pMinor) = 0; + (*pStepping) = 0; + successful = true; + } #endif } #endif @@ -699,9 +708,16 @@ bool DetectGfx12SoftwareWorkaroundsByChip( { swd_internal::DetectNavi48A1Workarounds(pWorkarounds); successful = true; +#endif +#if SWD_BUILD_NAVI44 } + else if ((0x01 <= eRevId) && (eRevId < 0x50)) + { + swd_internal::DetectNavi48A1Workarounds(pWorkarounds); + successful = true; #endif } +} #endif if (successful) @@ -731,6 +747,14 @@ bool DetectGfx12SoftwareWorkaroundsByGfxIp( successful = true; } #endif +#if SWD_BUILD_NAVI44 + else if ((major == 12) && (minor == 0) && (stepping == 0)) + { + swd_internal::DetectNavi48A1Workarounds(pWorkarounds); + successful = true; + } +#endif + if (successful) { swd_internal::Gfx12OverrideDefaults(pWorkarounds); diff --git a/src/core/libInit.cpp b/src/core/libInit.cpp index 096b27c53..152b942e3 100644 --- a/src/core/libInit.cpp +++ b/src/core/libInit.cpp @@ -108,6 +108,9 @@ constexpr GpuInfo GpuInfoLookupTable[] = #if PAL_BUILD_NAVI48 { AsicRevision::Navi48, NullGpuId::Navi48, GfxIpLevel::GfxIp12, FAMILY_NV4, NAVI48_P, PRID_NV_NAVI48_00, GfxEngineGfx9, DEVICE_ID_NAVI48_94, "NAVI48:gfx1201" }, #endif +#if PAL_BUILD_NAVI44 + { AsicRevision::Navi44, NullGpuId::Navi44, GfxIpLevel::GfxIp12, FAMILY_NV4, NAVI44_P, PRID_NV_NAVI44_00, GfxEngineGfx9, DEVICE_ID_NAVI44_7590, "NAVI44:gfx1200" }, +#endif }; // =====================================================================================================================