Skip to content

Commit 25007c5

Browse files
committed
Initial commit
1 parent 166ebbc commit 25007c5

File tree

152 files changed

+81177
-2
lines changed

Some content is hidden

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

152 files changed

+81177
-2
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.dll filter=lfs diff=lfs merge=lfs -text
2+
*.lib filter=lfs diff=lfs merge=lfs -text
3+
*.tex_bin filter=lfs diff=lfs merge=lfs -text
4+
*.bc6 filter=lfs diff=lfs merge=lfs -text
5+
*.bc1 filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build/
2+
output/
3+
.vs/
4+
nuget_packages/

CMakeLists.txt

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#
2+
# Copyright(c) 2025 Intel Corporation
3+
#
4+
# Permission is hereby granted, free of charge, to any person obtaining a copy
5+
# of this software and associated documentation files (the "Software"), to deal
6+
# in the Software without restriction, including without limitation the rights
7+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
# copies of the Software, and to permit persons to whom the Software is
9+
# furnished to do so, subject to the following conditions:
10+
#
11+
# The above copyright notice and this permission notice shall be included in
12+
# all copies or substantial portions of the Software.
13+
#
14+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
# SOFTWARE.
21+
#
22+
23+
# Minimal cmake version
24+
cmake_minimum_required(VERSION 3.5)
25+
26+
# Project name
27+
project(tsnc_coop)
28+
29+
# 3rd dependencies
30+
set(PROJECT_3RD_INCLUDES ${PROJECT_SOURCE_DIR}/3rd/include)
31+
set(PROJECT_3RD_LIBRARY ${PROJECT_SOURCE_DIR}/3rd/lib)
32+
set(PROJECT_3RD_BINARY ${PROJECT_SOURCE_DIR}/3rd/bin)
33+
34+
# Declare the global variables for the cmake project
35+
set(SDK_ROOT ${PROJECT_SOURCE_DIR}/sdk)
36+
set(SDK_INCLUDE ${SDK_ROOT}/include)
37+
38+
# Set the cmake path variable
39+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
40+
41+
# This flag must be activated in order to handle properly folder flags
42+
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
43+
44+
# Define the cmake macros
45+
include(CMakePlatforms)
46+
include(CMakeMacros)
47+
include(CMakeBuildSettings)
48+
49+
# Define the build options
50+
define_plaform_settings()
51+
52+
# Print the platform's name
53+
message(STATUS "The build identifier is: ${BACASABLE_PLATFORM_NAME}")
54+
55+
# Create the list of allowed files to be included
56+
set(bacasable_source_extensions)
57+
list(APPEND bacasable_source_extensions ".h" ".cpp" ".inl" ".txt")
58+
59+
# Generate the gpu_mesh SDK
60+
add_subdirectory(${SDK_ROOT}/src)
61+
add_subdirectory(${PROJECT_SOURCE_DIR}/project)

LICENSE

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
MIT License
1+
The source code is under the MIT License
22

3-
Copyright (c) 2025 GameTechDev
3+
Copyright (c) 2017-2019 Intel Corporation
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +19,6 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22+
23+
The assets are under their own license, check the corresponding folders.
24+

