Skip to content

Commit 9ea3960

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 43c567b + 9da0bc2 commit 9ea3960

File tree

787 files changed

+77564
-61048
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

787 files changed

+77564
-61048
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.exr filter=lfs diff=lfs merge=lfs -text
2+
runtime/images/*.exr filter=lfs diff=lfs merge=lfs -text
3+
applications/_plugins/c3dmodel_viewers/gltf_dx12_ex/media/envmap/*.dds filter=lfs diff=lfs merge=lfs -text
4+
external/brotlig/lib/*.lib filter=lfs diff=lfs merge=lfs -text
5+
internal/tests/input/** filter=lfs diff=lfs merge=lfs -text
6+
cmp_unittests/test_data/* filter=lfs diff=lfs merge=lfs -text

.github/workflows/cmake.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -64,67 +64,67 @@ jobs:
6464
uses: microsoft/[email protected]
6565

6666
- name: Build Framework Release Win32
67-
run: 'msbuild -target:build -property:Configuration=Release -property:Platform=Win32 -m VS2019\cmp_framework.sln'
67+
run: 'msbuild -target:build -property:Configuration=Release -property:Platform=Win32 -m build_sdk\cmp_framework.sln'
6868

6969
- name: Build Framework Debug Win32
70-
run: 'msbuild -target:build -property:Configuration=Debug -property:Platform=Win32 -m VS2019\cmp_framework.sln'
70+
run: 'msbuild -target:build -property:Configuration=Debug -property:Platform=Win32 -m build_sdk\cmp_framework.sln'
7171

7272
- name: Build Framework Release x64
73-
run: 'msbuild -target:build -property:Configuration=Release -property:Platform=x64 -m VS2019\cmp_framework.sln'
73+
run: 'msbuild -target:build -property:Configuration=Release -property:Platform=x64 -m build_sdk\cmp_framework.sln'
7474

7575
- name: Build Framework Debug x64
76-
run: 'msbuild -target:build -property:Configuration=Debug -property:Platform=x64 -m VS2019\cmp_framework.sln'
76+
run: 'msbuild -target:build -property:Configuration=Debug -property:Platform=x64 -m build_sdk\cmp_framework.sln'
7777

7878
- name: Build Framework Release_MD Win32
79-
run: 'msbuild -target:build -property:Configuration=Release_MD -property:Platform=Win32 -m VS2019\cmp_framework.sln'
79+
run: 'msbuild -target:build -property:Configuration=Release_MD -property:Platform=Win32 -m build_sdk\cmp_framework.sln'
8080

8181
- name: Build Framework Debug_MD Win32
82-
run: 'msbuild -target:build -property:Configuration=Debug_MD -property:Platform=Win32 -m VS2019\cmp_framework.sln'
82+
run: 'msbuild -target:build -property:Configuration=Debug_MD -property:Platform=Win32 -m build_sdk\cmp_framework.sln'
8383

8484
- name: Build Framework Release_MD x64
85-
run: 'msbuild -target:build -property:Configuration=Release_MD -property:Platform=x64 -m VS2019\cmp_framework.sln'
85+
run: 'msbuild -target:build -property:Configuration=Release_MD -property:Platform=x64 -m build_sdk\cmp_framework.sln'
8686

8787
- name: Build Framework Debug_MD x64
88-
run: 'msbuild -target:build -property:Configuration=Debug_MD -property:Platform=x64 -m VS2019\cmp_framework.sln'
88+
run: 'msbuild -target:build -property:Configuration=Debug_MD -property:Platform=x64 -m build_sdk\cmp_framework.sln'
8989

9090
- name: Build Framework Release_DLL Win32
91-
run: 'msbuild -target:build -property:Configuration=Release_DLL -property:Platform=Win32 -m VS2019\cmp_framework.sln'
91+
run: 'msbuild -target:build -property:Configuration=Release_DLL -property:Platform=Win32 -m build_sdk\cmp_framework.sln'
9292

9393
- name: Build Framework Debug_DLL Win32
94-
run: 'msbuild -target:build -property:Configuration=Debug_DLL -property:Platform=Win32 -m VS2019\cmp_framework.sln'
94+
run: 'msbuild -target:build -property:Configuration=Debug_DLL -property:Platform=Win32 -m build_sdk\cmp_framework.sln'
9595

9696
- name: Build Framework Release_DLL x64
97-
run: 'msbuild -target:build -property:Configuration=Release_DLL -property:Platform=x64 -m VS2019\cmp_framework.sln'
97+
run: 'msbuild -target:build -property:Configuration=Release_DLL -property:Platform=x64 -m build_sdk\cmp_framework.sln'
9898

9999
- name: Build Framework Debug_DLL x64
100-
run: 'msbuild -target:build -property:Configuration=Debug_DLL -property:Platform=x64 -m VS2019\cmp_framework.sln'
100+
run: 'msbuild -target:build -property:Configuration=Debug_DLL -property:Platform=x64 -m build_sdk\cmp_framework.sln'
101101

102102
- name: Build Framework Release_MD_DLL Win32
103-
run: 'msbuild -target:build -property:Configuration=Release_MD_DLL -property:Platform=Win32 -m VS2019\cmp_framework.sln'
103+
run: 'msbuild -target:build -property:Configuration=Release_MD_DLL -property:Platform=Win32 -m build_sdk\cmp_framework.sln'
104104

105105
- name: Build Framework Debug_MD_DLL Win32
106-
run: 'msbuild -target:build -property:Configuration=Debug_MD_DLL -property:Platform=Win32 -m VS2019\cmp_framework.sln'
106+
run: 'msbuild -target:build -property:Configuration=Debug_MD_DLL -property:Platform=Win32 -m build_sdk\cmp_framework.sln'
107107

108108
- name: Build Framework Release_MD_DLL x64
109-
run: 'msbuild -target:build -property:Configuration=Release_MD_DLL -property:Platform=x64 -m VS2019\cmp_framework.sln'
109+
run: 'msbuild -target:build -property:Configuration=Release_MD_DLL -property:Platform=x64 -m build_sdk\cmp_framework.sln'
110110

111111
- name: Build Framework Debug_MD_DLL x64
112-
run: 'msbuild -target:build -property:Configuration=Debug_MD_DLL -property:Platform=x64 -m VS2019\cmp_framework.sln'
112+
run: 'msbuild -target:build -property:Configuration=Debug_MD_DLL -property:Platform=x64 -m build_sdk\cmp_framework.sln'
113113

114114
- name: Create folder structure for build results
115115
run: |
116116
mkdir CompressonatorFramework_result\lib\encoders
117117
mkdir CompressonatorFramework_result\include
118-
mkdir CompressonatorFramework_result\lib\VS2019\x64
119-
mkdir CompressonatorFramework_result\lib\VS2019\x86
118+
mkdir CompressonatorFramework_result\lib\build_sdk\x64
119+
mkdir CompressonatorFramework_result\lib\build_sdk\x86
120120
121121
- name: Copy files into build results directory
122122
shell: bash
123123
run: |
124-
cp build/Release*/x64/{*.lib,*.dll} CompressonatorFramework_result/lib/VS2019/x64/
125-
cp build/Release*/Win32/{*.lib,*.dll} CompressonatorFramework_result/lib/VS2019/x86/
126-
cp build/Debug*/x64/{*.lib,*.dll} CompressonatorFramework_result/lib/VS2019/x64/
127-
cp build/Debug*/Win32/{*.lib,*.dll} CompressonatorFramework_result/lib/VS2019/x86/
124+
cp build/Release*/x64/{*.lib,*.dll} CompressonatorFramework_result/lib/build_sdk/x64/
125+
cp build/Release*/Win32/{*.lib,*.dll} CompressonatorFramework_result/lib/build_sdk/x86/
126+
cp build/Debug*/x64/{*.lib,*.dll} CompressonatorFramework_result/lib/build_sdk/x64/
127+
cp build/Debug*/Win32/{*.lib,*.dll} CompressonatorFramework_result/lib/build_sdk/x86/
128128
cp build/Release/x64/Plugins/Compute/{*.h,*.hlsl,*.cpp} CompressonatorFramework_result/lib/encoders/
129129
cp cmp_compressonatorlib/compressonator.h CompressonatorFramework_result/include/
130130

