Skip to content

Commit

Permalink
5.4.1 update
Browse files Browse the repository at this point in the history
  • Loading branch information
gareththomasamd committed May 20, 2020
1 parent 0fe6f7b commit 14dfd55
Show file tree
Hide file tree
Showing 68 changed files with 153 additions and 2,378 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In addition to the library itself, the AGS SDK includes several samples to demon
</div>

### What's new in AGS 5.4.1
Version 5.4.1 is a minor update to include x86 libs and Visual Studio 2019 support. There is also support for base vertex and base instance intrinsics.
Version 5.4.1 includes x86 libs and Visual Studio 2019 support. There is also support for base vertex and base instance intrinsics as well as GetWaveSize intrinsics. The samples have been ported from premake to cmake.

### What's new in AGS 5.4
Version 5.4 adds a better description of the GPU architecture for those wishing to fine tune their games for specific code paths. In addition, there are now shader intrinsics for getting the draw index for execute indirect calls as well as support for atomic U64 ops.
Expand Down
11 changes: 0 additions & 11 deletions ags_lib/README.md

This file was deleted.

Binary file modified ags_lib/doc/amd_ags.chm
Binary file not shown.
21 changes: 20 additions & 1 deletion ags_lib/hlsl/ags_shader_intrinsics_dx12.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ RWByteAddressBuffer AmdExtD3DShaderIntrinsicsUAV : register(u0, AmdExtD3DShaderI
#define AmdExtD3DShaderIntrinsicsOpcode_WaveReduce 0x12
#define AmdExtD3DShaderIntrinsicsOpcode_WaveScan 0x13
#define AmdExtD3DShaderIntrinsicsOpcode_LoadDwAtAddr 0x14

#define AmdExtD3DShaderIntrinsicsOpcode_DrawIndex 0x17
#define AmdExtD3DShaderIntrinsicsOpcode_AtomicU64 0x18
#define AmdExtD3DShaderIntrinsicsOpcode_GetWaveSize 0x19
#define AmdExtD3DShaderIntrinsicsOpcode_BaseInstance 0x1a
#define AmdExtD3DShaderIntrinsicsOpcode_BaseVertex 0x1b

Expand Down Expand Up @@ -368,6 +368,25 @@ uint AmdExtD3DShaderIntrinsics_LaneId()
return retVal;
}

/**
***********************************************************************************************************************
* AmdExtD3DShaderIntrinsics_GetWaveSize
*
* Returns the wave size for the current shader, including active, inactive and helper lanes.
*
* Available if CheckSupport(AmdExtD3DShaderIntrinsicsSupport_GetWaveSize) returned S_OK.
*
***********************************************************************************************************************
*/
uint AmdExtD3DShaderIntrinsics_GetWaveSize()
{
uint instruction = MakeAmdShaderIntrinsicsInstruction(AmdExtD3DShaderIntrinsicsOpcode_GetWaveSize, 0, 0);

uint retVal;
AmdExtD3DShaderIntrinsicsUAV.InterlockedCompareExchange(instruction, 0, 0, retVal);
return retVal;
}