README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Intel® Texture Set Neural Compression
2+
3+
## Sample Overview
4+
This repository contains the source code for a sample application that demonstrates the use of [Cooperative Vectors](https://devblogs.microsoft.com/directx/enabling-neural-rendering-in-directx-cooperative-vector-support-coming-soon/), a new feature introduced in DirectX 12. This feature enables standardized, cross-vendor access to hardware-accelerated matrix multiplication units.
5+
6+
The demo was presented at the Game Developers Conference (GDC) 2025, as part of the [Advanced Graphics Summit sessions](https://schedule.gdconf.com/session/advanced-graphics-summit-cooperative-vectors-and-neural-rendering/911753).
7+
8+
You can find some additional informations [here](https://community.intel.com/t5/Blogs/Tech-Innovation/Artificial-Intelligence-AI/Intel-Co-Presents-Cooperative-Vectors-with-Microsoft-at-Game/post/1674845).
9+
10+
## Getting Started
11+
12+
### Prerequisites
13+
* A GPU that supports DirectX 12 Cooperative Vectors, such as:
14+
* Intel® Graphics LunarLake (or newer)
15+
* Intel® Arc B-Series Graphics Cards (or newer)
16+
* A [driver](https://www.intel.com/content/www/us/en/download/737144/855958/) that supports DirectX 12 Cooperative Vectors (or newer)
17+
* Compiler with C++20 support
18+
* [Microsoft Visual Studio 2022](https://www.visualstudio.com/) or newer
19+
* [CMake 3.8](https://cmake.org/) or newer
20+
21+
### Clone repository
22+
23+
git clone https://github.com/GameTechDev/TextureSetNeuralCompressionSample.git
24+
cd TextureSetNeuralCompressionSample
25+
26+
### Install dependencies
27+
28+
Download the Microsoft® DirectX 12 Agility SDK version 717 (preview or later) and the Microsoft® DirectX Compiler version 8.2502.8 (or later). You can do this manually or run the **dependencies.bat** script to automatically download and install the required dependencies.
29+
30+
### Build
31+
32+
mkdir build
33+
cd build
34+
cmake .. -DDX12_SDK_VERSION=717
35+
cmake --build . --config Release
36+
37+
### Run the sample
38+
39+
The sample executable is called `dino_danger`. You can run it from the **Microsoft Visual Studio 2022 IDE** or via the command line:
40+
41+
cd output/bin/Release
42+
dino_danger.exe --data-dir ../../..
43+
44+
You can also get more info about the command line options by running:
45+
46+
dino_danger.exe --help
47+
--data-dir Location of the resource folders.
48+
--adapter-id Integer that allows to pick the desired GPU.
49+
--poi Integer that allows to pick the initial camera location.
50+
--disable-coop Disable cooperative vector usage at launch.
51+
--enable-animation Enable mesh animation at launch.
52+
53+
## License
54+
Intel® Texture Set Neural Compression Sample is licensed under the [MIT License](LICENSE).

cmake/CMakeBuildSettings.cmake

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#
2+
# Copyright(c) 2025 Intel Corporation
3+
#
4+
# Permission is hereby granted, free of charge, to any person obtaining a copy
5+
# of this software and associated documentation files (the "Software"), to deal
6+
# in the Software without restriction, including without limitation the rights
7+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
# copies of the Software, and to permit persons to whom the Software is
9+
# furnished to do so, subject to the following conditions:
10+
#
11+
# The above copyright notice and this permission notice shall be included in
12+
# all copies or substantial portions of the Software.
13+
#
14+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
# SOFTWARE.
21+
#
22+
23+
# Minimal cmake version
24+
cmake_minimum_required(VERSION 3.5)
25+
26+
macro(define_plaform_settings)
27+
add_compile_options(/Zi)
28+
add_compile_options($<$<CONFIG:DEBUG>:/Od> $<$<NOT:$<CONFIG:DEBUG>>:/Ox>)
29+
add_compile_options(/Ob2)
30+
add_compile_options($<$<NOT:$<CONFIG:DEBUG>>:/Oi>)
31+
add_compile_options(/Ot)
32+
add_compile_options($<$<NOT:$<CONFIG:DEBUG>>:/GT>)
33+
add_compile_options(/GF)
34+
35+
if( PLATFORM_WINDOWS AND RUNTIME_TYPE STREQUAL "mt")
36+
add_compile_options($<$<CONFIG:DEBUG>:/MTd> $<$<NOT:$<CONFIG:DEBUG>>:/MT>)
37+
elseif( PLATFORM_WINDOWS AND RUNTIME_TYPE STREQUAL "md")
38+
add_compile_options($<$<CONFIG:DEBUG>:/MDd> $<$<NOT:$<CONFIG:DEBUG>>:/MD>)
39+
endif()
40+
41+
add_compile_options(/Gy)
42+
add_compile_options(/fp:fast)
43+
replace_compile_flags("/GR" "/GR-")
44+
45+
add_compile_options(/W4)
46+
add_compile_options(/WX)
47+
48+
add_exe_linker_flags(/DEBUG)
49+
add_exe_linker_flags(/MAP)
50+
replace_linker_flags("/INCREMENTAL" "/INCREMENTAL:NO" debug)
51+
add_compile_options(/MP)
52+
add_compile_options(-D_HAS_EXCEPTIONS=0)
53+
replace_linker_flags("/debug" "/DEBUG" debug)
54+
replace_linker_flags("/machine:x64" "/MACHINE:X64")
55+
add_compile_options(-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
56+
add_compile_options(-DSECURITY_WIN32)
57+
58+
set(CMAKE_CXX_STANDARD 20)
59+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
60+
set(CMAKE_CXX_EXTENSIONS OFF)
61+
endmacro()

0 commit comments

Comments
 (0)