CMakeLists.txt

Lines changed: 77 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if (NOT CMP_VERSION_MAJOR)
2525
endif()
2626

2727
if (NOT CMP_VERSION_MINOR)
28-
set(CMP_VERSION_MINOR 4)
28+
set(CMP_VERSION_MINOR 5)
2929
endif()
3030

3131
if (NOT CMP_VERSION_BUILD_NUMBER)
@@ -41,6 +41,35 @@ message("Building Compressonator version ${PROJECT_VERSION_MAJOR}.${PROJECT_VERS
4141
include(cmake/helperfunctions.cmake)
4242

4343

44+
# ------------------------------
45+
# Common compiler options
46+
# ------------------------------
47+
48+
if (CMP_HOST_WINDOWS)
49+
add_compile_options(/W4 /wd4201)
50+
# add_compile_options(/W4 /WX /wd4201)
51+
elseif(CMP_HOST_LINUX)
52+
add_compile_options(-Wall)
53+
# add_compile_options(-Wall -Werror)
54+
endif()
55+
56+
# ------------------------------------
57+
# Visual Studio project folder names
58+
# ------------------------------------
59+
60+
set(PROJECT_FOLDER_SDK "SDK")
61+
set(PROJECT_FOLDER_SDK_LIBS "${PROJECT_FOLDER_SDK}/Libraries")
62+
set(PROJECT_FOLDER_SDK_EXTERNAL "${PROJECT_FOLDER_SDK}/External Libraries")
63+
set(PROJECT_FOLDER_SDK_PLUGIN_DYNAMIC "${PROJECT_FOLDER_SDK}/Plugins/Dynamic")
64+
set(PROJECT_FOLDER_SDK_PLUGIN_STATIC "${PROJECT_FOLDER_SDK}/Plugins/Static")
65+
set(PROJECT_FOLDER_SDK_EXAMPLES "${PROJECT_FOLDER_SDK}/Examples")
66+
67+
set(PROJECT_FOLDER_APPS "Applications")
68+
set(PROJECT_FOLDER_APPS_LIBS "${PROJECT_FOLDER_APPS}/Libraries")
69+
set(PROJECT_FOLDER_APPS_EXTERNAL "${PROJECT_FOLDER_APPS}/External Libraries")
70+
set(PROJECT_FOLDER_APPS_PLUGIN_DYNAMIC "${PROJECT_FOLDER_APPS}/Plugins/Dynamic")
71+
set(PROJECT_FOLDER_APPS_PLUGIN_STATIC "${PROJECT_FOLDER_APPS}/Plugins/Static")
72+
4473
#----------------------------------------
4574
# Check compiler feature support levels
4675
# For Apple (Mac) default to C++11
@@ -63,7 +92,6 @@ else()
6392
set(COMPILER_SUPPORTS_CXX11 ON)
6493
endif()
6594

66-
6795
#---------------------------------------------------------------------------------
6896
# Provide default values for each build option
6997
#
@@ -76,10 +104,10 @@ endif()
76104
#---------------------------------------------------------------------------------
77105
option(OPTION_ENABLE_ALL_APPS "Enable all apps" ON) # TODO rename to OPTION_BUILD_ALL
78106
option(OPTION_BUILD_CMP_SDK "Build Compressonator SDK" OFF)
79-
option(OPTION_BUILD_APPS_CMP_CLI "Build Application: CLI" OFF)
80-
option(OPTION_BUILD_APPS_CMP_GUI "Build Application: GUI" OFF)
81-
option(OPTION_BUILD_APPS_CMP_UNITTESTS "Build Application: UnitTests" OFF)
82-
option(OPTION_BUILD_APPS_CMP_EXAMPLES "Build Application: Examples" OFF)
107+
option(OPTION_BUILD_APPS_CMP_CLI "Build Compressonator CLI" OFF)
108+
option(OPTION_BUILD_APPS_CMP_GUI "Build Compressonator GUI" OFF)
109+
option(OPTION_BUILD_APPS_CMP_UNITTESTS "Build Compressontor UnitTests" OFF)
110+
option(OPTION_BUILD_APPS_CMP_EXAMPLES "Build Compressontor Examples" OFF)
83111

84112
#--------------------------------------------------------------------------
85113
# Enable or Disable Specific Build Apps
@@ -90,9 +118,14 @@ if (OPTION_ENABLE_ALL_APPS)
90118
set(OPTION_BUILD_APPS_CMP_GUI ON)
91119
set(OPTION_BUILD_APPS_CMP_UNITTESTS ON)
92120
set(OPTION_BUILD_APPS_CMP_EXAMPLES ON)
121+
else()
122+
option(OPTION_BUILD_APPS_CMP_CLI OFF)
123+
option(OPTION_BUILD_APPS_CMP_GUI OFF)
124+
option(OPTION_BUILD_CMP_SDK OFF)
125+
option(OPTION_BUILD_APPS_CMP_UNITTESTS OFF)
126+
option(OPTION_BUILD_APPS_CMP_EXAMPLES OFF)
93127
endif()
94128

95-
96129
# Minimum Lib Dependencies for CLI, GUI, and SDK (GUI has additional lib requirements added later in this cmake)
97130
if (OPTION_BUILD_APPS_CMP_CLI OR OPTION_BUILD_APPS_CMP_GUI)
98131
set(LIB_BUILD_COMPRESSONATOR_SDK ON)
@@ -112,16 +145,20 @@ elseif (OPTION_BUILD_CMP_SDK)
112145
set(LIB_BUILD_GPUDECODE ON)
113146
endif()
114147

148+
if (OPTION_BUILD_APPS_CMP_VISION)
149+
set(LIB_BUILD_COMPRESSONATOR_SDK ON)
150+
set(LIB_BUILD_FRAMEWORK_SDK ON)
151+
endif()
152+
115153
# The following options that have been removed
116154
set(LIB_BUILD_MESHCOMPRESSOR OFF)
117155

118156
set(PROJECT_EXTERNAL_LIBDIR ${PROJECT_SOURCE_DIR}/../common/lib/ext)
119157

120-
121158
# ----------------------------------------------------------------------------
122159
# GPUOpen Source Code build options : These options are been revised for v4.2
123160
# ----------------------------------------------------------------------------
124-
# OPTION DESCRIPTION DEFAULT REQUIREMENT
161+
# OPTION DESCRIPTION REQUESTED VALUE REQUIREMENT
125162
cmp_option(OPTION_BUILD_KTX2 "Build CLI KTX2 Support" ON CMAKE_VERSION VERSION_GREATER "3.14.0")
126163
cmp_option(OPTION_BUILD_EXR "Build CLI EXR Support" ON CMP_HOST_WINDOWS OR CMP_HOST_LINUX)
127164
cmp_option(OPTION_BUILD_GUI "Build the GUI Application" ON CMP_HOST_WINDOWS OR OPTION_BUILD_APPS_CMP_GUI)
@@ -134,14 +171,13 @@ cmp_option(OPTION_CMP_GTC "Use GTC Codec" OFF TRUE
134171
cmp_option(OPTION_BUILD_BROTLIG "Use Brotli-G Codec for CLI" ON CMP_HOST_WINDOWS)
135172
cmp_option(OPTION_BUILD_BROTLIG_GUI "Use Brotli-G Codec for GUI" OFF TRUE) # In development for v4.4
136173
# Internal testing application
137-
option(OPTION_BUILD_INTERNAL_CMP_TEST "Build Internal Application: cmp_test" OFF)
174+
option(OPTION_BUILD_INTERNAL_CMP_TEST "Build Internal Application: cmp_test" ON)
138175
# No longer supported
139176
cmp_option(OPTION_BUILD_ASTC "Build ASTC Support" OFF FALSE)
140177
cmp_option(OPTION_BUILD_DRACO "Build CLI Draco Support" OFF FALSE)
141178
# this needs to be removed
142179
cmp_option(NO_LEGACY_BEHAVIOR "Disables any legacy behavior (before CMake migration)" ON TRUE)
143180

144-
145181
# -----------------------------------------------------------------------------------
146182
# Code build definitions and features: These options are been revised for v4.2
147183
# -----------------------------------------------------------------------------------
@@ -175,7 +211,6 @@ add_compile_definitions(
175211
#USE_CMP_TRANSCODE # Future release:: Transcode BASIS/GTC to other compressed formats
176212

177213
# Possible future releases features
178-
#ARGB_32_SUPPORT # Enables 32bit Float channel formats
179214
#SUPPORT_ETC_ALPHA # for ATC_RGB output enable A
180215
#SHOW_PROCESS_MEMORY # display available CPU process memory
181216
#USE_BCN_IMAGE_DEBUG # Enables Combobox in Image View for low level BCn based block compression in debug mode
@@ -432,14 +467,18 @@ if (CMP_HOST_WINDOWS)
432467

433468
# Unit tests
434469
if (OPTION_BUILD_APPS_CMP_UNITTESTS)
435-
message("Build cmp unittests setup")
436-
add_subdirectory(cmp_unittests)
470+
message("Build cmp unittests setup")
471+
add_subdirectory(cmp_unittests)
437472
endif()
438473

439474
# CLI + GUI Automation testing
440475
if (OPTION_BUILD_INTERNAL_CMP_TEST)
441-
message("Build cmp test setup")
442-
add_subdirectory(compressonator_internal/applications/cmp_test)
476+
if (EXISTS ${PROJECT_SOURCE_DIR}/compressonator_internal/applications/cmp_test)
477+
message("Building CMP Test")
478+
add_subdirectory(compressonator_internal/applications/cmp_test)
479+
else()
480+
message("Skipping CMP Test build because the directory could not be found")
481+
endif()
443482
endif()
444483

445484
endif()
@@ -468,13 +507,15 @@ if (CMP_HOST_WINDOWS)
468507
PATTERN "media" EXCLUDE
469508
)
470509

471-
install(
472-
DIRECTORY ${QT_LIB_DIR}/plugins/imageformats DESTINATION plugins
473-
FILES_MATCHING
474-
PATTERN "qjpeg.dll"
475-
PATTERN "qtga.dll"
476-
PATTERN "qtiff.dll"
477-
)
510+
if (OPTION_CMP_QT)
511+
install(
512+
DIRECTORY ${QT_LIB_DIR}/plugins/imageformats DESTINATION plugins
513+
FILES_MATCHING
514+
PATTERN "qjpeg.dll"
515+
PATTERN "qtga.dll"
516+
PATTERN "qtiff.dll"
517+
)
518+
endif()
478519

479520
install(
480521
DIRECTORY ${WINDOWS_BIN_PREFIX}/plugins/compute DESTINATION "plugins/"
@@ -489,20 +530,25 @@ if (CMP_HOST_WINDOWS)
489530
install(FILES ${WINDOWS_BIN_PREFIX}/texture.frag.spv ${WINDOWS_BIN_PREFIX}/texture.vert.spv DESTINATION ".")
490531

491532
elseif (CMP_HOST_LINUX)
492-
install(DIRECTORY ${QT_LIB_DIR}/plugins/imageformats DESTINATION plugins)
533+
if (OPTION_CMP_QT)
534+
install(DIRECTORY ${QT_LIB_DIR}/plugins/imageformats DESTINATION plugins)
535+
endif()
536+
493537
install(PROGRAMS scripts/compressonatorcli DESTINATION ".")
494538

495539
# Qt
496540

497-
set(QT_INSTALL_LIBS libQt5Core libQt5Gui libicui18n libicuuc libicudata)
541+
if (OPTION_CMP_QT)
542+
set(QT_INSTALL_LIBS libQt5Core)
498543

499-
foreach(QT_INSTALL_LIB ${QT_INSTALL_LIBS})
500-
file(GLOB QT_LIB_VARIATIONS ${QT_LIB_DIR}/lib/${QT_INSTALL_LIB}.so*)
544+
foreach(QT_INSTALL_LIB ${QT_INSTALL_LIBS})
545+
file(GLOB QT_LIB_VARIATIONS ${QT_LIB_DIR}/lib/${QT_INSTALL_LIB}.so*)
501546

502-
foreach(QT_LIB_VARIATION ${QT_LIB_VARIATIONS})
503-
install(FILES ${QT_LIB_VARIATION} DESTINATION qt)
547+
foreach(QT_LIB_VARIATION ${QT_LIB_VARIATIONS})
548+
install(FILES ${QT_LIB_VARIATION} DESTINATION qt)
549+
endforeach()
504550
endforeach()
505-
endforeach()
551+
endif()
506552

507553
# OpenCV, TBB, and extra
508554

@@ -552,4 +598,4 @@ set(CPACK_DEBIAN_PACKAGE_MAINTAINER "AMD")
552598
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://gpuopen.com/compressonator/")
553599
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
554600

555-
include(CPack)
601+
include(CPack)

applications/_libs/cmp_math/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ target_link_libraries(CMP_Math PRIVATE
3737
)
3838

3939
set_target_properties(CMP_Math PROPERTIES
40-
FOLDER "Libs"
41-
)
40+
FOLDER ${PROJECT_FOLDER_SDK_LIBS}
41+
)

0 commit comments

Comments
 (0)