/**
***********************************************************************************************************************
* AmdExtD3DShaderIntrinsics_Swizzle
Expand Down
7 changes: 4 additions & 3 deletions ags_lib/inc/amd_ags.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
/// * AsicFamily_Count to help with code maintenance.
/// * Visual Studio 2019 support.
/// * x86 support
/// * BaseInstance and BaseVertex intrinsics along with corresponding DX11 and DX12 caps bits.
/// * GetWaveSize intrinsic along with corresponding DX11 caps bits.
/// * BaseInstance and BaseVertex intrinsics along with corresponding caps bits.
/// * GetWaveSize intrinsic along with corresponding caps bits.
///
/// ---------------------------------------
/// What's new in AGS 5.4 since version 5.3
Expand Down Expand Up @@ -197,7 +197,8 @@ enum AGSDriverExtensionDX12
AGS_DX12_EXTENSION_INTRINSIC_DRAW_INDEX = 1 << 13, ///< Supported in Radeon Software Version 19.12.2 onwards.
AGS_DX12_EXTENSION_INTRINSIC_ATOMIC_U64 = 1 << 14, ///< Supported in Radeon Software Version 19.12.2 onwards.
AGS_DX12_EXTENSION_INTRINSIC_BASE_VERTEX = 1 << 15, ///< Supported in Radeon Software Version 20.2.1 onwards.
AGS_DX12_EXTENSION_INTRINSIC_BASE_INSTANCE = 1 << 16 ///< Supported in Radeon Software Version 20.2.1 onwards.
AGS_DX12_EXTENSION_INTRINSIC_BASE_INSTANCE = 1 << 16, ///< Supported in Radeon Software Version 20.2.1 onwards.
AGS_DX12_EXTENSION_INTRINSIC_GET_WAVE_SIZE = 1 << 17 ///< Supported in Radeon Software Version 20.5.1 onwards.
};

/// The space id for DirectX12 intrinsic support
Expand Down
Binary file modified ags_lib/lib/amd_ags_x64.dll
Binary file not shown.
Binary file modified ags_lib/lib/amd_ags_x64.lib
Binary file not shown.
Binary file modified ags_lib/lib/amd_ags_x64_2015_MD.lib
Binary file not shown.
Binary file modified ags_lib/lib/amd_ags_x64_2015_MDd.lib
Binary file not shown.
Binary file modified ags_lib/lib/amd_ags_x64_2015_MT.lib
Binary file not shown.
Binary file modified ags_lib/lib/amd_ags_x64_2015_MTd.lib
Binary file not shown.
Binary file modified ags_lib/lib/amd_ags_x64_2017_MD.lib
Binary file not shown.
Binary file modified ags_lib/lib/amd_ags_x64_2017_MDd.lib
Binary file not shown.
Binary file modified ags_lib/lib/amd_ags_x64_2017_MT.lib
Binary file not shown.
Binary file modified ags_lib/lib/amd_ags_x64_2017_MTd.lib
Binary file not shown.
40 changes: 40 additions & 0 deletions ags_sample/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
cmake_minimum_required(VERSION 3.15)
set(CMAKE_GENERATOR_PLATFORM x64)
set(CMAKE_CONFIGURATION_TYPES Debug Release)

if(AGS_INTERNAL_DEBUG)
project(ags_sample_internal VERSION 5.4.1)
else()
project(ags_sample VERSION 5.4.1)
endif()

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../ags_lib/inc)

set(AGS_SOURCES src/AGSSample.cpp)
set(AGS_PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/../ags_lib/inc/amd_ags.h)

if(AGS_INTERNAL_DEBUG)
add_subdirectory(../ags_lib ags_internal)
add_executable(${PROJECT_NAME} ${AGS_SOURCES} ${AGS_PUBLIC_HEADER})
target_link_libraries(${PROJECT_NAME} LINK_PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ags_lib/lib/amd_ags_x64_2019_MDd.lib)

else()
add_library(amd_ags SHARED IMPORTED GLOBAL)
set_property(TARGET amd_ags PROPERTY IMPORTED_IMPLIB ${CMAKE_CURRENT_SOURCE_DIR}/../ags_lib/lib/amd_ags_x64.lib)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../ags_lib/lib/amd_ags_x64.dll DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})

add_executable(${PROJECT_NAME} ${AGS_SOURCES} ${AGS_PUBLIC_HEADER})
target_link_libraries(${PROJECT_NAME} LINK_PUBLIC amd_ags)
endif()



set_target_properties(${PROJECT_NAME} PROPERTIES DEBUG_POSTFIX d)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME})

source_group("Source" FILES ${AGS_SOURCES})
source_group("Inc" FILES ${AGS_PUBLIC_HEADER})
20 changes: 0 additions & 20 deletions ags_sample/build/AGSSample_2015.sln

This file was deleted.

122 changes: 0 additions & 122 deletions ags_sample/build/AGSSample_2015.vcxproj

This file was deleted.

27 changes: 0 additions & 27 deletions ags_sample/build/AGSSample_2015.vcxproj.filters

This file was deleted.

20 changes: 0 additions & 20 deletions ags_sample/build/AGSSample_2017.sln

This file was deleted.

Loading

0 comments on commit 14dfd55

Please sign in to comment.