Repository: GPUOpen-Effects/GeometryFX
Branch: master
Commit: 02c4139eff3e
Files: 256
Total size: 73.1 MB
Directory structure:
gitextract_n3wnfoc9/
├── .gitattributes
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE.txt
├── README.md
├── amd_geometryfx/
│ ├── build/
│ │ ├── AMD_GeometryFX_2015.sln
│ │ ├── AMD_GeometryFX_2015.vcxproj
│ │ ├── AMD_GeometryFX_2015.vcxproj.filters
│ │ ├── AMD_GeometryFX_2017.filters
│ │ ├── AMD_GeometryFX_2017.sln
│ │ ├── AMD_GeometryFX_2017.vcxproj
│ │ └── AMD_GeometryFX_2017.vcxproj.filters
│ ├── inc/
│ │ ├── AMD_GeometryFX.h
│ │ ├── AMD_GeometryFX_Filtering.h
│ │ └── AMD_GeometryFX_Utility.h
│ ├── premake/
│ │ └── premake5.lua
│ └── src/
│ ├── AMD_GeometryFX_Filtering.cpp
│ ├── AMD_GeometryFX_Internal.h
│ ├── AMD_GeometryFX_Utility.cpp
│ ├── GeometryFXMesh.cpp
│ ├── GeometryFXMesh.h
│ ├── GeometryFXMeshManager.cpp
│ ├── GeometryFXMeshManager.h
│ ├── GeometryFXUtility_Internal.cpp
│ ├── GeometryFXUtility_Internal.h
│ └── Shaders/
│ ├── AMD_GeometryFX_Filtering.hlsl
│ ├── build/
│ │ └── fxc_compile_geometryfx_all.bat
│ └── inc/
│ ├── AMD_GeometryFX_ClearDrawIndirectArgsCS.inc
│ ├── AMD_GeometryFX_DepthOnlyMultiIndirectVS.inc
│ ├── AMD_GeometryFX_DepthOnlyVS.inc
│ └── AMD_GeometryFX_FilterCS.inc
├── amd_geometryfx_sample/
│ ├── build/
│ │ ├── GeometryFX_Sample_2015.sln
│ │ ├── GeometryFX_Sample_2015.vcxproj
│ │ ├── GeometryFX_Sample_2015.vcxproj.filters
│ │ ├── GeometryFX_Sample_2017.filters
│ │ ├── GeometryFX_Sample_2017.sln
│ │ ├── GeometryFX_Sample_2017.vcxproj
│ │ └── GeometryFX_Sample_2017.vcxproj.filters
│ ├── media/
│ │ ├── house.mtl
│ │ ├── house.obj
│ │ ├── readme.txt
│ │ └── ui/
│ │ ├── Font.dds
│ │ ├── MIT.txt
│ │ └── dxutcontrols.dds
│ ├── premake/
│ │ └── premake5.lua
│ └── src/
│ ├── GeometryFX_Sample.cpp
│ ├── ResourceFiles/
│ │ ├── GeometryFX_Sample.rc
│ │ ├── dpiaware.manifest
│ │ └── resource.h
│ └── Shaders/
│ └── GeometryFX_Sample.hlsl
├── amd_lib/
│ ├── ags_lib/
│ │ ├── .gitattributes
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE.txt
│ │ ├── README.md
│ │ ├── inc/
│ │ │ └── amd_ags.h
│ │ └── lib/
│ │ ├── amd_ags_x64.lib
│ │ └── amd_ags_x86.lib
│ └── shared/
│ ├── .gitattributes
│ ├── .gitignore
│ ├── LICENSE.txt
│ ├── README.md
│ ├── common/
│ │ └── inc/
│ │ └── AMD_Types.h
│ ├── d3d11/
│ │ ├── build/
│ │ │ ├── AMD_LIB_2015.vcxproj
│ │ │ ├── AMD_LIB_2015.vcxproj.filters
│ │ │ ├── AMD_LIB_2017.vcxproj
│ │ │ ├── AMD_LIB_2017.vcxproj.filters
│ │ │ ├── AMD_LIB_Minimal_2015.vcxproj
│ │ │ ├── AMD_LIB_Minimal_2015.vcxproj.filters
│ │ │ ├── AMD_LIB_Minimal_2017.vcxproj
│ │ │ └── AMD_LIB_Minimal_2017.vcxproj.filters
│ │ ├── inc/
│ │ │ └── AMD_LIB.h
│ │ ├── premake/
│ │ │ ├── premake5.lua
│ │ │ └── premake5_minimal.lua
│ │ └── src/
│ │ ├── AMD_Buffer.cpp
│ │ ├── AMD_Buffer.h
│ │ ├── AMD_Common.cpp
│ │ ├── AMD_Common.h
│ │ ├── AMD_FullscreenPass.cpp
│ │ ├── AMD_FullscreenPass.h
│ │ ├── AMD_Rand.cpp
│ │ ├── AMD_Rand.h
│ │ ├── AMD_SaveRestoreState.cpp
│ │ ├── AMD_SaveRestoreState.h
│ │ ├── AMD_Serialize.cpp
│ │ ├── AMD_Serialize.h
│ │ ├── AMD_Texture2D.cpp
│ │ ├── AMD_Texture2D.h
│ │ ├── AMD_UnitCube.cpp
│ │ ├── AMD_UnitCube.h
│ │ ├── DirectXTex/
│ │ │ ├── DDSTextureLoader.cpp
│ │ │ ├── DDSTextureLoader.h
│ │ │ ├── MIT.txt
│ │ │ ├── ReadMe.txt
│ │ │ ├── ScreenGrab.cpp
│ │ │ └── ScreenGrab.h
│ │ └── Shaders/
│ │ ├── AMD_FullscreenPass.hlsl
│ │ ├── AMD_Quaternion.hlsl
│ │ ├── AMD_UnitCube.hlsl
│ │ ├── SeparableFilter/
│ │ │ ├── FilterCommon.hlsl
│ │ │ ├── FilterKernel.hlsl
│ │ │ ├── HorizontalFilter.hlsl
│ │ │ └── VerticalFilter.hlsl
│ │ ├── build/
│ │ │ ├── fxc_compile_fullscreen_pass.bat
│ │ │ └── fxc_compile_unit_cube.bat
│ │ └── inc/
│ │ ├── GS_FULLSCREEN_INDEX_RT.inc
│ │ ├── PS_FULLSCREEN.inc
│ │ ├── PS_UNIT_CUBE.inc
│ │ ├── VS_CLIP_SPACE_CUBE.inc
│ │ ├── VS_FULLSCREEN.inc
│ │ ├── VS_FULLSCREEN_INDEX_RT.inc
│ │ ├── VS_SCREENQUAD.inc
│ │ └── VS_UNIT_CUBE.inc
│ └── d3d12/
│ └── inc/
│ └── d3dx12.h
├── framework/
│ └── d3d11/
│ ├── amd_sdk/
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── LICENSE.txt
│ │ ├── README.md
│ │ ├── build/
│ │ │ ├── AMD_SDK_2015.vcxproj
│ │ │ ├── AMD_SDK_2015.vcxproj.filters
│ │ │ ├── AMD_SDK_2017.vcxproj
│ │ │ ├── AMD_SDK_2017.vcxproj.filters
│ │ │ ├── AMD_SDK_Minimal_2015.vcxproj
│ │ │ ├── AMD_SDK_Minimal_2015.vcxproj.filters
│ │ │ ├── AMD_SDK_Minimal_2017.vcxproj
│ │ │ └── AMD_SDK_Minimal_2017.vcxproj.filters
│ │ ├── inc/
│ │ │ ├── AMD_SDK.h
│ │ │ └── ShaderCacheSampleHelper.h
│ │ ├── media/
│ │ │ └── AMD.dds
│ │ ├── premake/
│ │ │ ├── premake5.lua
│ │ │ └── premake5_minimal.lua
│ │ └── src/
│ │ ├── AMD_Mesh.cpp
│ │ ├── AMD_Mesh.h
│ │ ├── Geometry.cpp
│ │ ├── Geometry.h
│ │ ├── HUD.cpp
│ │ ├── HUD.h
│ │ ├── HelperFunctions.cpp
│ │ ├── HelperFunctions.h
│ │ ├── LineRender.cpp
│ │ ├── LineRender.h
│ │ ├── Magnify.cpp
│ │ ├── Magnify.h
│ │ ├── MagnifyTool.cpp
│ │ ├── MagnifyTool.h
│ │ ├── ShaderCache.cpp
│ │ ├── ShaderCache.h
│ │ ├── ShaderCacheSampleHelper.cpp
│ │ ├── Shaders/
│ │ │ ├── Line.hlsl
│ │ │ └── Sprite.hlsl
│ │ ├── Sprite.cpp
│ │ ├── Sprite.h
│ │ ├── Timer.cpp
│ │ ├── Timer.h
│ │ ├── crc.cpp
│ │ └── crc.h
│ └── dxut/
│ ├── .gitattributes
│ ├── .gitignore
│ ├── Core/
│ │ ├── DDSTextureLoader.cpp
│ │ ├── DDSTextureLoader.h
│ │ ├── DXUT.cpp
│ │ ├── DXUT.h
│ │ ├── DXUTDevice11.cpp
│ │ ├── DXUTDevice11.h
│ │ ├── DXUT_2015.vcxproj
│ │ ├── DXUT_2017.vcxproj
│ │ ├── DXUTmisc.cpp
│ │ ├── DXUTmisc.h
│ │ ├── ScreenGrab.cpp
│ │ ├── ScreenGrab.h
│ │ ├── WICTextureLoader.cpp
│ │ ├── WICTextureLoader.h
│ │ ├── dxerr.cpp
│ │ ├── dxerr.h
│ │ └── premake5.lua
│ ├── MIT.txt
│ ├── Optional/
│ │ ├── DXUTLockFreePipe.h
│ │ ├── DXUTOpt_2015.vcxproj
│ │ ├── DXUTOpt_2017.vcxproj
│ │ ├── DXUTcamera.cpp
│ │ ├── DXUTcamera.h
│ │ ├── DXUTgui.cpp
│ │ ├── DXUTgui.h
│ │ ├── DXUTguiIME.cpp
│ │ ├── DXUTguiIME.h
│ │ ├── DXUTres.cpp
│ │ ├── DXUTres.h
│ │ ├── DXUTsettingsdlg.cpp
│ │ ├── DXUTsettingsdlg.h
│ │ ├── ImeUi.cpp
│ │ ├── ImeUi.h
│ │ ├── SDKmesh.cpp
│ │ ├── SDKmesh.h
│ │ ├── SDKmisc.cpp
│ │ ├── SDKmisc.h
│ │ └── premake5.lua
│ └── ReadMe.txt
├── premake/
│ ├── LICENSE.txt
│ ├── amd_premake_util.lua
│ ├── gpuopen_fx_update_vs_files.bat
│ └── gpuopen_geometryfx_update_vs_files.bat
└── third_party/
└── assimp/
├── .gitattributes
├── .gitignore
├── CHANGES
├── CREDITS
├── LICENSE
├── README
├── Readme.md
├── doc/
│ ├── AssimpCmdDoc_Html/
│ │ └── AssimpCmdDoc.chm
│ ├── AssimpDoc_Html/
│ │ └── AssimpDoc.chm
│ └── Preamble.txt
├── include/
│ └── assimp/
│ ├── .editorconfig
│ ├── Compiler/
│ │ ├── poppack1.h
│ │ ├── pstdint.h
│ │ └── pushpack1.h
│ ├── DefaultLogger.hpp
│ ├── Exporter.hpp
│ ├── IOStream.hpp
│ ├── IOSystem.hpp
│ ├── Importer.hpp
│ ├── LogStream.hpp
│ ├── Logger.hpp
│ ├── NullLogger.hpp
│ ├── ProgressHandler.hpp
│ ├── ai_assert.h
│ ├── anim.h
│ ├── camera.h
│ ├── cexport.h
│ ├── cfileio.h
│ ├── cimport.h
│ ├── color4.h
│ ├── color4.inl
│ ├── config.h
│ ├── defs.h
│ ├── importerdesc.h
│ ├── light.h
│ ├── material.h
│ ├── material.inl
│ ├── matrix3x3.h
│ ├── matrix3x3.inl
│ ├── matrix4x4.h
│ ├── matrix4x4.inl
│ ├── mesh.h
│ ├── metadata.h
│ ├── port/
│ │ └── AndroidJNI/
│ │ └── AndroidJNIIOSystem.h
│ ├── postprocess.h
│ ├── quaternion.h
│ ├── quaternion.inl
│ ├── scene.h
│ ├── texture.h
│ ├── types.h
│ ├── vector2.h
│ ├── vector2.inl
│ ├── vector3.h
│ ├── vector3.inl
│ └── version.h
└── lib/
└── assimp_x64_2015.lib
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
# This is a windows-only project. Force CRLF.
* text eol=crlf
# Explicit settings for specific file types.
*.h eol=crlf
*.hpp eol=crlf
*.inc eol=crlf
*.cpp eol=crlf
*.inl eol=crlf
*.hlsl eol=crlf
*.rc eol=crlf
*.manifest eol=crlf
*.vcxproj eol=crlf
*.filters eol=crlf
*.props eol=crlf
*.sln eol=crlf
*.bat eol=crlf
*.txt eol=crlf
*.lua eol=crlf
*.md eol=crlf
*.py eol=crlf
*.svg eol=crlf
*.mtl eol=crlf
*.pdf binary
*.ppsx binary
*.ico binary
*.png binary
*.bmp binary
*.dds binary
*.DDS binary
*.sdkmesh binary
*.ply binary
*.obj binary
*.chm binary
*.lib binary
*.dll binary
*.exe binary
# Ensure precompiled shader files are detected as C++.
# Otherwise, if there are a lot of them, the repo can
# get incorrectly marked as Assembly.
amd_geometryfx/src/Shaders/inc/*.inc linguist-language=C++
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, etc.
# User-specific files
*.suo
*.user
# Build results
VS*/
[Dd]esktop_*/
GeometryFX_Sample_Debug_*.*
GeometryFX_Sample_Release_*.*
amd_geometryfx/lib/GPUOpen_GeometryFX_*.*
amd_geometryfx_sample/bin/
# Visual Studo 2015 cache/options directory
.vs/
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
*.opendb
*.VC.db
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Installshield output folder
[Ee]xpress/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# Shader cache
[Bb]in/Shaders/
HashDigest.html
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to GPUOpen Effects
Thank you for your interest in GPUOpen Effects.
Contributions can be made by creating a GitHub pull request.
---
**IMPORTANT**: By creating a pull request, you agree to allow your contribution to be licensed by the project owners under the terms of the [MIT License](LICENSE.txt).
---
### Types of contributions
We welcome pull requests without prior discussion for the following types of contributions:
* Typo fixes
* Bug fixes (that do not require significant code changes)
* Shader performance improvements (that do not require significant code changes)
We also welcome pull requests for new features and improvements/optimizations/bug fixes that require larger code changes. However, these should be discussed prior to starting work, via GitHub issues. This is to avoid a contributor spending a lot of time on changes that might not be accepted. In general, the bigger the change, the more discussion should take place before starting work.
Regarding shader performance improvements, it is possible to make a change that runs faster on one GPU architecture but slower on another. Shader changes should not reduce performance or quality on any supported GPU. We recognize that some contributors may not have different GPUs for testing. GPUOpen maintainers will evaluate shader changes to ensure performance and quality are not degraded on different GPU architectures.
### Implementation guidelines
When contributing to an existing GPUOpen Effects library or sample, we mostly just want your code to be:
1. Useful to game developers and other users of real-time visual effects code
2. Mindful of performance
3. Written in the style of the existing code
Here are a few specific guidelines:
* **Match the style of existing code**
* This is the most important guideline
* Avoid C++11/14/17 features
* Possible exceptions include simple changes/additions to the language that are widely supported
* "Widely supported" means it works all the way back to Visual Studio 2010
* We allow `nullptr`, for example, because it is:
1. A minor change compared to "ordinary" C++ (i.e. C++98/03)
2. An improvement over "ordinary" C++
3. Widely supported
* Avoid adding new dependencies
* Follow the rules for namespaces
* Wrap external API functions in the AMD namespace
* Avoid namespace `using` declarations in header files and before `#include` directives in implementation files
* Avoid unnamed namespaces in header files
* Avoid complicated template code
* We realized that "complicated" is a subjective standard
* If you decide to write template code to avoid manually writing several specialized versions of the same function, and there is an actual need for different versions of the function, and the resulting code is not a tangle of angle brackets, then your template code may qualify as "uncomplicated"
* But be aware that many of the maintainers view template syntax as inherently ugly, and while recognizing there are good uses for templates, believe that their overuse leads to code that is less readable and harder to maintain
* Avoid vendor-specific shader code, for simplicity and readability
* Use only vanilla HLSL, at least for now
* Avoid conditional compilation based on vendor, at least for now
* We may relax or eliminate this rule in the future
### Code formatting
The code formatting guidelines help keep the look of the code (at least somewhat) consistent within a particular GPUOpen Effects project as well as across all GPUOpen Effects projects.
We recognize that some of the guidelines below are completely in the realm of personal preference (e.g. spaces vs. tabs, formatting of `if` statements and `for` loops, placement of curly braces, etc.). But consistency is important, and in order to achieve consistency, a style must be chosen.
For formatting considerations not covered by the guidelines below, **match existing code**.
Here are the guidelines for code formatting:
* Leave line endings as they are
* Currently, all GPUOpen Effects are based solely on DirectX® and thus Windows®
* All text files use CRLF line endings
* Our .gitattributes files enforce this, so you should not have to worry about it
* Avoid trailing whitespace
* This includes blank lines, meaning blank lines should actually be empty (except for the line ending)
* Use spaces, not tabs
* Limit line length to a maximum of 200 characters
* Widescreen, high-res monitors eliminate the need for an 80-character limit
* But we still need lines to be limited to some reasonable length
* Most lines should be limited to 100 characters, for fans of side-by-side window layouts, side-by-side diffs, etc.
* Use one space between conditional and loop keywords and the opening parenthesis
* `if (result != AOFX_RETURN_CODE_SUCCESS)`
* `for (int i = 0; i < m_MultiResLayerCount; i++)`
* Place curly braces from the same pair in the same line or in the same column
* This:
```
if (context == NULL) { return; }
Mesh::~Mesh()
{
Release();
}
```
* Not this:
```
if (context == NULL) {
return; }
Mesh::~Mesh() {
Release();
}
```
* The one exception to "no K&R-style braces" is `extern "C" {`
* Ensure control structures have a complete curly-braced block of code
* This:
```
if (context == NULL) { return; }
if (disabled)
{
return;
}
```
* Not this:
```
if (context == NULL) return;
if (disabled)
return;
```
### Commit messages
Please follow the standard Git conventions for commit messages.
Here is our summary of these conventions, adapted somewhat for GitHub's particular rules:
* Write a subject line followed by a blank line followed by further explanation (if needed)
* Capitalize the subject line
* Do not put a period at the end of the subject line
* Limit the subject line to 72 characters
* A common recommendation is to limit it to 50 characters
* GitHub truncates subject lines longer than 72 characters
* Use the imperative present tense
* e.g. "Fix rendering bug"
* Not "Fixed rendering bug", "Fixes rendering bug", or "Fixing rendering bug"
* Wrap the body (i.e. the "further explanation" part) at 72 characters
If you are using GitHub Desktop, the blank line and text wrapping will be handled for you.
More information on the standard conventions for good commit messages can be found here:
* GitHub blog entry on [Shiny new commit styles](https://github.com/blog/926-shiny-new-commit-styles)
* Chris Beams' post on [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/)
* Tim Pope's original [Note About Git Commit Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
In addition, if the commit fixes an open issue, add `Fixes issue_number` to the end of the commit message:
* e.g. `Fixes #1`
* See [Closing issues via commit messages](https://help.github.com/articles/closing-issues-via-commit-messages/) for more details
================================================
FILE: LICENSE.txt
================================================
Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: README.md
================================================
# AMD GeometryFX

The GeometryFX library provides convenient access to compute-based triangle filtering (CTF), which improves triangle throughput by filtering out triangles that do not contribute to the final image using a compute-preprocess.
### Prerequisites
* AMD Radeon™ GCN-based GPU (HD 7000 series or newer)
* Or other DirectX® 11 compatible discrete GPU with Shader Model 5 support
* 64-bit Windows® 7 (SP1 with the [Platform Update](https://msdn.microsoft.com/en-us/library/windows/desktop/jj863687.aspx)), Windows® 8.1, or Windows® 10
* Visual Studio® 2015, or Visual Studio® 2017
### Getting started
* Visual Studio solutions for VS2015 and VS2017 can be found in the `amd_geometryfx_sample\build` directory.
* There are also solutions for just the core library in the `amd_geometryfx\build` directory.
### How GeometryFX Works
GeometryFX improves the rasterizer efficiency by culling triangles that do not contribute to the output in a pre-pass. This allows the full chip to be used to process geometry, and ensures that the rasterizer only processes triangles that are visible.
A good use case for the GeometryFX library is depth-only rendering of opaque geometry – for example, in shadow maps:
* Depth-only rendering leaves most compute units idle, which can be used by GeometryFX.
* Opaque geometry has no ordering requirements, so GeometryFX can cull triangles in arbitrary order and regroup/split draw calls.
* All geometry can be rendered using the same vertex shader, which allows the GeometryFX library to merge draw calls for maximum efficiency
At its core, GeometryFX works by generating an intermediate index buffer which consists of visible triangles only. Intermediate buffers are reused as much as possible to minimize memory usage. GeometryFX also buffers up draw calls to execute the filtering on one batch while the previous batch is being rendered, allowing the filtering to overlap with the actual draw call.
The library makes heavy use of multi-draw indirect. This is a DirectX 11 driver extension exposed through the AMD GPU Services (AGS) library. It allows multiple draw calls to be prepared on the GPU and executed with a single API call. For more information on AGS, including samples, visit the [AGS SDK repository on GitHub](https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK/).
### The Filters
GeometryFX comes with several built-in filters:
* Backface culling: This is generally the most efficient filter, which removes back-facing triangles. In order to avoid clipping, the culling is performed in homogeneous coordinates.
* Small primitive filtering: Triangles which are guaranteed to not hit a sample are removed. This filter tests the bounding box of the triangle against the sample grid, and requires the triangle to be projected.
* Frustum culling: Cull triangles against the view frustum. While most games perform per-object culling, this filter runs per-triangle.
* Cluster culling: Filter complete clusters of triangles before going into per-triangle filtering.
The filters are executed in a compute shader which writes the new index buffer and the draw calls for each batch.
### Integration
Applications which want to integrate GeometryFX as-is are expected to allocate all static geometry through GeometryFX. The API exposes a function to obtain the storage location, which can be used for normal rendering of the geometry. Notice that GeometryFX will aggressively pool all data to allow as many draw calls as possible to be served from the same buffer.
At run-time, the application has to provide the view/projection matrix to GeometryFX and the list of objects that have to be rendered. Once everything has been submitted, GeometryFX will execute the filtering and rendering.
### Learn More
* [Cluster culling blog post on GPUOpen](http://gpuopen.com/geometryfx-1-2-cluster-culling/)
### Premake
The Visual Studio solutions and projects in this repo were generated with Premake. If you need to regenerate the Visual Studio files, double-click on `gpuopen_geometryfx_update_vs_files.bat` in the `premake` directory.
For Visual Studio 2015 and 2017, this version of Premake adds the `WindowsTargetPlatformVersion` element to the project file to specify which version of the Windows SDK will be used. To change `WindowsTargetPlatformVersion` for Visual Studio 2015 and 2017, change the value for `_AMD_WIN_SDK_VERSION` in `premake\amd_premake_util.lua` and regenerate the Visual Studio files.
### Third-Party Software
* DXUT is distributed under the terms of the MIT License. See `framework\d3d11\dxut\MIT.txt`.
* Premake is distributed under the terms of the BSD License. See `premake\LICENSE.txt`.
* The Open Asset Import Library (assimp) is distributed under the terms of the BSD License. See `third_party\assimp\LICENSE`.
DXUT and assimp are only used by the sample, not the core library. Only first-party software (specifically `ags_lib`, `amd_geometryfx`, and `amd_lib`) is needed to build the GeometryFX library.
### Attribution
* AMD, the AMD Arrow logo, Radeon, and combinations thereof are either registered trademarks or trademarks of Advanced Micro Devices, Inc. in the United States and/or other countries.
* Microsoft, DirectX, Visual Studio, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
================================================
FILE: amd_geometryfx/build/AMD_GeometryFX_2015.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AMD_GeometryFX", "AMD_GeometryFX_2015.vcxproj", "{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AMD_LIB", "..\..\amd_lib\shared\d3d11\build\AMD_LIB_2015.vcxproj", "{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
DLL_Debug|Win32 = DLL_Debug|Win32
DLL_Debug|x64 = DLL_Debug|x64
DLL_Release_MT|Win32 = DLL_Release_MT|Win32
DLL_Release_MT|x64 = DLL_Release_MT|x64
DLL_Release|Win32 = DLL_Release|Win32
DLL_Release|x64 = DLL_Release|x64
Lib_Debug|Win32 = Lib_Debug|Win32
Lib_Debug|x64 = Lib_Debug|x64
Lib_Release|Win32 = Lib_Release|Win32
Lib_Release|x64 = Lib_Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Debug|Win32.ActiveCfg = DLL_Debug|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Debug|Win32.Build.0 = DLL_Debug|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Debug|x64.ActiveCfg = DLL_Debug|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Debug|x64.Build.0 = DLL_Debug|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release_MT|Win32.ActiveCfg = DLL_Release_MT|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release_MT|Win32.Build.0 = DLL_Release_MT|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release_MT|x64.ActiveCfg = DLL_Release_MT|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release_MT|x64.Build.0 = DLL_Release_MT|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release|Win32.ActiveCfg = DLL_Release|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release|Win32.Build.0 = DLL_Release|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release|x64.ActiveCfg = DLL_Release|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release|x64.Build.0 = DLL_Release|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Debug|Win32.ActiveCfg = Lib_Debug|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Debug|Win32.Build.0 = Lib_Debug|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Debug|x64.ActiveCfg = Lib_Debug|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Debug|x64.Build.0 = Lib_Debug|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Release|Win32.ActiveCfg = Lib_Release|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Release|Win32.Build.0 = Lib_Release|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Release|x64.ActiveCfg = Lib_Release|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Release|x64.Build.0 = Lib_Release|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Debug|Win32.ActiveCfg = Debug|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Debug|Win32.Build.0 = Debug|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Debug|x64.ActiveCfg = Debug|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Debug|x64.Build.0 = Debug|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release_MT|Win32.ActiveCfg = Release_MT|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release_MT|Win32.Build.0 = Release_MT|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release_MT|x64.ActiveCfg = Release_MT|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release_MT|x64.Build.0 = Release_MT|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release|Win32.ActiveCfg = Release|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release|Win32.Build.0 = Release|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release|x64.ActiveCfg = Release|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release|x64.Build.0 = Release|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Debug|Win32.ActiveCfg = Debug|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Debug|Win32.Build.0 = Debug|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Debug|x64.ActiveCfg = Debug|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Debug|x64.Build.0 = Debug|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Release|Win32.ActiveCfg = Release|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Release|Win32.Build.0 = Release|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Release|x64.ActiveCfg = Release|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
================================================
FILE: amd_geometryfx/build/AMD_GeometryFX_2015.vcxproj
================================================
DLL_DebugWin32DLL_Debugx64DLL_ReleaseWin32DLL_Releasex64Lib_DebugWin32Lib_Debugx64Lib_ReleaseWin32Lib_Releasex64DLL_Release_MTWin32DLL_Release_MTx64{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}trueWin32ProjAMD_GeometryFXAMD_GeometryFX8.1DynamicLibrarytrueUnicodev140DynamicLibrarytrueUnicodev140DynamicLibraryfalseUnicodev140DynamicLibraryfalseUnicodev140StaticLibrarytrueUnicodev140StaticLibrarytrueUnicodev140StaticLibraryfalseUnicodev140StaticLibraryfalseUnicodev140DynamicLibraryfalseUnicodev140DynamicLibraryfalseUnicodev140true..\lib\VS2015\Win32\DLL_Debug\VS2015\Win32\DLL_Debug\GPUOpen_GeometryFX_x86d.dlltrue..\lib\VS2015\x64\DLL_Debug\VS2015\x64\DLL_Debug\GPUOpen_GeometryFX_x64d.dllfalse..\lib\VS2015\Win32\DLL_Release\VS2015\Win32\DLL_Release\GPUOpen_GeometryFX_x86.dllfalse..\lib\VS2015\x64\DLL_Release\VS2015\x64\DLL_Release\GPUOpen_GeometryFX_x64.dll..\lib\VS2015\Win32\Lib_Debug\VS2015\Win32\Lib_Debug\GPUOpen_GeometryFX_x86d.lib..\lib\VS2015\x64\Lib_Debug\VS2015\x64\Lib_Debug\GPUOpen_GeometryFX_x64d.lib..\lib\VS2015\Win32\Lib_Release\VS2015\Win32\Lib_Release\GPUOpen_GeometryFX_x86.lib..\lib\VS2015\x64\Lib_Release\VS2015\x64\Lib_Release\GPUOpen_GeometryFX_x64.libfalse..\lib\VS2015\Win32\DLL_Release_MT\VS2015\Win32\DLL_Release_MT\GPUOpen_GeometryFX_x86.dllfalse..\lib\VS2015\x64\DLL_Release_MT\VS2015\x64\DLL_Release_MT\GPUOpen_GeometryFX_x64.dllNotUsingLevel4true_USRDLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;AMD_DLL_EXPORTS=1;WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)EditAndContinueDisabledfalsefalse/EHsc %(AdditionalOptions)Windowstruedxguid.lib;amd_ags_x86.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)..\lib\VS2015\Win32\DLL_Debug\GPUOpen_GeometryFX_x86d.libtruecopy /b "..\lib\VS2015\Win32\DLL_Debug\$(TargetName).lib" +,, "..\lib\VS2015\Win32\DLL_Debug\" > nul
xcopy "..\lib\VS2015\Win32\DLL_Debug\$(TargetName).dll" "..\lib" /H /R /Y > nul
xcopy "..\lib\VS2015\Win32\DLL_Debug\$(TargetName).lib" "..\lib" /H /R /Y > nulCopying build output to lib directory...NotUsingLevel4true_USRDLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;AMD_DLL_EXPORTS=1;WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)EditAndContinueDisabledfalsefalse/EHsc %(AdditionalOptions)Windowstruedxguid.lib;amd_ags_x64.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)..\lib\VS2015\x64\DLL_Debug\GPUOpen_GeometryFX_x64d.libtruecopy /b "..\lib\VS2015\x64\DLL_Debug\$(TargetName).lib" +,, "..\lib\VS2015\x64\DLL_Debug\" > nul
xcopy "..\lib\VS2015\x64\DLL_Debug\$(TargetName).dll" "..\lib" /H /R /Y > nul
xcopy "..\lib\VS2015\x64\DLL_Debug\$(TargetName).lib" "..\lib" /H /R /Y > nulCopying build output to lib directory...NotUsingLevel4true_USRDLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;AMD_DLL_EXPORTS=1;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)Fulltruetruefalsetruefalsefalse/EHsc %(AdditionalOptions)Windowstruetruedxguid.lib;amd_ags_x86.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)..\lib\VS2015\Win32\DLL_Release\GPUOpen_GeometryFX_x86.libtruecopy /b "..\lib\VS2015\Win32\DLL_Release\$(TargetName).lib" +,, "..\lib\VS2015\Win32\DLL_Release\" > nul
xcopy "..\lib\VS2015\Win32\DLL_Release\$(TargetName).dll" "..\lib" /H /R /Y > nul
xcopy "..\lib\VS2015\Win32\DLL_Release\$(TargetName).lib" "..\lib" /H /R /Y > nulCopying build output to lib directory...NotUsingLevel4true_USRDLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;AMD_DLL_EXPORTS=1;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)Fulltruetruefalsetruefalsefalse/EHsc %(AdditionalOptions)Windowstruetruedxguid.lib;amd_ags_x64.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)..\lib\VS2015\x64\DLL_Release\GPUOpen_GeometryFX_x64.libtruecopy /b "..\lib\VS2015\x64\DLL_Release\$(TargetName).lib" +,, "..\lib\VS2015\x64\DLL_Release\" > nul
xcopy "..\lib\VS2015\x64\DLL_Release\$(TargetName).dll" "..\lib" /H /R /Y > nul
xcopy "..\lib\VS2015\x64\DLL_Release\$(TargetName).lib" "..\lib" /H /R /Y > nulCopying build output to lib directory...NotUsingLevel4true_LIB;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=0;WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)EditAndContinueDisabledfalsefalse/EHsc %(AdditionalOptions)Windowstruedxguid.lib;amd_ags_x86.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)trueNotUsingLevel4true_LIB;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=0;WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)EditAndContinueDisabledfalsefalse/EHsc %(AdditionalOptions)Windowstruedxguid.lib;amd_ags_x64.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)trueNotUsingLevel4true_LIB;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=0;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)Fulltruetruefalsetruefalsefalse/EHsc %(AdditionalOptions)Windowstruetruedxguid.lib;amd_ags_x86.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)trueNotUsingLevel4true_LIB;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=0;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)Fulltruetruefalsetruefalsefalse/EHsc %(AdditionalOptions)Windowstruetruedxguid.lib;amd_ags_x64.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)trueNotUsingLevel4true_USRDLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;AMD_DLL_EXPORTS=1;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)FulltruetruefalsetrueMultiThreadedfalsefalse/EHsc %(AdditionalOptions)Windowstruetruedxguid.lib;amd_ags_x86.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)..\lib\VS2015\Win32\DLL_Release_MT\GPUOpen_GeometryFX_x86.libtruecopy /b "..\lib\VS2015\Win32\DLL_Release_MT\$(TargetName).lib" +,, "..\lib\VS2015\Win32\DLL_Release_MT\" > nul
xcopy "..\lib\VS2015\Win32\DLL_Release_MT\$(TargetName).dll" "..\lib" /H /R /Y > nul
xcopy "..\lib\VS2015\Win32\DLL_Release_MT\$(TargetName).lib" "..\lib" /H /R /Y > nulCopying build output to lib directory...NotUsingLevel4true_USRDLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;AMD_DLL_EXPORTS=1;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)FulltruetruefalsetrueMultiThreadedfalsefalse/EHsc %(AdditionalOptions)Windowstruetruedxguid.lib;amd_ags_x64.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)..\lib\VS2015\x64\DLL_Release_MT\GPUOpen_GeometryFX_x64.libtruecopy /b "..\lib\VS2015\x64\DLL_Release_MT\$(TargetName).lib" +,, "..\lib\VS2015\x64\DLL_Release_MT\" > nul
xcopy "..\lib\VS2015\x64\DLL_Release_MT\$(TargetName).dll" "..\lib" /H /R /Y > nul
xcopy "..\lib\VS2015\x64\DLL_Release_MT\$(TargetName).lib" "..\lib" /H /R /Y > nulCopying build output to lib directory...{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}
================================================
FILE: amd_geometryfx/build/AMD_GeometryFX_2015.vcxproj.filters
================================================
{1F80880B-8B89-887C-1405-9F7C800D947C}{2DAB880B-99B4-887C-2230-9F7C8E38947C}{06ADC7FB-7262-40F1-FB56-3AC8670B37F5}incincincsrcsrcsrcsrcsrcsrcsrcsrcsrcsrc\Shaders
================================================
FILE: amd_geometryfx/build/AMD_GeometryFX_2017.filters
================================================
{1F80880B-8B89-887C-1405-9F7C800D947C}{2DAB880B-99B4-887C-2230-9F7C8E38947C}{06ADC7FB-7262-40F1-FB56-3AC8670B37F5}src\Shadersincincincsrcsrcsrcsrcsrcsrcsrcsrcsrc
================================================
FILE: amd_geometryfx/build/AMD_GeometryFX_2017.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AMD_GeometryFX", "AMD_GeometryFX_2017.vcxproj", "{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AMD_LIB", "..\..\amd_lib\shared\d3d11\build\AMD_LIB_2017.vcxproj", "{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
DLL_Debug|Win32 = DLL_Debug|Win32
DLL_Debug|x64 = DLL_Debug|x64
DLL_Release_MT|Win32 = DLL_Release_MT|Win32
DLL_Release_MT|x64 = DLL_Release_MT|x64
DLL_Release|Win32 = DLL_Release|Win32
DLL_Release|x64 = DLL_Release|x64
Lib_Debug|Win32 = Lib_Debug|Win32
Lib_Debug|x64 = Lib_Debug|x64
Lib_Release|Win32 = Lib_Release|Win32
Lib_Release|x64 = Lib_Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Debug|Win32.ActiveCfg = DLL_Debug|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Debug|Win32.Build.0 = DLL_Debug|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Debug|x64.ActiveCfg = DLL_Debug|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Debug|x64.Build.0 = DLL_Debug|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release_MT|Win32.ActiveCfg = DLL_Release_MT|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release_MT|Win32.Build.0 = DLL_Release_MT|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release_MT|x64.ActiveCfg = DLL_Release_MT|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release_MT|x64.Build.0 = DLL_Release_MT|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release|Win32.ActiveCfg = DLL_Release|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release|Win32.Build.0 = DLL_Release|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release|x64.ActiveCfg = DLL_Release|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.DLL_Release|x64.Build.0 = DLL_Release|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Debug|Win32.ActiveCfg = Lib_Debug|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Debug|Win32.Build.0 = Lib_Debug|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Debug|x64.ActiveCfg = Lib_Debug|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Debug|x64.Build.0 = Lib_Debug|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Release|Win32.ActiveCfg = Lib_Release|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Release|Win32.Build.0 = Lib_Release|Win32
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Release|x64.ActiveCfg = Lib_Release|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Lib_Release|x64.Build.0 = Lib_Release|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Debug|Win32.ActiveCfg = Debug|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Debug|Win32.Build.0 = Debug|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Debug|x64.ActiveCfg = Debug|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Debug|x64.Build.0 = Debug|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release_MT|Win32.ActiveCfg = Release_MT|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release_MT|Win32.Build.0 = Release_MT|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release_MT|x64.ActiveCfg = Release_MT|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release_MT|x64.Build.0 = Release_MT|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release|Win32.ActiveCfg = Release|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release|Win32.Build.0 = Release|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release|x64.ActiveCfg = Release|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.DLL_Release|x64.Build.0 = Release|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Debug|Win32.ActiveCfg = Debug|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Debug|Win32.Build.0 = Debug|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Debug|x64.ActiveCfg = Debug|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Debug|x64.Build.0 = Debug|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Release|Win32.ActiveCfg = Release|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Release|Win32.Build.0 = Release|Win32
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Release|x64.ActiveCfg = Release|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Lib_Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
================================================
FILE: amd_geometryfx/build/AMD_GeometryFX_2017.vcxproj
================================================
DLL_DebugWin32DLL_Debugx64DLL_ReleaseWin32DLL_Releasex64Lib_DebugWin32Lib_Debugx64Lib_ReleaseWin32Lib_Releasex64DLL_Release_MTWin32DLL_Release_MTx64{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}trueWin32ProjAMD_GeometryFXAMD_GeometryFX8.1DynamicLibrarytrueUnicodev141DynamicLibrarytrueUnicodev141DynamicLibraryfalseUnicodev141DynamicLibraryfalseUnicodev141StaticLibrarytrueUnicodev141StaticLibrarytrueUnicodev141StaticLibraryfalseUnicodev141StaticLibraryfalseUnicodev141DynamicLibraryfalseUnicodev141DynamicLibraryfalseUnicodev141true..\lib\VS2017\Win32\DLL_Debug\VS2017\Win32\DLL_Debug\GPUOpen_GeometryFX_x86d.dlltrue..\lib\VS2017\x64\DLL_Debug\VS2017\x64\DLL_Debug\GPUOpen_GeometryFX_x64d.dllfalse..\lib\VS2017\Win32\DLL_Release\VS2017\Win32\DLL_Release\GPUOpen_GeometryFX_x86.dllfalse..\lib\VS2017\x64\DLL_Release\VS2017\x64\DLL_Release\GPUOpen_GeometryFX_x64.dll..\lib\VS2017\Win32\Lib_Debug\VS2017\Win32\Lib_Debug\GPUOpen_GeometryFX_x86d.lib..\lib\VS2017\x64\Lib_Debug\VS2017\x64\Lib_Debug\GPUOpen_GeometryFX_x64d.lib..\lib\VS2017\Win32\Lib_Release\VS2017\Win32\Lib_Release\GPUOpen_GeometryFX_x86.lib..\lib\VS2017\x64\Lib_Release\VS2017\x64\Lib_Release\GPUOpen_GeometryFX_x64.libfalse..\lib\VS2017\Win32\DLL_Release_MT\VS2017\Win32\DLL_Release_MT\GPUOpen_GeometryFX_x86.dllfalse..\lib\VS2017\x64\DLL_Release_MT\VS2017\x64\DLL_Release_MT\GPUOpen_GeometryFX_x64.dllNotUsingLevel4true_USRDLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;AMD_DLL_EXPORTS=1;WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)EditAndContinueDisabledfalsefalse/EHsc %(AdditionalOptions)Windowstruedxguid.lib;amd_ags_x86.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)..\lib\VS2017\Win32\DLL_Debug\GPUOpen_GeometryFX_x86d.libtruecopy /b "..\lib\VS2017\Win32\DLL_Debug\$(TargetName).lib" +,, "..\lib\VS2017\Win32\DLL_Debug\" > nul
xcopy "..\lib\VS2017\Win32\DLL_Debug\$(TargetName).dll" "..\lib" /H /R /Y > nul
xcopy "..\lib\VS2017\Win32\DLL_Debug\$(TargetName).lib" "..\lib" /H /R /Y > nulCopying build output to lib directory...NotUsingLevel4true_USRDLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;AMD_DLL_EXPORTS=1;WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)EditAndContinueDisabledfalsefalse/EHsc %(AdditionalOptions)Windowstruedxguid.lib;amd_ags_x64.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)..\lib\VS2017\x64\DLL_Debug\GPUOpen_GeometryFX_x64d.libtruecopy /b "..\lib\VS2017\x64\DLL_Debug\$(TargetName).lib" +,, "..\lib\VS2017\x64\DLL_Debug\" > nul
xcopy "..\lib\VS2017\x64\DLL_Debug\$(TargetName).dll" "..\lib" /H /R /Y > nul
xcopy "..\lib\VS2017\x64\DLL_Debug\$(TargetName).lib" "..\lib" /H /R /Y > nulCopying build output to lib directory...NotUsingLevel4true_USRDLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;AMD_DLL_EXPORTS=1;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)Fulltruetruefalsetruefalsefalse/EHsc %(AdditionalOptions)Windowstruetruedxguid.lib;amd_ags_x86.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)..\lib\VS2017\Win32\DLL_Release\GPUOpen_GeometryFX_x86.libtruecopy /b "..\lib\VS2017\Win32\DLL_Release\$(TargetName).lib" +,, "..\lib\VS2017\Win32\DLL_Release\" > nul
xcopy "..\lib\VS2017\Win32\DLL_Release\$(TargetName).dll" "..\lib" /H /R /Y > nul
xcopy "..\lib\VS2017\Win32\DLL_Release\$(TargetName).lib" "..\lib" /H /R /Y > nulCopying build output to lib directory...NotUsingLevel4true_USRDLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;AMD_DLL_EXPORTS=1;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)Fulltruetruefalsetruefalsefalse/EHsc %(AdditionalOptions)Windowstruetruedxguid.lib;amd_ags_x64.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)..\lib\VS2017\x64\DLL_Release\GPUOpen_GeometryFX_x64.libtruecopy /b "..\lib\VS2017\x64\DLL_Release\$(TargetName).lib" +,, "..\lib\VS2017\x64\DLL_Release\" > nul
xcopy "..\lib\VS2017\x64\DLL_Release\$(TargetName).dll" "..\lib" /H /R /Y > nul
xcopy "..\lib\VS2017\x64\DLL_Release\$(TargetName).lib" "..\lib" /H /R /Y > nulCopying build output to lib directory...NotUsingLevel4true_LIB;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=0;WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)EditAndContinueDisabledfalsefalse/EHsc %(AdditionalOptions)Windowstruedxguid.lib;amd_ags_x86.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)trueNotUsingLevel4true_LIB;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=0;WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)EditAndContinueDisabledfalsefalse/EHsc %(AdditionalOptions)Windowstruedxguid.lib;amd_ags_x64.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)trueNotUsingLevel4true_LIB;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=0;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)Fulltruetruefalsetruefalsefalse/EHsc %(AdditionalOptions)Windowstruetruedxguid.lib;amd_ags_x86.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)trueNotUsingLevel4true_LIB;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=0;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)Fulltruetruefalsetruefalsefalse/EHsc %(AdditionalOptions)Windowstruetruedxguid.lib;amd_ags_x64.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)trueNotUsingLevel4true_USRDLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;AMD_DLL_EXPORTS=1;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)FulltruetruefalsetrueMultiThreadedfalsefalse/EHsc %(AdditionalOptions)Windowstruetruedxguid.lib;amd_ags_x86.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)..\lib\VS2017\Win32\DLL_Release_MT\GPUOpen_GeometryFX_x86.libtruecopy /b "..\lib\VS2017\Win32\DLL_Release_MT\$(TargetName).lib" +,, "..\lib\VS2017\Win32\DLL_Release_MT\" > nul
xcopy "..\lib\VS2017\Win32\DLL_Release_MT\$(TargetName).dll" "..\lib" /H /R /Y > nul
xcopy "..\lib\VS2017\Win32\DLL_Release_MT\$(TargetName).lib" "..\lib" /H /R /Y > nulCopying build output to lib directory...NotUsingLevel4true_USRDLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;AMD_DLL_EXPORTS=1;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0601;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)..\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;%(AdditionalIncludeDirectories)FulltruetruefalsetrueMultiThreadedfalsefalse/EHsc %(AdditionalOptions)Windowstruetruedxguid.lib;amd_ags_x64.lib;%(AdditionalDependencies)..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)..\lib\VS2017\x64\DLL_Release_MT\GPUOpen_GeometryFX_x64.libtruecopy /b "..\lib\VS2017\x64\DLL_Release_MT\$(TargetName).lib" +,, "..\lib\VS2017\x64\DLL_Release_MT\" > nul
xcopy "..\lib\VS2017\x64\DLL_Release_MT\$(TargetName).dll" "..\lib" /H /R /Y > nul
xcopy "..\lib\VS2017\x64\DLL_Release_MT\$(TargetName).lib" "..\lib" /H /R /Y > nulCopying build output to lib directory...{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}
================================================
FILE: amd_geometryfx/build/AMD_GeometryFX_2017.vcxproj.filters
================================================
{1F80880B-8B89-887C-1405-9F7C800D947C}{2DAB880B-99B4-887C-2230-9F7C8E38947C}{06ADC7FB-7262-40F1-FB56-3AC8670B37F5}incincincsrcsrcsrcsrcsrcsrcsrcsrcsrcsrc\Shaders
================================================
FILE: amd_geometryfx/inc/AMD_GeometryFX.h
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef AMD_GEOMETRYFX_H
#define AMD_GEOMETRYFX_H
# define AMD_GEOMETRYFX_VERSION_MAJOR 1
# define AMD_GEOMETRYFX_VERSION_MINOR 2
# define AMD_GEOMETRYFX_VERSION_PATCH 1
// default to static lib
# ifndef AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB
# define AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB 0
# endif
# if AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB
# ifdef AMD_DLL_EXPORTS
# define AMD_GEOMETRYFX_DLL_API __declspec(dllexport)
# else // AMD_DLL_EXPORTS
# define AMD_GEOMETRYFX_DLL_API __declspec(dllimport)
# endif // AMD_DLL_EXPORTS
# else // AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB
# define AMD_GEOMETRYFX_DLL_API
# endif // AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB
#include "AMD_Types.h"
# if defined(DEBUG) || defined(_DEBUG)
# define AMD_GEOMETRYFX_DEBUG 1
# endif
namespace AMD
{
// The Return codes
typedef enum GEOMETRYFX_RETURN_CODE_t
{
GEOMETRYFX_RETURN_CODE_SUCCESS,
GEOMETRYFX_RETURN_CODE_FAIL,
GEOMETRYFX_RETURN_CODE_INVALID_ARGUMENT,
GEOMETRYFX_RETURN_CODE_INVALID_POINTER,
GEOMETRYFX_RETURN_CODE_D3D11_CALL_FAILED,
GEOMETRYFX_RETURN_CODE_COUNT,
} GEOMETRYFX_RETURN_CODE;
}
#endif // AMD_GEOMETRYFX_H
================================================
FILE: amd_geometryfx/inc/AMD_GeometryFX_Filtering.h
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef AMD_GEOMETRYFX_FILTERING_H
#define AMD_GEOMETRYFX_FILTERING_H
// VS2010 has a bug in the headers, where they collide on #defines
// include here to get rid of them
#include
#include
#include
#include
#include "AMD_GeometryFX.h"
namespace AMD
{
enum GEOMETRYFX_FILTER
{
GeometryFX_FilterDuplicateIndices = 0x1,
GeometryFX_FilterBackface = 0x2,
GeometryFX_FilterFrustum = 0x8,
GeometryFX_FilterSmallPrimitives = 0x20,
GeometryFX_ClusterFilterBackface = 0x1 << 10
};
struct GeometryFX_FilterStatistics
{
inline GeometryFX_FilterStatistics()
: trianglesProcessed(0)
, trianglesRendered(0)
, trianglesCulled(0)
, clustersProcessed (0)
, clustersRendered (0)
, clustersCulled (0)
{
}
int64 trianglesProcessed;
int64 trianglesRendered;
int64 trianglesCulled;
int64 clustersProcessed;
int64 clustersRendered;
int64 clustersCulled;
};
struct GeometryFX_FilterRenderOptions
{
inline GeometryFX_FilterRenderOptions()
: enableFiltering(true)
, enabledFilters(0xFF)
, statistics(nullptr)
{
}
/**
If filtering is disabled, the mesh will be rendered directly.
*/
bool enableFiltering;
/**
Specify which filters should be enabled.
*/
uint32 enabledFilters;
/**
If set, statistics counters will be enabled.
If enabled, queries will be issued along with each draw call significantly
reducing performance.
*/
GeometryFX_FilterStatistics *statistics;
};
struct GeometryFX_FilterDesc
{
inline GeometryFX_FilterDesc()
: pDevice(nullptr)
, maximumDrawCallCount(-1)
, emulateMultiIndirectDraw(false)
{
}
ID3D11Device *pDevice;
// This is only used if filtering is disabled. If set to -1, it assumes
// every mesh is drawn exactly once. If instancing is used, each instance
// counts as a separate draw call.
int maximumDrawCallCount;
// Emulate indirect draw. If the extension is present, it will be not used.
bool emulateMultiIndirectDraw;
};
/**
All resources created here will have names set using DXUT_SetDebugName with a
[AMD GeometryFX Filtering] prefix.
*/
class AMD_GEOMETRYFX_DLL_API GeometryFX_Filter
{
public:
struct Handle;
typedef Handle *MeshHandle;
GeometryFX_Filter(const GeometryFX_FilterDesc *pFilterDesc);
~GeometryFX_Filter();
/**
Register meshes for the static mesh renderer.
This function must be called exactly once.
@note This function may call functions on the ID3D11Device.
*/
std::vector RegisterMeshes(
const int meshCount, const int *pVerticesInMesh, const int *pIndicesInMesh);
/**
Set the data for a mesh.
RegisterMeshes() must have been called previously.
@note This function may call functions on the ID3D11Device and the
immediate context.
*/
void SetMeshData(const MeshHandle &handle, const void *pVertexData, const void *pIndexData);
/**
Start a render pass.
From here on, the context should no longer be used by the application
until EndRender() has been called.
@note If the multi-indirect-draw extension is present, the context must be
equal to the immediate context.
@note A render pass will change the D3D device state. In particular, the
following states will be changed:
- vertex shader, pixel shader and compute shader (the library assumes no
hull or domain shader is bound)
- resources bound to the vertex shader, pixel shader and compute shader
- the topology
*/
void BeginRender(ID3D11DeviceContext *pContext, const GeometryFX_FilterRenderOptions &options,
const DirectX::XMMATRIX &view, const DirectX::XMMATRIX &projection,
const int renderTargetWidth, const int renderTargetHeight);
/**
Render a mesh.
Only valid within a BeginRender/EndRender pair. This function will render
the mesh with the specified world matrix.
*/
void RenderMesh(const MeshHandle &handle, const DirectX::XMMATRIX &world);
/**
Render a mesh with instancing.
Only valid within a BeginRender/EndRender pair. This function will render
a number of instances, each with its own world matrix.
*/
void RenderMeshInstanced(
const MeshHandle &handle, const int instanceCount, const DirectX::XMMATRIX *pWorldMatrices);
/**
End a render pass.
This function will call functions on the context passed to BeginRender().
*/
void EndRender();
/**
Get the buffers for a mesh.
If a parameter is set to null, it won't be written.
*/
void GetBuffersForMesh(const MeshHandle &handle,
ID3D11Buffer **ppVertexBuffer,
int32 *pVertexOffset,
ID3D11Buffer **ppIndexBuffer,
int32 *pIndexOffset) const;
/**
Get info about a mesh.
*/
void GetMeshInfo(const MeshHandle &handle, int32 *pIndexCount) const;
private:
// Disable the copy constructor
GeometryFX_Filter(const GeometryFX_Filter &);
GeometryFX_Filter &operator=(const GeometryFX_Filter &);
struct GeometryFX_OpaqueFilterDesc;
GeometryFX_OpaqueFilterDesc *impl_;
};
} // namespace AMD
#endif // AMD_GEOMETRYFX_FILTERING_H
================================================
FILE: amd_geometryfx/inc/AMD_GeometryFX_Utility.h
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef AMD_GEOMETRYFX_UTILITY_H
#define AMD_GEOMETRYFX_UTILITY_H
#include
#include "AMD_GeometryFX.h"
namespace AMD
{
AMD_GEOMETRYFX_DLL_API GEOMETRYFX_RETURN_CODE GeometryFX_GetVersion(uint* major, uint* minor, uint* patch);
AMD_GEOMETRYFX_DLL_API void GeometryFX_WriteBlobToFile(const char *filename, const size_t size, const void *data);
AMD_GEOMETRYFX_DLL_API std::vector GeometryFX_ReadBlobFromFile(const char *filename);
} // namespace AMD
#endif // AMD_GEOMETRYFX_UTILITY_H
================================================
FILE: amd_geometryfx/premake/premake5.lua
================================================
_AMD_LIBRARY_NAME = "GeometryFX"
_AMD_LIBRARY_NAME_ALL_CAPS = string.upper(_AMD_LIBRARY_NAME)
-- Set _AMD_LIBRARY_NAME before including amd_premake_util.lua
dofile ("../../premake/amd_premake_util.lua")
workspace ("AMD_" .. _AMD_LIBRARY_NAME)
configurations { "DLL_Debug", "DLL_Release", "Lib_Debug", "Lib_Release", "DLL_Release_MT" }
platforms { "Win32", "x64" }
location "../build"
filename ("AMD_" .. _AMD_LIBRARY_NAME .. _AMD_VS_SUFFIX)
startproject ("AMD_" .. _AMD_LIBRARY_NAME)
filter "platforms:Win32"
system "Windows"
architecture "x86"
filter "platforms:x64"
system "Windows"
architecture "x64"
externalproject "AMD_LIB"
kind "StaticLib"
language "C++"
location "../../amd_lib/shared/d3d11/build"
filename ("AMD_LIB" .. _AMD_VS_SUFFIX)
uuid "0D2AEA47-7909-69E3-8221-F4B9EE7FCF44"
configmap {
["DLL_Debug"] = "Debug",
["DLL_Release"] = "Release",
["Lib_Debug"] = "Debug",
["Lib_Release"] = "Release",
["DLL_Release_MT"] = "Release_MT" }
project ("AMD_" .. _AMD_LIBRARY_NAME)
language "C++"
location "../build"
filename ("AMD_" .. _AMD_LIBRARY_NAME .. _AMD_VS_SUFFIX)
uuid "E05C77A9-1EE7-4F02-AF03-575FB4829AC5"
targetdir "../lib/%{_AMD_LIBRARY_DIR_LAYOUT}"
objdir "../build/%{_AMD_LIBRARY_DIR_LAYOUT}"
warnings "Extra"
exceptionhandling "Off"
rtti "Off"
-- Specify WindowsTargetPlatformVersion here for VS2015
systemversion (_AMD_WIN_SDK_VERSION)
files { "../inc/**.h", "../src/**.h", "../src/**.cpp", "../src/Shaders/**.hlsl" }
includedirs { "../inc", "../../amd_lib/shared/common/inc", "../../amd_lib/shared/d3d11/inc", "../../amd_lib/ags_lib/inc" }
links { "AMD_LIB", "dxguid" }
libdirs { "../../amd_lib/ags_lib/lib" }
filter "configurations:DLL_*"
kind "SharedLib"
defines { "_USRDLL", "AMD_%{_AMD_LIBRARY_NAME_ALL_CAPS}_COMPILE_DYNAMIC_LIB=1", "AMD_DLL_EXPORTS=1" }
-- Copy DLL and import library to the lib directory
postbuildcommands { amdLibPostbuildCommands() }
postbuildmessage "Copying build output to lib directory..."
filter "configurations:Lib_*"
kind "StaticLib"
defines { "_LIB", "AMD_%{_AMD_LIBRARY_NAME_ALL_CAPS}_COMPILE_DYNAMIC_LIB=0" }
filter "configurations:*_Debug"
defines { "WIN32", "_DEBUG", "_WINDOWS", "_WIN32_WINNT=0x0601" }
flags { "FatalWarnings" }
symbols "On"
characterset "Unicode"
-- add "d" to the end of the library name for debug builds
targetsuffix "d"
filter "configurations:*_Release"
defines { "WIN32", "NDEBUG", "_WINDOWS", "_WIN32_WINNT=0x0601" }
flags { "FatalWarnings" }
characterset "Unicode"
optimize "On"
filter "configurations:DLL_Release_MT"
defines { "WIN32", "NDEBUG", "_WINDOWS", "_WIN32_WINNT=0x0601" }
flags { "FatalWarnings" }
characterset "Unicode"
-- link against the static runtime to avoid introducing a dependency
-- on the particular version of Visual Studio used to build the DLLs
flags { "StaticRuntime" }
optimize "On"
filter "action:vs*"
-- specify exception handling model for Visual Studio to avoid
-- "'noexcept' used with no exception handling mode specified"
-- warning in vs2015
buildoptions { "/EHsc" }
filter "platforms:Win32"
targetname "%{_AMD_LIBRARY_PREFIX}%{_AMD_LIBRARY_NAME}_x86"
links { "amd_ags_x86" }
filter "platforms:x64"
targetname "%{_AMD_LIBRARY_PREFIX}%{_AMD_LIBRARY_NAME}_x64"
links { "amd_ags_x64" }
================================================
FILE: amd_geometryfx/src/AMD_GeometryFX_Filtering.cpp
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#include "AMD_GeometryFX_Filtering.h"
#include "Shaders/inc/AMD_GeometryFX_ClearDrawIndirectArgsCS.inc"
#include "Shaders/inc/AMD_GeometryFX_DepthOnlyVS.inc"
#include "Shaders/inc/AMD_GeometryFX_DepthOnlyMultiIndirectVS.inc"
#include "Shaders/inc/AMD_GeometryFX_FilterCS.inc"
// ComPtr
#include
#include
#include
#include
#include
#include
#include "GeometryFXMesh.h"
#include "GeometryFXMeshManager.h"
#include "amd_ags.h"
#include "GeometryFXUtility_Internal.h"
#include "AMD_GeometryFX_Internal.h"
#include
#undef min
#undef max
using namespace DirectX;
using namespace Microsoft::WRL;
namespace AMD
{
using namespace GeometryFX_Internal;
namespace
{
struct FilterContext
{
const GeometryFX_FilterRenderOptions *options;
XMMATRIX view;
XMMATRIX projection;
XMVECTOR eye;
int windowWidth;
int windowHeight;
};
#pragma pack(push, 1)
struct FrameConstantBuffer
{
XMMATRIX view;
XMMATRIX projection;
uint32 cullFlags;
uint32 width, height;
};
struct DrawCallArguments
{
XMMATRIX world;
XMMATRIX worldView;
uint32 meshIndex;
uint32 pad[3];
};
struct IndirectArguments
{
/**
Static function to ensure IndirectArguments remains a POD
*/
static void Init (IndirectArguments &ia)
{
ia.IndexCountPerInstance = 0;
ia.InstanceCount = 1;
ia.StartIndexLocation = 0;
ia.BaseVertexLocation = 0;
ia.StartInstanceLocation = 0;
}
uint32 IndexCountPerInstance;
uint32 InstanceCount;
uint32 StartIndexLocation;
int32 BaseVertexLocation;
uint32 StartInstanceLocation;
};
struct SmallBatchData
{
uint32 meshIndex; // Index into meshConstants
uint32 indexOffset; // Index relative to the meshConstants[meshIndex].indexOffset
uint32 faceCount; // Number of faces in this small batch
uint32 outputIndexOffset; // Offset into the output index buffer
uint32 drawIndex; // Index into the SmallBatchDrawCallTable
uint32 drawBatchStart; // First slot for the current draw call
};
#pragma pack(pop)
struct DrawCommand
{
inline DrawCommand ()
: mesh (nullptr)
, drawCallId (-1)
, firstTriangle (0)
{
}
DrawCallArguments dcb;
GeometryFX_Internal::StaticMesh *mesh;
int drawCallId;
int firstTriangle;
};
/**
One small batch chunk can accept multiple draw requests. Draw requests are
split into small batches of TRIANGLES_PER_SMALL_BATCH each. A draw request always
occupies consecutive slots. A draw request may be split if it does not fit
entirely into this small batch.
The filter then processes all small batches in this chunk in one go, and renders
them by using one indirect draw call per original draw request.
*/
class SmallBatchChunk
{
public:
SmallBatchChunk (ID3D11Device *device, bool emulateMultiDraw, AGSContext* agsContext)
: smallBatchDataBackingStore_ (SmallBatchMergeConstants::BATCH_COUNT)
, drawCallBackingStore_ (SmallBatchMergeConstants::BATCH_COUNT)
, agsContext_ (agsContext)
, currentBatchCount_ (0)
, currentDrawCallCount_ (0)
, faceCount_ (0)
, useMultiIndirectDraw_ (!emulateMultiDraw)
{
CreateFilteredIndexBuffer (device);
CreateSmallBatchDataBuffer (device);
CreateIndirectDrawArgumentsBuffer (device);
CreateDrawCallArgumentsBuffer (device);
CreateInstanceIdBuffer (device);
}
/**
If true is returned, then remainder has been filled and must be
re-submitted. Otherwise, the whole request has been handled by this small
batch.
*/
bool AddRequest (const DrawCommand &request, DrawCommand &remainder,
FilterContext &filterContext)
{
if (currentDrawCallCount_ == SmallBatchMergeConstants::BATCH_COUNT)
{
remainder = request;
return true;
}
assert (request.firstTriangle >= 0);
int firstTriangle = request.firstTriangle;
const int firstCluster = firstTriangle / SmallBatchMergeConstants::BATCH_SIZE;
int currentCluster = firstCluster;
int lastTriangle = firstTriangle;
const int filteredIndexBufferStartOffset =
currentBatchCount_ * SmallBatchMergeConstants::BATCH_SIZE * 3 * sizeof (int);
const int firstBatch = currentBatchCount_;
// We move the eye position into object space, so we don't have to
// transform the cone into world space all the time
// This matrix inversion will happen once every 2^16 triangles on
// average; and saves us transforming the cone every 256 triangles
const auto eye = DirectX::XMVector4Transform (filterContext.eye, XMMatrixInverse (nullptr, request.dcb.world));
// Try to assign batches until we run out of batches or geometry
for (int i = currentBatchCount_; i < SmallBatchMergeConstants::BATCH_COUNT; ++i)
{
lastTriangle = std::min (
firstTriangle + SmallBatchMergeConstants::BATCH_SIZE, request.mesh->faceCount);
assert (currentCluster < static_cast(request.mesh->clusters.size ()));
const auto& clusterInfo = request.mesh->clusters[currentCluster];
++currentCluster;
bool cullCluster = false;
if (((filterContext.options->enabledFilters & GeometryFX_ClusterFilterBackface) != 0) && clusterInfo.valid)
{
const auto testVec = DirectX::XMVector3Normalize (DirectX::XMVectorSubtract (eye, clusterInfo.coneCenter));
// Check if we're inside the cone
if (DirectX::XMVectorGetX (DirectX::XMVector3Dot (testVec, clusterInfo.coneAxis)) > clusterInfo.coneAngleCosine)
{
cullCluster = true;
}
}
if (!cullCluster)
{
auto &smallBatchData = smallBatchDataBackingStore_[currentBatchCount_];
smallBatchData.drawIndex = currentDrawCallCount_;
smallBatchData.faceCount = lastTriangle - firstTriangle;
// Offset relative to the start of the mesh
smallBatchData.indexOffset = firstTriangle * 3 * sizeof (int);
smallBatchData.outputIndexOffset = filteredIndexBufferStartOffset;
smallBatchData.meshIndex = request.dcb.meshIndex;
smallBatchData.drawBatchStart = firstBatch;
faceCount_ += smallBatchData.faceCount;
++currentBatchCount_;
}
firstTriangle += SmallBatchMergeConstants::BATCH_SIZE;
if (lastTriangle == request.mesh->faceCount)
{
break;
}
}
if (filterContext.options->statistics)
{
filterContext.options->statistics->clustersProcessed +=
currentCluster - firstCluster;
filterContext.options->statistics->clustersRendered +=
currentBatchCount_ - firstBatch;
filterContext.options->statistics->clustersCulled +=
filterContext.options->statistics->clustersProcessed - filterContext.options->statistics->clustersRendered;
}
if (currentBatchCount_ > firstBatch)
{
drawCallBackingStore_[currentDrawCallCount_] = request.dcb;
++currentDrawCallCount_;
}
// Check if the draw command fit into this call, if not, create a remainder
if (lastTriangle < request.mesh->faceCount)
{
remainder = request;
assert (lastTriangle >= 0);
remainder.firstTriangle = lastTriangle;
return true;
}
else
{
return false;
}
}
void Render (ID3D11DeviceContext *context, ID3D11ComputeShader *computeClearShader,
ID3D11ComputeShader *filterShader, ID3D11VertexShader *vertexShader,
ID3D11ShaderResourceView *vertexData, ID3D11ShaderResourceView *indexData,
ID3D11ShaderResourceView *meshConstantData, ID3D11Buffer *globalVertexBuffer,
ID3D11Buffer *perFrameConstantBuffer)
{
ClearIndirectArgsBuffer (context, computeClearShader);
UpdateDrawCallAndSmallBatchBuffers (context);
Filter (context, filterShader, vertexData, indexData, meshConstantData,
perFrameConstantBuffer);
context->VSSetShader (vertexShader, nullptr, 0);
context->IASetIndexBuffer (filteredIndexBuffer_.Get (), DXGI_FORMAT_R32_UINT, 0);
context->IASetPrimitiveTopology (D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
ID3D11Buffer *iaVBs[] = { globalVertexBuffer, instanceIdBuffer_.Get () };
UINT vbOffsets[] = { 0, 0 };
UINT vbStrides[] = { sizeof (float) * 3, sizeof (int) };
context->IASetVertexBuffers (0, 2, iaVBs, vbStrides, vbOffsets);
ID3D11ShaderResourceView *srvs[] = { drawCallSRV_.Get () };
context->VSSetShaderResources (3, 1, srvs);
if (agsContext_ && useMultiIndirectDraw_)
{
agsDriverExtensions_MultiDrawIndexedInstancedIndirect (agsContext_,
currentDrawCallCount_,
indirectArgumentsBuffer_.Get (), 0, sizeof (IndirectArguments));
}
else
{
for (int i = 0; i < currentDrawCallCount_; ++i)
{
context->DrawIndexedInstancedIndirect (
indirectArgumentsBuffer_.Get (), sizeof (IndirectArguments) * i);
}
}
context->IASetIndexBuffer (nullptr, DXGI_FORMAT_R32_UINT, 0);
Reset ();
}
int GetFaceCount () const
{
return faceCount_;
}
private:
void Filter (ID3D11DeviceContext *context, ID3D11ComputeShader *filterShader,
ID3D11ShaderResourceView *vertexData, ID3D11ShaderResourceView *indexData,
ID3D11ShaderResourceView *meshConstantData, ID3D11Buffer *perFrameConstantBuffer) const
{
ID3D11ShaderResourceView *csSRVs[] = { vertexData, indexData, meshConstantData, drawCallSRV_.Get (), smallBatchDataSRV_.Get () };
context->CSSetShaderResources (0, 5, csSRVs);
UINT initialCounts[] = { 0, 0 };
ID3D11UnorderedAccessView *csUAVs[] = { filteredIndexUAV_.Get (), indirectArgumentsUAV_.Get () };
context->CSSetUnorderedAccessViews (0, 2, csUAVs, initialCounts);
ID3D11Buffer *csCBs[] = { perFrameConstantBuffer };
context->CSSetConstantBuffers (1, 1, csCBs);
context->CSSetShader (filterShader, nullptr, 0);
context->Dispatch (currentBatchCount_, 1, 1);
csUAVs[0] = nullptr;
csUAVs[1] = nullptr;
context->CSSetUnorderedAccessViews (0, 2, csUAVs, initialCounts);
}
void UpdateDrawCallAndSmallBatchBuffers (ID3D11DeviceContext *context) const
{
D3D11_MAPPED_SUBRESOURCE mapping;
context->Map (smallBatchDataBuffer_.Get (), 0, D3D11_MAP_WRITE_DISCARD, 0, &mapping);
::memcpy (mapping.pData, smallBatchDataBackingStore_.data (),
sizeof (SmallBatchData) * smallBatchDataBackingStore_.size ());
context->Unmap (smallBatchDataBuffer_.Get (), 0);
context->Map (drawCallBuffer_.Get (), 0, D3D11_MAP_WRITE_DISCARD, 0, &mapping);
::memcpy (mapping.pData, drawCallBackingStore_.data (),
sizeof (DrawCallArguments) * drawCallBackingStore_.size ());
context->Unmap (drawCallBuffer_.Get (), 0);
}
void CreateFilteredIndexBuffer (ID3D11Device *device)
{
D3D11_BUFFER_DESC filteredIndexBufferDesc = {};
filteredIndexBufferDesc.BindFlags = D3D11_BIND_INDEX_BUFFER | D3D11_BIND_UNORDERED_ACCESS;
filteredIndexBufferDesc.ByteWidth = SmallBatchMergeConstants::BATCH_COUNT *
SmallBatchMergeConstants::BATCH_SIZE *
(sizeof (int) * 3);
filteredIndexBufferDesc.CPUAccessFlags = 0;
filteredIndexBufferDesc.MiscFlags = 0;
filteredIndexBufferDesc.Usage = D3D11_USAGE_DEFAULT;
device->CreateBuffer (&filteredIndexBufferDesc, nullptr, &filteredIndexBuffer_);
SetDebugName (filteredIndexBuffer_.Get (), "[AMD GeometryFX Filtering] Filtered index buffer [%p]", this);
D3D11_UNORDERED_ACCESS_VIEW_DESC fibUav = {};
fibUav.Buffer.FirstElement = 0;
fibUav.Buffer.Flags = 0;
fibUav.Buffer.NumElements =
SmallBatchMergeConstants::BATCH_COUNT * SmallBatchMergeConstants::BATCH_SIZE * 3;
fibUav.Format = DXGI_FORMAT_R32_UINT;
fibUav.ViewDimension = D3D11_UAV_DIMENSION_BUFFER;
device->CreateUnorderedAccessView (filteredIndexBuffer_.Get (), &fibUav, &filteredIndexUAV_);
SetDebugName (filteredIndexUAV_.Get (), "[AMD GeometryFX Filtering] Filtered index buffer UAV [%p]", this);
}
void CreateSmallBatchDataBuffer (ID3D11Device *device)
{
D3D11_BUFFER_DESC smallBatchDataBufferDesc;
smallBatchDataBufferDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
smallBatchDataBufferDesc.ByteWidth =
SmallBatchMergeConstants::BATCH_COUNT * sizeof (SmallBatchData);
smallBatchDataBufferDesc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;
smallBatchDataBufferDesc.StructureByteStride = sizeof (SmallBatchData);
smallBatchDataBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
smallBatchDataBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
device->CreateBuffer (&smallBatchDataBufferDesc, nullptr, &smallBatchDataBuffer_);
SetDebugName (smallBatchDataBuffer_.Get (), "[AMD GeometryFX Filtering] Batch data buffer [%p]", this);
D3D11_SHADER_RESOURCE_VIEW_DESC smallBatchDataSRVDesc;
smallBatchDataSRVDesc.Buffer.FirstElement = 0;
smallBatchDataSRVDesc.Buffer.NumElements = SmallBatchMergeConstants::BATCH_COUNT;
smallBatchDataSRVDesc.Format = DXGI_FORMAT_UNKNOWN;
smallBatchDataSRVDesc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;
device->CreateShaderResourceView (
smallBatchDataBuffer_.Get (), &smallBatchDataSRVDesc, &smallBatchDataSRV_);
SetDebugName (smallBatchDataSRV_.Get (), "[AMD GeometryFX Filtering] Batch data buffer SRV [%p]", this);
}
void CreateIndirectDrawArgumentsBuffer (ID3D11Device *device)
{
D3D11_BUFFER_DESC indirectArgumentsBufferDesc;
indirectArgumentsBufferDesc.BindFlags = D3D11_BIND_UNORDERED_ACCESS;
indirectArgumentsBufferDesc.MiscFlags = D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS;
indirectArgumentsBufferDesc.ByteWidth =
sizeof (IndirectArguments) * SmallBatchMergeConstants::BATCH_COUNT;
indirectArgumentsBufferDesc.StructureByteStride = sizeof (IndirectArguments);
indirectArgumentsBufferDesc.CPUAccessFlags = 0;
indirectArgumentsBufferDesc.Usage = D3D11_USAGE_DEFAULT;
std::vector indirectArgs (SmallBatchMergeConstants::BATCH_COUNT);
for (int i = 0; i < SmallBatchMergeConstants::BATCH_COUNT; ++i)
{
IndirectArguments::Init (indirectArgs[i]);
}
D3D11_SUBRESOURCE_DATA indirectArgumentsBufferData;
indirectArgumentsBufferData.pSysMem = indirectArgs.data ();
indirectArgumentsBufferData.SysMemPitch =
static_cast(sizeof (IndirectArguments) * indirectArgs.size ());
indirectArgumentsBufferData.SysMemSlicePitch = indirectArgumentsBufferData.SysMemPitch;
device->CreateBuffer (
&indirectArgumentsBufferDesc, &indirectArgumentsBufferData, &indirectArgumentsBuffer_);
SetDebugName (indirectArgumentsBuffer_.Get (), "[AMD GeometryFX Filtering] Indirect arguments buffer [%p]", this);
D3D11_UNORDERED_ACCESS_VIEW_DESC indirectArgsUAVDesc = {};
indirectArgsUAVDesc.Buffer.FirstElement = 0;
indirectArgsUAVDesc.Buffer.NumElements = SmallBatchMergeConstants::BATCH_COUNT * 5;
indirectArgsUAVDesc.Format = DXGI_FORMAT_R32_UINT;
indirectArgsUAVDesc.ViewDimension = D3D11_UAV_DIMENSION_BUFFER;
device->CreateUnorderedAccessView (
indirectArgumentsBuffer_.Get (), &indirectArgsUAVDesc, &indirectArgumentsUAV_);
SetDebugName (indirectArgumentsUAV_.Get (), "[AMD GeometryFX Filtering] Indirect arguments buffer UAV [%p]", this);
}
void CreateDrawCallArgumentsBuffer (ID3D11Device *device)
{
D3D11_BUFFER_DESC drawCallBufferDesc;
drawCallBufferDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
drawCallBufferDesc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;
drawCallBufferDesc.ByteWidth =
sizeof (DrawCallArguments) * SmallBatchMergeConstants::BATCH_COUNT;
drawCallBufferDesc.StructureByteStride = sizeof (DrawCallArguments);
drawCallBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
drawCallBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
device->CreateBuffer (&drawCallBufferDesc, nullptr, &drawCallBuffer_);
SetDebugName (drawCallBuffer_.Get (), "[AMD GeometryFX Filtering] Draw arguments buffer [%p]", this);
D3D11_SHADER_RESOURCE_VIEW_DESC drawCallSRVDesc;
drawCallSRVDesc.Buffer.FirstElement = 0;
drawCallSRVDesc.Buffer.NumElements = SmallBatchMergeConstants::BATCH_COUNT;
drawCallSRVDesc.Format = DXGI_FORMAT_UNKNOWN;
drawCallSRVDesc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;
device->CreateShaderResourceView (drawCallBuffer_.Get (), &drawCallSRVDesc, &drawCallSRV_);
SetDebugName (drawCallSRV_.Get (), "[AMD GeometryFX Filtering] Draw arguments buffer SRV [%p]", this);
}
/**
The instance ID buffer is our workaround for not having gl_DrawID in D3D.
The buffer simply contains 0, 1, 2, 3 ..., and is bound with a per-instance
rate of 1.
*/
void CreateInstanceIdBuffer (ID3D11Device *device)
{
D3D11_BUFFER_DESC instanceIdBufferDesc = {};
instanceIdBufferDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
instanceIdBufferDesc.ByteWidth = sizeof (int) * SmallBatchMergeConstants::BATCH_COUNT;
instanceIdBufferDesc.StructureByteStride = sizeof (int);
instanceIdBufferDesc.Usage = D3D11_USAGE_IMMUTABLE;
std::vector ids (SmallBatchMergeConstants::BATCH_COUNT);
std::iota (ids.begin (), ids.end (), 0);
D3D11_SUBRESOURCE_DATA data;
data.pSysMem = ids.data ();
data.SysMemPitch = instanceIdBufferDesc.ByteWidth;
data.SysMemSlicePitch = data.SysMemPitch;
device->CreateBuffer (&instanceIdBufferDesc, &data, &instanceIdBuffer_);
SetDebugName (instanceIdBuffer_.Get (), "[AMD GeometryFX Filtering] Instance ID buffer [%p]", this);
}
void Reset ()
{
currentBatchCount_ = 0;
currentDrawCallCount_ = 0;
faceCount_ = 0;
}
void ClearIndirectArgsBuffer (
ID3D11DeviceContext *context, ID3D11ComputeShader *computeClearShader) const
{
ID3D11UnorderedAccessView *uavViews[] = { indirectArgumentsUAV_.Get () };
UINT initialCounts[] = { 0 };
context->CSSetUnorderedAccessViews (1, 1, uavViews, initialCounts);
context->CSSetShader (computeClearShader, nullptr, 0);
context->Dispatch (currentBatchCount_, 1, 1);
uavViews[0] = nullptr;
context->CSSetUnorderedAccessViews (0, 1, uavViews, initialCounts);
}
ComPtr smallBatchDataBuffer_;
ComPtr smallBatchDataSRV_;
ComPtr filteredIndexBuffer_;
ComPtr filteredIndexUAV_;
ComPtr indirectArgumentsBuffer_;
ComPtr indirectArgumentsUAV_;
ComPtr drawCallBuffer_;
ComPtr drawCallSRV_;
std::vector> drawCallConstantBuffers_;
ComPtr drawCallConstantBufferMerged_;
ComPtr instanceIdBuffer_;
std::vector smallBatchDataBackingStore_;
std::vector drawCallBackingStore_;
int currentBatchCount_;
int currentDrawCallCount_;
int faceCount_;
bool useMultiIndirectDraw_;
AGSContext* agsContext_;
};
}
struct GeometryFX_Filter::Handle
{
Handle()
: index(-1)
, mesh(nullptr)
{
}
Handle(int index)
: index(index)
, mesh(nullptr)
{
}
int index;
GeometryFX_Internal::StaticMesh *mesh;
};
struct GeometryFX_Filter::GeometryFX_OpaqueFilterDesc
{
enum SMALL_BATCH_CHUNK
{
SMALL_BATCH_CHUNK_COUNT = 16
};
public:
void *operator new (size_t sz) throw()
{
return _aligned_malloc(sz, 16);
}
void operator delete (void *p) throw()
{
_aligned_free(p);
}
GeometryFX_OpaqueFilterDesc(const GeometryFX_FilterDesc &createInfo)
: device_(createInfo.pDevice)
, maxDrawCallCount_(createInfo.maximumDrawCallCount)
, emulateMultiDrawIndirect_(false)
, currentDrawCall_(0)
, deviceContext_(nullptr)
{
CreateQueries();
CreateConstantBuffers();
CreateShaders();
meshManager_ = GeometryFX_Internal::CreateGlobalMeshManager();
agsContext_ = nullptr;
if (agsInit(&agsContext_, nullptr, nullptr) == AGS_SUCCESS)
{
unsigned int supportedExtensions = 0;
agsDriverExtensions_Init(agsContext_, device_, &supportedExtensions);
if ((supportedExtensions & AGS_EXTENSION_MULTIDRAWINDIRECT) == 0)
{
OutputDebugString(TEXT("AGS initialized but multi draw extension not supported"));
agsDriverExtensions_DeInit(agsContext_);
agsDeInit(agsContext_);
agsContext_ = nullptr;
}
if (createInfo.emulateMultiIndirectDraw)
{
OutputDebugString(TEXT("Multi draw extension supported but ignored"));
emulateMultiDrawIndirect_ = true;
}
}
}
~GeometryFX_OpaqueFilterDesc()
{
if (agsContext_)
{
agsDriverExtensions_DeInit(agsContext_);
agsDeInit(agsContext_);
}
}
std::vector RegisterMeshes(
const int meshCount, const int *verticesInMesh, const int *indicesInMesh)
{
handles_.resize(meshCount);
for (int i = 0; i < meshCount; ++i)
{
handles_[i].reset(new Handle(i));
}
meshManager_->Allocate(device_, meshCount, verticesInMesh, indicesInMesh);
for (int i = 0; i < meshCount; ++i)
{
handles_[i]->mesh = meshManager_->GetMesh(i);
}
CreateIndirectDrawArgumentsBuffer(meshCount, indicesInMesh, verticesInMesh);
if (maxDrawCallCount_ == -1)
{
maxDrawCallCount_ = static_cast(meshManager_->GetMeshCount());
}
CreateDrawCallConstantBuffers();
for (int i = 0; i < SMALL_BATCH_CHUNK_COUNT; ++i)
{
smallBatchChunks_.emplace_back(
new SmallBatchChunk(device_, emulateMultiDrawIndirect_, agsContext_));
}
std::vector result;
result.reserve(handles_.size());
for (std::vector>::iterator it = handles_.begin(),
end = handles_.end();
it != end; ++it)
{
result.push_back(it->get());
}
return result;
}
void SetMeshData(const MeshHandle &handle, const void *vertexData, const void *indexData)
{
ComPtr deviceContext;
device_->GetImmediateContext(&deviceContext);
meshManager_->SetData(device_, deviceContext.Get(), handle->index, vertexData, indexData);
}
void BeginRender(ID3D11DeviceContext *context, const FilterContext &filterContext)
{
deviceContext_ = context;
filterContext_ = filterContext;
currentDrawCall_ = 0;
if (filterContext.options->statistics)
{
*filterContext.options->statistics = GeometryFX_FilterStatistics();
}
drawCommands_.clear();
frameConstantBufferBackingStore_.view = filterContext.view;
frameConstantBufferBackingStore_.projection = filterContext.projection;
frameConstantBufferBackingStore_.height = filterContext.windowHeight;
frameConstantBufferBackingStore_.width = filterContext.windowWidth;
frameConstantBufferBackingStore_.cullFlags = filterContext.options->enabledFilters;
D3D11_MAPPED_SUBRESOURCE mapping;
context->Map(frameConstantBuffer_.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &mapping);
::memcpy(mapping.pData, &frameConstantBufferBackingStore_,
sizeof(frameConstantBufferBackingStore_));
context->Unmap(frameConstantBuffer_.Get(), 0);
context->PSSetShader(nullptr, NULL, 0);
}
void RenderMeshInstanced(
const MeshHandle &handle, const int count, const DirectX::XMMATRIX *worldMatrices)
{
assert(deviceContext_);
for (int i = 0; i < count; ++i)
{
DrawCommand request;
request.mesh = handle->mesh;
request.dcb.world = worldMatrices[i];
request.dcb.worldView = worldMatrices[i] * filterContext_.view;
request.dcb.meshIndex = handle->index;
request.drawCallId = currentDrawCall_;
if (!filterContext_.options->enableFiltering)
{
D3D11_MAPPED_SUBRESOURCE mapping;
deviceContext_->Map(drawCallConstantBuffers_[currentDrawCall_].Get(), 0,
D3D11_MAP_WRITE_DISCARD, 0, &mapping);
::memcpy(mapping.pData, &request.dcb, sizeof(request.dcb));
deviceContext_->Unmap(drawCallConstantBuffers_[currentDrawCall_].Get(), 0);
}
drawCommands_.push_back(request);
++currentDrawCall_;
}
}
void EndRender()
{
// Set this up for all vertex shaders
ID3D11Buffer *constantBuffers[] = { frameConstantBuffer_.Get() };
deviceContext_->VSSetConstantBuffers(1, 1, constantBuffers);
if (filterContext_.options->enableFiltering)
{
RenderGeometryChunked(deviceContext_, filterContext_);
}
else
{
RenderGeometryDefault(deviceContext_, filterContext_);
}
deviceContext_ = nullptr;
}
void GetBuffersForMesh(const MeshHandle &handle, ID3D11Buffer **vertexBuffer,
int32 *vertexOffset, ID3D11Buffer **indexBuffer, int32 *indexOffset) const
{
const auto &mesh = handle->mesh;
if (vertexBuffer)
{
*vertexBuffer = mesh->vertexBuffer.Get();
}
if (vertexOffset)
{
*vertexOffset = mesh->vertexOffset;
}
if (indexBuffer)
{
*indexBuffer = mesh->indexBuffer.Get();
}
if (indexOffset)
{
*indexOffset = mesh->indexOffset;
}
}
void GetMeshInfo(const MeshHandle &handle, int32 *indexCount) const
{
if (indexCount)
{
*indexCount = handle->mesh->indexCount;
}
}
private:
bool emulateMultiDrawIndirect_;
AGSContext* agsContext_;
std::vector> handles_;
std::unique_ptr meshManager_;
std::vector> drawCallConstantBuffers_;
int currentDrawCall_;
int maxDrawCallCount_;
std::vector drawCommands_;
ID3D11DeviceContext *deviceContext_;
FilterContext filterContext_;
ComPtr pipelineQuery_;
ID3D11Device *device_;
FrameConstantBuffer frameConstantBufferBackingStore_;
ComPtr frameConstantBuffer_;
ComPtr filterComputeShader_;
std::vector> smallBatchChunks_;
ComPtr clearDrawIndirectArgumentsComputeShader_;
ComPtr indirectArgumentsBuffer_;
ComPtr indirectArgumentsBufferPristine_;
ComPtr indirectArgumentsUAV_;
ComPtr depthOnlyLayout_;
ComPtr depthOnlyVertexShader_;
ComPtr depthOnlyLayoutMID_;
ComPtr depthOnlyVertexShaderMID_;
void CreateShaders()
{
depthOnlyVertexShader_ = ComPtr();
depthOnlyLayout_ = ComPtr();
depthOnlyVertexShaderMID_ = ComPtr();
depthOnlyLayoutMID_ = ComPtr();
filterComputeShader_ = ComPtr();
clearDrawIndirectArgumentsComputeShader_ = ComPtr();
static const D3D11_INPUT_ELEMENT_DESC depthOnlyLayout[] =
{
{ "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 }
};
CreateShader(device_, (ID3D11DeviceChild **)depthOnlyVertexShader_.GetAddressOf(),
sizeof(AMD_GeometryFX_DepthOnlyVS), AMD_GeometryFX_DepthOnlyVS, ShaderType::Vertex, &depthOnlyLayout_,
ARRAYSIZE(depthOnlyLayout), depthOnlyLayout);
static const D3D11_INPUT_ELEMENT_DESC depthOnlyLayoutMID[] =
{
{ "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "DRAWID", 0, DXGI_FORMAT_R32_UINT, 1, 0, D3D11_INPUT_PER_INSTANCE_DATA, 1 }
};
CreateShader(device_, (ID3D11DeviceChild **)depthOnlyVertexShaderMID_.GetAddressOf(),
sizeof(AMD_GeometryFX_DepthOnlyMultiIndirectVS), AMD_GeometryFX_DepthOnlyMultiIndirectVS,
ShaderType::Vertex, &depthOnlyLayoutMID_, ARRAYSIZE(depthOnlyLayoutMID),
depthOnlyLayoutMID);
CreateShader(device_,
(ID3D11DeviceChild **)clearDrawIndirectArgumentsComputeShader_.GetAddressOf(),
sizeof(AMD_GeometryFX_ClearDrawIndirectArgsCS), AMD_GeometryFX_ClearDrawIndirectArgsCS,
ShaderType::Compute);
CreateShader(device_, (ID3D11DeviceChild **)filterComputeShader_.GetAddressOf(),
sizeof(AMD_GeometryFX_FilterCS), AMD_GeometryFX_FilterCS, ShaderType::Compute);
}
void CreateIndirectDrawArgumentsBuffer(
const int meshCount, const int *indicesInMesh, const int * /* verticesInMesh */)
{
D3D11_BUFFER_DESC indirectArgsBufferDesc = {};
indirectArgsBufferDesc.BindFlags = D3D11_BIND_UNORDERED_ACCESS;
const int roundedIndirectArgsCount = RoundToNextMultiple(meshCount, 256);
// Round to multiples of 256 so the clear shader doesn't have to test
// bounds
indirectArgsBufferDesc.ByteWidth = sizeof(IndirectArguments) * roundedIndirectArgsCount;
indirectArgsBufferDesc.MiscFlags = D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS;
indirectArgsBufferDesc.Usage = D3D11_USAGE_DEFAULT;
indirectArgsBufferDesc.StructureByteStride = sizeof(IndirectArguments);
std::vector indirectArgs(roundedIndirectArgsCount);
for (int i = 0; i < meshCount; ++i)
{
IndirectArguments::Init(indirectArgs[i]);
indirectArgs[i].IndexCountPerInstance = indicesInMesh[i];
}
D3D11_SUBRESOURCE_DATA indirectArgsData;
indirectArgsData.pSysMem = indirectArgs.data();
indirectArgsData.SysMemPitch =
static_cast(indirectArgs.size() * sizeof(IndirectArguments));
indirectArgsData.SysMemSlicePitch = indirectArgsData.SysMemPitch;
device_->CreateBuffer(
&indirectArgsBufferDesc, &indirectArgsData, &indirectArgumentsBuffer_);
device_->CreateBuffer(
&indirectArgsBufferDesc, &indirectArgsData, &indirectArgumentsBufferPristine_);
SetDebugName(indirectArgumentsBuffer_.Get(), "[AMD GeometryFX Filtering] IndirectArgumentBuffer");
SetDebugName(indirectArgumentsBufferPristine_.Get(),
"[AMD GeometryFX Filtering] IndirectArgumentBuffer pristine version");
D3D11_UNORDERED_ACCESS_VIEW_DESC indirectArgsUAVDesc = {};
indirectArgsUAVDesc.Buffer.FirstElement = 0;
indirectArgsUAVDesc.Buffer.NumElements = static_cast(meshCount * 5);
indirectArgsUAVDesc.Format = DXGI_FORMAT_R32_UINT;
indirectArgsUAVDesc.ViewDimension = D3D11_UAV_DIMENSION_BUFFER;
device_->CreateUnorderedAccessView(
indirectArgumentsBuffer_.Get(), &indirectArgsUAVDesc, &indirectArgumentsUAV_);
}
void CreateDrawCallConstantBuffers()
{
drawCallConstantBuffers_.resize(maxDrawCallCount_);
for (int i = 0; i < maxDrawCallCount_; ++i)
{
D3D11_BUFFER_DESC cbDesc;
ZeroMemory(&cbDesc, sizeof(cbDesc));
cbDesc.Usage = D3D11_USAGE_DYNAMIC;
cbDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
cbDesc.ByteWidth = sizeof(DrawCallArguments);
cbDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
device_->CreateBuffer(&cbDesc, NULL, &drawCallConstantBuffers_[i]);
SetDebugName(
drawCallConstantBuffers_[i].Get(), "[AMD GeometryFX Filtering] Draw call constant buffer [%d]", i);
}
}
void CreateQueries()
{
D3D11_QUERY_DESC queryDesc;
queryDesc.MiscFlags = 0;
queryDesc.Query = D3D11_QUERY_PIPELINE_STATISTICS;
device_->CreateQuery(&queryDesc, &pipelineQuery_);
}
void CreateConstantBuffers()
{
D3D11_BUFFER_DESC cbDesc;
ZeroMemory(&cbDesc, sizeof(cbDesc));
cbDesc.Usage = D3D11_USAGE_DYNAMIC;
cbDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
cbDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
cbDesc.ByteWidth = sizeof(FrameConstantBuffer);
device_->CreateBuffer(&cbDesc, NULL, &frameConstantBuffer_);
SetDebugName(frameConstantBuffer_.Get(), "[AMD GeometryFX Filtering] PerFrameConstantBuffer");
}
void ClearIndirectArgsBuffer(ID3D11DeviceContext *context) const
{
ID3D11UnorderedAccessView *uavViews[] = { indirectArgumentsUAV_.Get() };
UINT initialCounts[] = { 0 };
context->CSSetUnorderedAccessViews(1, 1, uavViews, initialCounts);
context->CSSetShader(clearDrawIndirectArgumentsComputeShader_.Get(), nullptr, 0);
context->Dispatch(
static_cast(RoundToNextMultiple(meshManager_->GetMeshCount(), 256)), 1, 1);
uavViews[0] = nullptr;
context->CSSetUnorderedAccessViews(0, 1, uavViews, initialCounts);
}
void RenderGeometryDefault(ID3D11DeviceContext *context, FilterContext & /* filterContext */) const
{
assert(context);
ComPtr annotation;
context->QueryInterface(IID_PPV_ARGS(&annotation)); // QueryInterface can fail with E_NOINTERFACE
context->IASetInputLayout(depthOnlyLayout_.Get());
context->VSSetShader(depthOnlyVertexShader_.Get(), NULL, 0);
context->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
if (annotation.Get() != nullptr)
{
annotation->BeginEvent(L"Depth pass");
}
for (std::vector::const_iterator it = drawCommands_.begin(),
end = drawCommands_.end();
it != end; ++it)
{
ID3D11Buffer *vertexBuffers[] = { it->mesh->vertexBuffer.Get() };
UINT strides[] = { sizeof(float) * 3 };
UINT offsets[] = { static_cast(it->mesh->vertexOffset) };
context->IASetVertexBuffers(0, 1, vertexBuffers, strides, offsets);
context->IASetIndexBuffer(
it->mesh->indexBuffer.Get(), DXGI_FORMAT_R32_UINT, it->mesh->indexOffset);
ID3D11Buffer *constantBuffers[] = { drawCallConstantBuffers_[it->drawCallId].Get() };
context->VSSetConstantBuffers(0, 1, constantBuffers);
context->DrawIndexed(it->mesh->indexCount, 0, 0);
}
if (annotation.Get() != nullptr)
{
annotation->EndEvent();
}
}
void RenderGeometryChunked(ID3D11DeviceContext *context, FilterContext &filterContext) const
{
if (drawCommands_.empty())
{
return;
}
ComPtr annotation;
context->QueryInterface(IID_PPV_ARGS(&annotation)); // QueryInterface can fail with E_NOINTERFACE
int currentSmallBatchChunk = 0;
context->IASetInputLayout(depthOnlyLayoutMID_.Get());
ID3D11VertexShader *vertexShader = depthOnlyVertexShaderMID_.Get();
if (annotation.Get() != nullptr)
{
annotation->BeginEvent(L"Depth pass");
}
for (std::vector::const_iterator it = drawCommands_.begin(),
end = drawCommands_.end();
it != end; ++it)
{
DrawCommand current = *it;
DrawCommand next;
while (smallBatchChunks_[currentSmallBatchChunk]->AddRequest(current, next, filterContext))
{
const int trianglesInBatch =
smallBatchChunks_[currentSmallBatchChunk]->GetFaceCount();
if (filterContext.options->statistics)
{
filterContext.options->statistics->trianglesProcessed += trianglesInBatch;
context->Begin(pipelineQuery_.Get());
}
// Overflow, submit this batch and continue with next one
smallBatchChunks_[currentSmallBatchChunk]->Render(context,
clearDrawIndirectArgumentsComputeShader_.Get(),
filterComputeShader_.Get(),
vertexShader, meshManager_->GetVertexBufferSRV(),
meshManager_->GetIndexBufferSRV(), meshManager_->GetMeshConstantsBuffer(),
meshManager_->GetVertexBuffer(), frameConstantBuffer_.Get());
if (filterContext.options->statistics)
{
context->End(pipelineQuery_.Get());
D3D11_QUERY_DATA_PIPELINE_STATISTICS stats;
while (context->GetData(pipelineQuery_.Get(), &stats, sizeof(stats), 0) != S_OK)
{
Yield();
}
filterContext.options->statistics->trianglesRendered += stats.IAPrimitives;
filterContext.options->statistics->trianglesCulled +=
(trianglesInBatch - stats.IAPrimitives);
}
current = next;
currentSmallBatchChunk = (currentSmallBatchChunk + 1) % smallBatchChunks_.size();
}
}
const int trianglesInBatch = smallBatchChunks_[currentSmallBatchChunk]->GetFaceCount();
if (filterContext.options->statistics)
{
context->Begin(pipelineQuery_.Get());
filterContext.options->statistics->trianglesProcessed += trianglesInBatch;
}
smallBatchChunks_[currentSmallBatchChunk]->Render(context,
clearDrawIndirectArgumentsComputeShader_.Get(),
filterComputeShader_.Get(),
vertexShader, meshManager_->GetVertexBufferSRV(), meshManager_->GetIndexBufferSRV(),
meshManager_->GetMeshConstantsBuffer(), meshManager_->GetVertexBuffer(),
frameConstantBuffer_.Get());
if (filterContext.options->statistics)
{
context->End(pipelineQuery_.Get());
D3D11_QUERY_DATA_PIPELINE_STATISTICS stats;
while (context->GetData(pipelineQuery_.Get(), &stats, sizeof(stats), 0) != S_OK)
{
Yield();
}
filterContext.options->statistics->trianglesRendered += stats.IAPrimitives;
filterContext.options->statistics->trianglesCulled +=
(trianglesInBatch - stats.IAPrimitives);
}
if (annotation.Get() != nullptr)
{
annotation->EndEvent();
}
}
};
///////////////////////////////////////////////////////////////////////////////
GeometryFX_Filter::GeometryFX_Filter(const GeometryFX_FilterDesc *pDesc)
{
const GeometryFX_FilterDesc desc = pDesc ? *pDesc : GeometryFX_FilterDesc();
impl_ = new GeometryFX_OpaqueFilterDesc(desc);
}
///////////////////////////////////////////////////////////////////////////////
GeometryFX_Filter::~GeometryFX_Filter()
{
delete impl_;
}
///////////////////////////////////////////////////////////////////////////////
std::vector GeometryFX_Filter::RegisterMeshes(
const int meshCount, const int *verticesInMesh, const int *indicesInMesh)
{
assert(meshCount > 0);
assert(verticesInMesh != nullptr);
assert(indicesInMesh != nullptr);
return impl_->RegisterMeshes(meshCount, verticesInMesh, indicesInMesh);
}
///////////////////////////////////////////////////////////////////////////////
void GeometryFX_Filter::SetMeshData(const GeometryFX_Filter::MeshHandle &handle, const void *vertexData, const void *indexData)
{
assert(vertexData != nullptr);
assert(indexData != nullptr);
impl_->SetMeshData(handle, vertexData, indexData);
}
///////////////////////////////////////////////////////////////////////////////
void GeometryFX_Filter::BeginRender(ID3D11DeviceContext *context, const GeometryFX_FilterRenderOptions &options,
const DirectX::XMMATRIX &view, const DirectX::XMMATRIX &projection, const int windowWidth,
const int windowHeight)
{
assert(context != nullptr);
assert(windowWidth > 0);
assert(windowHeight > 0);
FilterContext filterContext;
filterContext.options = &options;
filterContext.projection = projection;
filterContext.view = view;
filterContext.windowWidth = windowWidth;
filterContext.windowHeight = windowHeight;
const auto inverseView = DirectX::XMMatrixInverse (nullptr, view);
DirectX::XMFLOAT4X4 float4x4;
XMStoreFloat4x4 (&float4x4, inverseView);
filterContext.eye = DirectX::XMVectorSet (float4x4._41, float4x4._42, float4x4._43, 1);
impl_->BeginRender(context, filterContext);
}
///////////////////////////////////////////////////////////////////////////////
void GeometryFX_Filter::RenderMesh(const GeometryFX_Filter::MeshHandle &handle, const DirectX::XMMATRIX &world)
{
RenderMeshInstanced(handle, 1, &world);
}
///////////////////////////////////////////////////////////////////////////////
void GeometryFX_Filter::RenderMeshInstanced(
const GeometryFX_Filter::MeshHandle &handle, const int instanceCount, const DirectX::XMMATRIX *worlds)
{
impl_->RenderMeshInstanced(handle, instanceCount, worlds);
}
///////////////////////////////////////////////////////////////////////////////
void GeometryFX_Filter::EndRender()
{
impl_->EndRender();
}
///////////////////////////////////////////////////////////////////////////////
void GeometryFX_Filter::GetBuffersForMesh(const MeshHandle &handle, ID3D11Buffer **vertexBuffer,
int32 *vertexOffset, ID3D11Buffer **indexBuffer, int32 *indexOffset) const
{
impl_->GetBuffersForMesh(handle, vertexBuffer, vertexOffset, indexBuffer, indexOffset);
}
///////////////////////////////////////////////////////////////////////////////
void GeometryFX_Filter::GetMeshInfo(const MeshHandle &handle, int32 *indexCount) const
{
impl_->GetMeshInfo(handle, indexCount);
}
} // namespace AMD
================================================
FILE: amd_geometryfx/src/AMD_GeometryFX_Internal.h
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef AMD_GEOMETRYFX_INTERNAL_H
#define AMD_GEOMETRYFX_INTERNAL_H
namespace AMD
{
namespace GeometryFX_Internal
{
struct SmallBatchMergeConstants
{
// If this changes, the shaders have to be recompiled as well
static const int BATCH_SIZE = 4 * 64; // Should be a multiple of the wavefront size
static const int BATCH_COUNT = 1 * 384;
};
}
}
#endif
================================================
FILE: amd_geometryfx/src/AMD_GeometryFX_Utility.cpp
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#include "AMD_GeometryFX_Utility.h"
#include
#pragma warning(disable : 4996)
namespace AMD
{
////////////////////////////////////////////////////////////////////////////////
GEOMETRYFX_RETURN_CODE GeometryFX_GetVersion(uint* major, uint* minor, uint* patch)
{
if (major == NULL || minor == NULL || patch == NULL)
{
return GEOMETRYFX_RETURN_CODE_INVALID_POINTER;
}
*major = AMD_GEOMETRYFX_VERSION_MAJOR;
*minor = AMD_GEOMETRYFX_VERSION_MINOR;
*patch = AMD_GEOMETRYFX_VERSION_PATCH;
return GEOMETRYFX_RETURN_CODE_SUCCESS;
}
////////////////////////////////////////////////////////////////////////////////
void GeometryFX_WriteBlobToFile(const char *filename, const std::size_t size, const void *data)
{
auto handle = std::fopen(filename, "wb");
std::fwrite(data, size, 1, handle);
std::fclose(handle);
}
////////////////////////////////////////////////////////////////////////////////
std::vector GeometryFX_ReadBlobFromFile(const char *filename)
{
std::vector result;
byte buffer[4096];
auto handle = std::fopen(filename, "rb");
for (;;)
{
const auto bytesRead = std::fread(buffer, 1, sizeof(buffer), handle);
result.insert(result.end(), buffer, buffer + bytesRead);
if (bytesRead < sizeof(buffer))
{
break;
}
}
std::fclose(handle);
return result;
}
} // namespace AMD
================================================
FILE: amd_geometryfx/src/GeometryFXMesh.cpp
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#include "GeometryFXMesh.h"
#include
#include
namespace AMD
{
namespace GeometryFX_Internal
{
///////////////////////////////////////////////////////////////////////////////
StaticMesh::StaticMesh(const int vertexCount, const int indexCount, const int meshIndex)
: vertexCount(vertexCount)
, faceCount(indexCount / 3)
, indexCount(indexCount)
, meshIndex(meshIndex)
, indexOffset(0)
, vertexOffset(0)
{
assert(meshIndex >= 0);
}
///////////////////////////////////////////////////////////////////////////////
StaticMesh::~StaticMesh()
{
}
} // namespace GeometryFX_Internal
} // namespace AMD
================================================
FILE: amd_geometryfx/src/GeometryFXMesh.h
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef AMD_GEOMETRYFX_MESH_H
#define AMD_GEOMETRYFX_MESH_H
#include
#include
#include
#include
namespace AMD
{
namespace GeometryFX_Internal
{
class StaticMesh
{
public:
StaticMesh(const int vertexCount, const int indexCount, const int meshIndex);
virtual ~StaticMesh();
public:
Microsoft::WRL::ComPtr vertexBuffer;
Microsoft::WRL::ComPtr vertexBufferSRV;
Microsoft::WRL::ComPtr indexBuffer;
Microsoft::WRL::ComPtr indexBufferSRV;
Microsoft::WRL::ComPtr meshConstantsBuffer;
int vertexCount;
int faceCount;
int indexCount;
int meshIndex;
int indexOffset;
int vertexOffset;
struct Cluster
{
DirectX::XMVECTOR aabbMin, aabbMax;
DirectX::XMVECTOR coneCenter, coneAxis;
float coneAngleCosine;
bool valid;
};
std::vector clusters;
private:
StaticMesh(const StaticMesh &);
StaticMesh &operator=(const StaticMesh &);
};
} // namespace GeometryFX_Internal
} // namespace AMD
#endif // AMD_GEOMETRYFX_MESH_H
================================================
FILE: amd_geometryfx/src/GeometryFXMeshManager.cpp
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#include "GeometryFXMeshManager.h"
#include "GeometryFXMesh.h"
#include "GeometryFXUtility_Internal.h"
#include "AMD_GeometryFX_Internal.h"
#include
#include
#include
#include
#include
#define AMD_GEOMETRY_FX_ENABLE_CLUSTER_CENTER_SAFETY_CHECK 1
#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif
using namespace Microsoft::WRL;
namespace AMD
{
namespace GeometryFX_Internal
{
///////////////////////////////////////////////////////////////////////////////
IMeshManager::IMeshManager()
{
}
///////////////////////////////////////////////////////////////////////////////
IMeshManager::~IMeshManager()
{
}
///////////////////////////////////////////////////////////////////////////////
class MeshManagerBase : public IMeshManager
{
public:
StaticMesh *GetMesh(const int index) const override
{
return meshes_[index].get();
}
int GetMeshCount() const override
{
return static_cast(meshes_.size());
}
ID3D11ShaderResourceView *GetMeshConstantsBuffer() const override
{
return meshConstantsBufferView_.Get();
}
protected:
std::vector> meshes_;
ComPtr meshConstantsBuffer_;
ComPtr meshConstantsBufferView_;
void CreateMeshConstantsBuffer(ID3D11Device *device)
{
std::vector meshConstants(GetMeshCount());
for (int i = 0; i < GetMeshCount(); ++i)
{
meshConstants[i].faceCount = meshes_[i]->faceCount;
meshConstants[i].indexOffset = meshes_[i]->indexOffset;
meshConstants[i].vertexCount = meshes_[i]->vertexCount;
meshConstants[i].vertexOffset = meshes_[i]->vertexOffset;
}
D3D11_BUFFER_DESC bufferDesc = {};
bufferDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
bufferDesc.ByteWidth = static_cast(meshConstants.size() * sizeof(MeshConstants));
bufferDesc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;
bufferDesc.StructureByteStride = sizeof(MeshConstants);
bufferDesc.Usage = D3D11_USAGE_IMMUTABLE;
D3D11_SUBRESOURCE_DATA initialData;
initialData.pSysMem = meshConstants.data();
initialData.SysMemPitch = bufferDesc.ByteWidth;
initialData.SysMemSlicePitch = bufferDesc.ByteWidth;
device->CreateBuffer(&bufferDesc, &initialData, &meshConstantsBuffer_);
SetDebugName(meshConstantsBuffer_.Get(), "Mesh constants buffer");
for (std::vector>::iterator it = meshes_.begin(),
end = meshes_.end();
it != end; ++it)
{
(*it)->meshConstantsBuffer = meshConstantsBuffer_;
}
D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc;
srvDesc.Format = DXGI_FORMAT_UNKNOWN;
srvDesc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;
srvDesc.Buffer.ElementOffset = 0;
srvDesc.Buffer.ElementWidth = GetMeshCount();
device->CreateShaderResourceView(
meshConstantsBuffer_.Get(), &srvDesc, &meshConstantsBufferView_);
SetDebugName(meshConstantsBufferView_.Get(), "Mesh constants buffer view");
}
};
///////////////////////////////////////////////////////////////////////////////
// Allocate everything from one large buffer
class MeshManagerGlobal : public MeshManagerBase
{
public:
void Allocate(ID3D11Device *device, const int meshCount, const int *verticesPerMesh,
const int *indicesPerMesh) override
{
int totalVertexCount = 0;
int totalIndexCount = 0;
for (int i = 0; i < meshCount; ++i)
{
totalVertexCount += verticesPerMesh[i];
totalIndexCount += indicesPerMesh[i];
}
CreateVertexBuffer(device, totalVertexCount);
CreateIndexBuffer(device, totalIndexCount);
int indexOffset = 0;
int vertexOffset = 0;
for (int i = 0; i < meshCount; ++i)
{
meshes_.emplace_back(std::unique_ptr(
new StaticMesh(verticesPerMesh[i], indicesPerMesh[i], i)));
meshes_[i]->vertexBuffer = vertexBuffer_;
meshes_[i]->vertexBufferSRV = vertexBufferSRV_;
meshes_[i]->indexBuffer = indexBuffer_;
meshes_[i]->indexBufferSRV = indexBufferSRV_;
meshes_[i]->indexOffset = indexOffset;
indexOffset += indicesPerMesh[i] * sizeof(int);
meshes_[i]->vertexOffset = vertexOffset;
vertexOffset += verticesPerMesh[i] * 3 * sizeof(float);
}
CreateMeshConstantsBuffer(device);
}
std::vector CreateClusters (
const int indexCount,
const void* vertexData,
const void* indexData)
{
const int32_t* indices = static_cast (indexData);
const float* vertices = static_cast (vertexData);
// 16 KiB stack space
struct Triangle
{
DirectX::XMVECTOR vtx[3];
};
std::array triangleCache;
const int triangleCount = indexCount / 3;
const int clusterCount = (triangleCount + SmallBatchMergeConstants::BATCH_SIZE - 1)
/ SmallBatchMergeConstants::BATCH_SIZE;
std::vector result (clusterCount);
for (int i = 0; i < clusterCount; ++i)
{
const int clusterStart = i * SmallBatchMergeConstants::BATCH_SIZE;
const int clusterEnd = std::min (clusterStart + SmallBatchMergeConstants::BATCH_SIZE,
triangleCount);
const int clusterTriangleCount = clusterEnd - clusterStart;
// Load all triangles into our local cache
for (int triangleIndex = clusterStart; triangleIndex < clusterEnd; ++triangleIndex)
{
triangleCache[triangleIndex - clusterStart].vtx[0] = DirectX::XMVectorSet (
vertices[indices[triangleIndex * 3 + 0] * 3 + 0],
vertices[indices[triangleIndex * 3 + 0] * 3 + 1],
vertices[indices[triangleIndex * 3 + 0] * 3 + 2],
1.0f
);
triangleCache[triangleIndex - clusterStart].vtx[1] = DirectX::XMVectorSet (
vertices[indices[triangleIndex * 3 + 1] * 3 + 0],
vertices[indices[triangleIndex * 3 + 1] * 3 + 1],
vertices[indices[triangleIndex * 3 + 1] * 3 + 2],
1.0f
);
triangleCache[triangleIndex - clusterStart].vtx[2] = DirectX::XMVectorSet (
vertices[indices[triangleIndex * 3 + 2] * 3 + 0],
vertices[indices[triangleIndex * 3 + 2] * 3 + 1],
vertices[indices[triangleIndex * 3 + 2] * 3 + 2],
1.0f
);
}
auto aabbMin = DirectX::XMVectorSplatInfinity ();
auto aabbMax = DirectX::XMVectorNegate (DirectX::XMVectorSplatInfinity ());
auto coneAxis = DirectX::XMVectorZero ();
for (int triangleIndex = 0; triangleIndex < clusterTriangleCount; ++triangleIndex)
{
const auto& triangle = triangleCache[triangleIndex];
for (int j = 0; j < 3; ++j)
{
aabbMin = DirectX::XMVectorMin (aabbMin, triangle.vtx[j]);
aabbMax = DirectX::XMVectorMax (aabbMax, triangle.vtx[j]);
}
const auto triangleNormal = DirectX::XMVector3Normalize (
DirectX::XMVector3Cross (
DirectX::XMVectorSubtract (triangle.vtx[1], triangle.vtx[0]),
DirectX::XMVectorSubtract( triangle.vtx[2], triangle.vtx[0])));
coneAxis = DirectX::XMVectorAdd (coneAxis, DirectX::XMVectorNegate (triangleNormal));
}
// This is the cosine of the cone opening angle - 1 means it's 0,
// we're minimizing this value (at 0, it would mean the cone is 90
// open)
float coneOpening = 1;
bool validCluster = true;
const auto center = DirectX::XMVectorDivide (DirectX::XMVectorAdd (aabbMin, aabbMax),
DirectX::XMVectorSet (2, 2, 2, 2));
coneAxis = DirectX::XMVector3Normalize (coneAxis);
float t = -std::numeric_limits::infinity ();
// We nee a second pass to find the intersection of the line
// center + t * coneAxis with the plane defined by each
// triangle
for (int triangleIndex = 0; triangleIndex < clusterTriangleCount; ++triangleIndex)
{
const auto& triangle = triangleCache[triangleIndex];
// Compute the triangle plane from the three vertices
const auto triangleNormal = DirectX::XMVector3Normalize (
DirectX::XMVector3Cross (
DirectX::XMVectorSubtract (triangle.vtx[1], triangle.vtx[0]),
DirectX::XMVectorSubtract (triangle.vtx[2], triangle.vtx[0])));
const float directionalPart = DirectX::XMVectorGetX (
DirectX::XMVector3Dot (coneAxis, DirectX::XMVectorNegate (triangleNormal)));
if (directionalPart < 0)
{
// No solution for this cluster - at least two triangles
// are facing each other
validCluster = false;
break;
}
// We need to intersect the plane with our cone ray which is
// center + t * coneAxis, and find the max
// t along the cone ray (which points into the empty
// space)
// See: https://en.wikipedia.org/wiki/Line%E2%80%93plane_intersection
const float td = DirectX::XMVectorGetX (DirectX::XMVectorDivide (
DirectX::XMVector3Dot (DirectX::XMVectorSubtract(center, triangle.vtx[0]), triangleNormal),
DirectX::XMVectorSet (-directionalPart, -directionalPart, -directionalPart, -directionalPart)));
t = std::max (t, td);
coneOpening = std::min (coneOpening, directionalPart);
}
result[i].aabbMax = aabbMax;
result[i].aabbMin = aabbMin;
// cos (PI/2 - acos (coneOpening))
result[i].coneAngleCosine = sqrtf (1 - coneOpening * coneOpening);
result[i].coneCenter = DirectX::XMVectorAdd (center,
DirectX::XMVectorMultiply (coneAxis, DirectX::XMVectorSet (t, t, t, t)));
result[i].coneAxis = coneAxis;
#if AMD_GEOMETRY_FX_ENABLE_CLUSTER_CENTER_SAFETY_CHECK
// If distance of coneCenter to the bounding box center is more
// than 16x the bounding box extent, the cluster is also invalid
// This is mostly a safety measure - if triangles are nearly
// parallel to coneAxis, t may become very large and unstable
const float aabbSize = DirectX::XMVectorGetX (DirectX::XMVector3Length (DirectX::XMVectorSubtract (aabbMax, aabbMin)));
const float coneCenterToCenterDistance = DirectX::XMVectorGetX (
DirectX::XMVector3Length (
DirectX::XMVectorSubtract (result[i].coneCenter,
DirectX::XMVectorDivide (
DirectX::XMVectorAdd (aabbMax, aabbMin),
DirectX::XMVectorSet (2, 2, 2, 2))
)));
if (coneCenterToCenterDistance > (16 * aabbSize))
{
validCluster = false;
}
#endif
result[i].valid = validCluster;
}
return result;
}
void SetData(ID3D11Device * /* device */, ID3D11DeviceContext *context, const int meshIndex,
const void *vertexData, const void *indexData) override
{
D3D11_BOX dstBox;
dstBox.left = meshes_[meshIndex]->vertexOffset;
dstBox.right = dstBox.left + meshes_[meshIndex]->vertexCount * 3 * sizeof(float);
dstBox.top = 0;
dstBox.bottom = 1;
dstBox.front = 0;
dstBox.back = 1;
context->UpdateSubresource(vertexBuffer_.Get(), 0, &dstBox, vertexData, 0, 0);
dstBox.left = meshes_[meshIndex]->indexOffset;
dstBox.right = dstBox.left + meshes_[meshIndex]->indexCount * sizeof(int);
context->UpdateSubresource(indexBuffer_.Get(), 0, &dstBox, indexData, 0, 0);
meshes_[meshIndex]->clusters = CreateClusters (meshes_[meshIndex]->indexCount,
vertexData, indexData);
}
private:
void CreateVertexBuffer(ID3D11Device *device, const int vertexCount)
{
D3D11_BUFFER_DESC vbDesc = {};
vbDesc.Usage = D3D11_USAGE_DEFAULT;
vbDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER | D3D11_BIND_SHADER_RESOURCE;
vbDesc.ByteWidth = sizeof(float) * 3 * vertexCount;
vbDesc.StructureByteStride = 0;
vbDesc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS;
device->CreateBuffer(&vbDesc, nullptr, &vertexBuffer_);
SetDebugName(vertexBuffer_.Get(), "Global source vertex buffer");
D3D11_SHADER_RESOURCE_VIEW_DESC vbSrv;
vbSrv.ViewDimension = D3D11_SRV_DIMENSION_BUFFEREX;
vbSrv.BufferEx.FirstElement = 0;
vbSrv.BufferEx.Flags = D3D11_BUFFEREX_SRV_FLAG_RAW;
vbSrv.BufferEx.NumElements = vbDesc.ByteWidth / 4;
vbSrv.Format = DXGI_FORMAT_R32_TYPELESS;
device->CreateShaderResourceView(vertexBuffer_.Get(), &vbSrv, &vertexBufferSRV_);
SetDebugName(vertexBufferSRV_.Get(), "Global source vertex buffer resource view");
}
void CreateIndexBuffer(ID3D11Device *device, const int indexCount)
{
D3D11_BUFFER_DESC ibDesc = {};
ibDesc.Usage = D3D11_USAGE_DEFAULT;
ibDesc.BindFlags = D3D11_BIND_INDEX_BUFFER | D3D11_BIND_SHADER_RESOURCE;
ibDesc.ByteWidth = indexCount * sizeof(int);
ibDesc.StructureByteStride = sizeof(int);
device->CreateBuffer(&ibDesc, nullptr, &indexBuffer_);
SetDebugName(indexBuffer_.Get(), "Global index buffer");
D3D11_SHADER_RESOURCE_VIEW_DESC ibSrv;
ibSrv.Format = DXGI_FORMAT_R32_UINT;
ibSrv.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;
ibSrv.Buffer.ElementOffset = 0;
ibSrv.Buffer.ElementWidth = sizeof(int);
ibSrv.Buffer.FirstElement = 0;
ibSrv.Buffer.NumElements = static_cast(indexCount);
device->CreateShaderResourceView(indexBuffer_.Get(), &ibSrv, &indexBufferSRV_);
SetDebugName(indexBufferSRV_.Get(), "Global source index buffer view");
}
public:
ID3D11Buffer *GetIndexBuffer() const
{
return indexBuffer_.Get();
}
ID3D11Buffer *GetVertexBuffer() const
{
return vertexBuffer_.Get();
}
ID3D11ShaderResourceView *GetIndexBufferSRV() const
{
return indexBufferSRV_.Get();
}
ID3D11ShaderResourceView *GetVertexBufferSRV() const
{
return vertexBufferSRV_.Get();
}
private:
ComPtr vertexBuffer_;
ComPtr vertexBufferSRV_;
ComPtr indexBuffer_;
ComPtr indexBufferSRV_;
};
///////////////////////////////////////////////////////////////////////////////
std::unique_ptr CreateGlobalMeshManager()
{
return std::unique_ptr(new MeshManagerGlobal());
}
} // namespace GeometryFX_Internal
} // namespace AMD
================================================
FILE: amd_geometryfx/src/GeometryFXMeshManager.h
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef AMD_GEOMETRYFX_MESH_MANAGER_H
#define AMD_GEOMETRYFX_MESH_MANAGER_H
#include
#include
#include
#include "AMD_Types.h"
namespace AMD
{
namespace GeometryFX_Internal
{
class StaticMesh;
#pragma pack(push, 1)
struct MeshConstants
{
uint32 vertexCount;
uint32 faceCount;
uint32 indexOffset;
uint32 vertexOffset;
};
#pragma pack(pop)
class IMeshManager
{
public:
IMeshManager ();
virtual ~IMeshManager();
virtual void Allocate(ID3D11Device *pDevice, const int meshCount, const int *verticesPerMesh,
const int *indicesPerMesh) = 0;
virtual void SetData(ID3D11Device *pDevice, ID3D11DeviceContext *pContext, const int meshIndex,
const void *pVertexData, const void *pIndexData) = 0;
virtual StaticMesh *GetMesh(const int index) const = 0;
virtual int GetMeshCount() const = 0;
virtual ID3D11ShaderResourceView *GetMeshConstantsBuffer() const = 0;
virtual ID3D11Buffer *GetIndexBuffer () const = 0;
virtual ID3D11Buffer *GetVertexBuffer () const = 0;
virtual ID3D11ShaderResourceView *GetIndexBufferSRV () const = 0;
virtual ID3D11ShaderResourceView *GetVertexBufferSRV () const = 0;
private:
IMeshManager(const IMeshManager &);
IMeshManager &operator=(const IMeshManager &);
};
std::unique_ptr CreateGlobalMeshManager();
} // namespace GeometryFX_Internal
} // namespace AMD
#endif // AMD_GEOMETRYFX_MESH_MANAGER_H
================================================
FILE: amd_geometryfx/src/GeometryFXUtility_Internal.cpp
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#include "GeometryFXUtility_Internal.h"
namespace AMD
{
namespace GeometryFX_Internal
{
////////////////////////////////////////////////////////////////////////////////
bool CreateShader(ID3D11Device *device, ID3D11DeviceChild **shader, const size_t shaderSize,
const void *shaderSource, ShaderType::Enum shaderType, ID3D11InputLayout **inputLayout,
const int inputElementCount, const D3D11_INPUT_ELEMENT_DESC *inputElements)
{
if (inputLayout)
{
device->CreateInputLayout(
inputElements, inputElementCount, shaderSource, shaderSize, inputLayout);
}
switch (shaderType)
{
case ShaderType::Compute:
device->CreateComputeShader(
shaderSource, shaderSize, nullptr, (ID3D11ComputeShader **)shader);
break;
case ShaderType::Pixel:
device->CreatePixelShader(
shaderSource, shaderSize, nullptr, (ID3D11PixelShader **)shader);
break;
case ShaderType::Vertex:
device->CreateVertexShader(
shaderSource, shaderSize, nullptr, (ID3D11VertexShader **)shader);
break;
case ShaderType::Hull:
device->CreateHullShader(
shaderSource, shaderSize, nullptr, (ID3D11HullShader **)shader);
break;
case ShaderType::Domain:
device->CreateDomainShader(
shaderSource, shaderSize, nullptr, (ID3D11DomainShader **)shader);
break;
case ShaderType::Geometry:
device->CreateGeometryShader(
shaderSource, shaderSize, nullptr, (ID3D11GeometryShader **)shader);
break;
}
return true;
}
} // namespace GeometryFX_Internal
} // namespace AMD
================================================
FILE: amd_geometryfx/src/GeometryFXUtility_Internal.h
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef AMD_GEOMETRYFX_UTILITY_INTERNAL_H
#define AMD_GEOMETRYFX_UTILITY_INTERNAL_H
#include
#include
#include "AMD_GeometryFX.h"
namespace AMD
{
namespace GeometryFX_Internal
{
template T RoundToNextMultiple(T value, T multiple)
{
return ((value + multiple - 1) / multiple) * multiple;
}
template void SetDebugName(T pObject, const char *s, ...)
{
char buffer[512] = {};
va_list args;
va_start(args, s);
vsprintf_s(buffer, s, args);
va_end(args);
pObject->SetPrivateData(WKPDID_D3DDebugObjectName,
static_cast (::strlen (buffer) - 1), buffer);
}
struct ShaderType
{
enum Enum
{
Vertex,
Domain,
Hull,
Geometry,
Pixel,
Compute
};
};
bool CreateShader(ID3D11Device *device, ID3D11DeviceChild **ppShader, const size_t shaderSize,
const void *shaderSource, ShaderType::Enum shaderType,
ID3D11InputLayout **inputLayout = nullptr, const int inputElementCount = 0,
const D3D11_INPUT_ELEMENT_DESC *inputElements = nullptr);
} // namespace GeometryFX_Internal
} // namespace AMD
#endif // AMD_GEOMETRYFX_UTILITY_INTERNAL_H
================================================
FILE: amd_geometryfx/src/Shaders/AMD_GeometryFX_Filtering.hlsl
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
cbuffer DrawCallConstantBuffer : register(b0)
{
matrix world : packoffset(c0);
matrix worldView : packoffset(c4);
uint meshIndex : packoffset(c8.x);
}
cbuffer FrameConstantBuffer : register(b1)
{
matrix view : packoffset(c0);
matrix projection : packoffset(c4);
uint cullFlags : packoffset(c8.x);
uint windowWidth : packoffset(c8.y);
uint windowHeight : packoffset(c8.z);
};
struct MeshConstants
{
uint vertexCount;
uint faceCount;
uint indexOffset;
uint vertexOffset;
};
struct Vertex
{
float3 p;
};
struct IndirectArgs
{
uint IndexCountPerInstance;
uint InstanceCount;
uint StartIndexLocation;
int BaseVertexLocation;
uint StartInstanceLocation;
};
struct SmallBatchDrawConstants
{
matrix world;
matrix worldView;
uint meshIndex;
uint padding [3];
};
struct SmallBatchData
{
uint meshIndex;
uint indexOffset;
uint faceCount;
uint outputIndexOffset;
uint drawIndex;
uint drawBatchStart;
};
#define CULL_INDEX_FILTER 0x1
#define CULL_BACKFACE 0x2
#define CULL_FRUSTUM 0x8
#define CULL_SMALL_PRIMITIVES 0x20
#define ENABLE_CULL_INDEX 1
#define ENABLE_CULL_BACKFACE 1
#define ENABLE_CULL_FRUSTUM 1
#define ENABLE_CULL_SMALL_PRIMITIVES 1
RWBuffer filteredIndices : register(u0);
RWBuffer indirectArgs : register(u1);
ByteAddressBuffer vertexData : register(t0);
Buffer indexData : register(t1);
StructuredBuffer meshConstants : register(t2);
StructuredBuffer drawConstants : register(t3);
StructuredBuffer smallBatchData : register(t4);
float4 DepthOnlyVS(float4 pos : POSITION) : SV_POSITION
{
return mul (projection, mul (worldView, pos));
}
float4 DepthOnlyMultiIndirectVS (float4 pos : POSITION, uint drawId : DRAWID) : SV_POSITION
{
return mul (projection, mul (drawConstants [drawId].worldView, pos));
}
float3 LoadVertex (uint index, uint vertexOffset)
{
return asfloat(vertexData.Load3(vertexOffset + index * 12));
}
bool CullTriangle (uint indices [3], float4 vertices [3])
{
bool cull = false;
#ifdef ENABLE_CULL_INDEX
if (cullFlags & CULL_INDEX_FILTER)
{
if ( indices[0] == indices[1]
|| indices[1] == indices[2]
|| indices[0] == indices[2])
{
cull = true;
}
}
#endif
// Culling in homogenous coordinates
// Read: "Triangle Scan Conversion using 2D Homogeneous Coordinates"
// by Marc Olano, Trey Greer
// http://www.cs.unc.edu/~olano/papers/2dh-tri/2dh-tri.pdf
float3x3 m =
{
vertices[0].xyw, vertices[1].xyw, vertices[2].xyw
};
#if ENABLE_CULL_BACKFACE
if (cullFlags & CULL_BACKFACE)
{
cull = cull || (determinant (m) > 0);
}
#endif
#if ENABLE_CULL_FRUSTUM || ENABLE_CULL_SMALL_PRIMITIVES
int verticesInFrontOfNearPlane = 0;
// Transform vertices[i].xy into normalized 0..1 screen space
for (uint i = 0; i < 3; ++i)
{
vertices[i].xy /= vertices[i].w;
vertices[i].xy /= 2;
vertices[i].xy += float2(0.5, 0.5);
if (vertices[i].w < 0)
{
++verticesInFrontOfNearPlane;
}
}
#endif
#if ENABLE_CULL_SMALL_PRIMITIVES
if (cullFlags & CULL_SMALL_PRIMITIVES)
{
static const uint SUBPIXEL_BITS = 8;
static const uint SUBPIXEL_MASK = 0xFF;
static const uint SUBPIXEL_SAMPLES = 1 << SUBPIXEL_BITS;
/**
Computing this in float-point is not precise enough
We switch to a 23.8 representation here which should match the
HW subpixel resolution.
We use a 8-bit wide guard-band to avoid clipping. If
a triangle is outside the guard-band, it will be ignored.
That is, the actual viewport supported here is 31 bit, one bit is
unused, and the guard band is 1 << 23 bit large (8388608 pixels)
*/
int2 minBB = int2(1 << 30, 1 << 30);
int2 maxBB = int2(-(1 << 30), -(1 << 30));
bool insideGuardBand = true;
for (uint i = 0; i < 3; ++i)
{
float2 screenSpacePositionFP = vertices[i].xy * float2 (windowWidth, windowHeight);
// Check if we would overflow after conversion
if ( screenSpacePositionFP.x < -(1 << 23)
|| screenSpacePositionFP.x > (1 << 23)
|| screenSpacePositionFP.y < -(1 << 23)
|| screenSpacePositionFP.y > (1 << 23))
{
insideGuardBand = false;
}
int2 screenSpacePosition = int2 (screenSpacePositionFP * SUBPIXEL_SAMPLES);
minBB = min (screenSpacePosition, minBB);
maxBB = max (screenSpacePosition, maxBB);
}
if (verticesInFrontOfNearPlane == 0 && insideGuardBand)
{
/**
Test is:
Is the minimum of the bounding box right or above the sample
point and is the width less than the pixel width in samples in
one direction.
This will also cull very long triangles which fall between
multiple samples.
*/
cull = cull
|| (
((minBB.x & SUBPIXEL_MASK) > SUBPIXEL_SAMPLES/2)
&& ((maxBB.x - ((minBB.x & ~SUBPIXEL_MASK) + SUBPIXEL_SAMPLES/2)) < (SUBPIXEL_SAMPLES - 1)))
|| (
((minBB.y & SUBPIXEL_MASK) > SUBPIXEL_SAMPLES/2)
&& ((maxBB.y - ((minBB.y & ~SUBPIXEL_MASK) + SUBPIXEL_SAMPLES/2)) < (SUBPIXEL_SAMPLES - 1)));
}
}
#endif
#if ENABLE_CULL_FRUSTUM
if (cullFlags & CULL_FRUSTUM)
{
if (verticesInFrontOfNearPlane == 3)
{
cull = true;
}
if (verticesInFrontOfNearPlane == 0)
{
float minx = min (min (vertices[0].x, vertices[1].x), vertices[2].x);
float miny = min (min (vertices[0].y, vertices[1].y), vertices[2].y);
float maxx = max (max (vertices[0].x, vertices[1].x), vertices[2].x);
float maxy = max (max (vertices[0].y, vertices[1].y), vertices[2].y);
cull = cull || (maxx < 0) || (maxy < 0) || (minx > 1) || (miny > 1);
}
}
#endif
return cull;
}
#ifdef AMD_COMPILE_COMPUTE_SHADER
groupshared uint workGroupOutputSlot;
groupshared uint workGroupIndexCount;
#ifndef SMALL_BATCH_SIZE
#define SMALL_BATCH_SIZE 256
#endif
[numthreads(SMALL_BATCH_SIZE, 1, 1 )]
void FilterCS(
uint3 inGroupId : SV_GroupThreadID,
uint3 groupId : SV_GroupID )
{
if (inGroupId.x == 0)
{
workGroupIndexCount = 0;
}
GroupMemoryBarrierWithGroupSync ();
bool cull = true;
uint threadOutputSlot = 0;
uint batchMeshIndex = smallBatchData [groupId.x].meshIndex;
uint batchInputIndexOffset = (meshConstants [batchMeshIndex].indexOffset + smallBatchData [groupId.x].indexOffset) / 4;
uint batchInputVertexOffset = meshConstants [batchMeshIndex].vertexOffset;
uint batchDrawIndex = smallBatchData[groupId.x].drawIndex;
if (inGroupId.x < smallBatchData [groupId.x].faceCount)
{
float4x4 worldView = drawConstants [batchDrawIndex].worldView;
uint indices [3] =
{
indexData [inGroupId.x * 3 + 0 + batchInputIndexOffset],
indexData [inGroupId.x * 3 + 1 + batchInputIndexOffset],
indexData [inGroupId.x * 3 + 2 + batchInputIndexOffset]
};
float4 vertices [3] =
{
mul (projection, mul (worldView, float4 (LoadVertex (indices [0], batchInputVertexOffset), 1))),
mul (projection, mul (worldView, float4 (LoadVertex (indices [1], batchInputVertexOffset), 1))),
mul (projection, mul (worldView, float4 (LoadVertex (indices [2], batchInputVertexOffset), 1)))
};
cull = CullTriangle (indices, vertices);
if (!cull)
{
InterlockedAdd (workGroupIndexCount, 3, threadOutputSlot);
}
}
GroupMemoryBarrierWithGroupSync ();
if (inGroupId.x == 0)
{
InterlockedAdd (indirectArgs [batchDrawIndex * 5], workGroupIndexCount, workGroupOutputSlot);
}
AllMemoryBarrierWithGroupSync ();
uint outputIndexOffset = workGroupOutputSlot + smallBatchData [groupId.x].outputIndexOffset / 4;
if (!cull)
{
filteredIndices [outputIndexOffset + threadOutputSlot + 0] = indexData [inGroupId.x * 3 + 0 + batchInputIndexOffset];
filteredIndices [outputIndexOffset + threadOutputSlot + 1] = indexData [inGroupId.x * 3 + 1 + batchInputIndexOffset];
filteredIndices [outputIndexOffset + threadOutputSlot + 2] = indexData [inGroupId.x * 3 + 2 + batchInputIndexOffset];
}
if (inGroupId.x == 0 && groupId.x == smallBatchData [groupId.x].drawBatchStart)
{
indirectArgs [batchDrawIndex * 5 + 2] = smallBatchData[groupId.x].outputIndexOffset / 4; // 4 == sizeof (int32)
indirectArgs [batchDrawIndex * 5 + 3] = batchInputVertexOffset / 12; // 12 == sizeof (float3)
indirectArgs [batchDrawIndex * 5 + 4] = batchDrawIndex;
}
}
#define CLEAR_THREAD_COUNT 256
[numthreads (CLEAR_THREAD_COUNT, 1, 1)]
void ClearDrawIndirectArgsCS (uint3 id : SV_DispatchThreadID)
{
// Note: need to clear in a seperate pass because the order of
// invocations of FilterCS() in a dispatch is not determinate
indirectArgs[id.x * 5 + 0] = 0;
}
#endif
================================================
FILE: amd_geometryfx/src/Shaders/build/fxc_compile_geometryfx_all.bat
================================================
@echo off
REM Set this to point to the Windows SDK version where fxc is located
REM Recommend Windows SDK 8.1 or higher.
set windows_sdk=10
REM Batch file for compiling the GeometryFX library shaders
echo --- Compiling shaders for GeometryFX ---
set startdir=%cd%
cd "%~dp0"
set fxc_exe=%ProgramFiles(x86)%\Windows Kits\%windows_sdk%\bin\x86\fxc.exe
REM If fxc.exe exists in the same directory as the batch file, it will be used instead
if exist .\fxc.exe set fxc_exe=.\fxc.exe
echo --- Using "%fxc_exe%" ---
"%fxc_exe%" /nologo /DAMD_COMPILE_COMPUTE_SHADER=1 /E FilterCS /T cs_5_0 /Fh ..\inc\AMD_GeometryFX_FilterCS.inc /Vn AMD_GeometryFX_FilterCS /DSMALL_BATCH_SIZE=256 /DSMALL_BATCH_COUNT=384 ../AMD_GeometryFX_Filtering.hlsl
"%fxc_exe%" /nologo /DAMD_COMPILE_COMPUTE_SHADER=1 /E ClearDrawIndirectArgsCS /T cs_5_0 /Fh ..\inc\AMD_GeometryFX_ClearDrawIndirectArgsCS.inc /Vn AMD_GeometryFX_ClearDrawIndirectArgsCS ../AMD_GeometryFX_Filtering.hlsl
"%fxc_exe%" /nologo /DAMD_COMPILE_VERTEX_SHADER=1 /E DepthOnlyVS /T vs_5_0 /Fh ..\inc\AMD_GeometryFX_DepthOnlyVS.inc /Vn AMD_GeometryFX_DepthOnlyVS ../AMD_GeometryFX_Filtering.hlsl
"%fxc_exe%" /nologo /DAMD_COMPILE_VERTEX_SHADER=1 /E DepthOnlyMultiIndirectVS /T vs_5_0 /Fh ..\inc\AMD_GeometryFX_DepthOnlyMultiIndirectVS.inc /Vn AMD_GeometryFX_DepthOnlyMultiIndirectVS ../AMD_GeometryFX_Filtering.hlsl
cd "%startdir%"
pause
================================================
FILE: amd_geometryfx/src/Shaders/inc/AMD_GeometryFX_ClearDrawIndirectArgsCS.inc
================================================
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Resource Bindings:
//
// Name Type Format Dim HLSL Bind Count
// ------------------------------ ---------- ------- ----------- -------------- ------
// indirectArgs UAV uint buf u1 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Input
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
cs_5_0
dcl_globalFlags refactoringAllowed
dcl_uav_typed_buffer (uint,uint,uint,uint) u1
dcl_input vThreadID.x
dcl_temps 1
dcl_thread_group 256, 1, 1
imul null, r0.x, vThreadID.x, l(5)
store_uav_typed u1.xyzw, r0.xxxx, l(0,0,0,0)
ret
// Approximately 3 instruction slots used
#endif
const BYTE AMD_GeometryFX_ClearDrawIndirectArgsCS[] =
{
68, 88, 66, 67, 68, 24,
218, 140, 237, 49, 253, 157,
212, 28, 158, 52, 18, 215,
163, 125, 1, 0, 0, 0,
24, 2, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
208, 0, 0, 0, 224, 0,
0, 0, 240, 0, 0, 0,
124, 1, 0, 0, 82, 68,
69, 70, 148, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
60, 0, 0, 0, 0, 5,
83, 67, 0, 1, 0, 0,
105, 0, 0, 0, 82, 68,
49, 49, 60, 0, 0, 0,
24, 0, 0, 0, 32, 0,
0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0,
92, 0, 0, 0, 4, 0,
0, 0, 4, 0, 0, 0,
1, 0, 0, 0, 255, 255,
255, 255, 1, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 105, 110, 100, 105,
114, 101, 99, 116, 65, 114,
103, 115, 0, 77, 105, 99,
114, 111, 115, 111, 102, 116,
32, 40, 82, 41, 32, 72,
76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67,
111, 109, 112, 105, 108, 101,
114, 32, 49, 48, 46, 49,
0, 171, 171, 171, 73, 83,
71, 78, 8, 0, 0, 0,
0, 0, 0, 0, 8, 0,
0, 0, 79, 83, 71, 78,
8, 0, 0, 0, 0, 0,
0, 0, 8, 0, 0, 0,
83, 72, 69, 88, 132, 0,
0, 0, 80, 0, 5, 0,
33, 0, 0, 0, 106, 8,
0, 1, 156, 8, 0, 4,
0, 224, 17, 0, 1, 0,
0, 0, 68, 68, 0, 0,
95, 0, 0, 2, 18, 0,
2, 0, 104, 0, 0, 2,
1, 0, 0, 0, 155, 0,
0, 4, 0, 1, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 38, 0, 0, 7,
0, 208, 0, 0, 18, 0,
16, 0, 0, 0, 0, 0,
10, 0, 2, 0, 1, 64,
0, 0, 5, 0, 0, 0,
164, 0, 0, 10, 242, 224,
17, 0, 1, 0, 0, 0,
6, 0, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 62, 0,
0, 1, 83, 84, 65, 84,
148, 0, 0, 0, 3, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0
};
================================================
FILE: amd_geometryfx/src/Shaders/inc/AMD_GeometryFX_DepthOnlyMultiIndirectVS.inc
================================================
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Buffer Definitions:
//
// cbuffer FrameConstantBuffer
// {
//
// float4x4 view; // Offset: 0 Size: 64 [unused]
// float4x4 projection; // Offset: 64 Size: 64
// uint cullFlags; // Offset: 128 Size: 4 [unused]
// uint windowWidth; // Offset: 132 Size: 4 [unused]
// uint windowHeight; // Offset: 136 Size: 4 [unused]
//
// }
//
// Resource bind info for drawConstants
// {
//
// struct SmallBatchDrawConstants
// {
//
// float4x4 world; // Offset: 0
// float4x4 worldView; // Offset: 64
// uint meshIndex; // Offset: 128
// uint padding[3]; // Offset: 132
//
// } $Element; // Offset: 0 Size: 144
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim HLSL Bind Count
// ------------------------------ ---------- ------- ----------- -------------- ------
// drawConstants texture struct r/o t3 1
// FrameConstantBuffer cbuffer NA NA cb1 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyzw
// DRAWID 0 x 1 NONE uint x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB1[8], immediateIndexed
dcl_resource_structured t3, 144
dcl_input v0.xyzw
dcl_input v1.x
dcl_output_siv o0.xyzw, position
dcl_temps 6
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r0.xyzw, v1.x, l(64), t3.xyzw
mov r1.x, r0.y
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r2.xyzw, v1.x, l(80), t3.xzyw
mov r1.y, r2.z
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r3.xyzw, v1.x, l(96), t3.xywz
mov r1.z, r3.y
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r4.xyzw, v1.x, l(112), t3.xyzw
mov r1.w, r4.y
dp4 r0.y, r1.xyzw, v0.xyzw
mul r1.xyzw, r0.yyyy, cb1[5].xyzw
mov r5.x, r0.x
mov r5.y, r2.x
mov r5.z, r3.x
mov r5.w, r4.x
dp4 r0.x, r5.xyzw, v0.xyzw
mad r1.xyzw, cb1[4].xyzw, r0.xxxx, r1.xyzw
mov r2.x, r0.z
mov r3.x, r0.w
mov r3.y, r2.w
mov r2.z, r3.w
mov r2.w, r4.z
mov r3.w, r4.w
dp4 r0.x, r3.xyzw, v0.xyzw
dp4 r0.y, r2.xyzw, v0.xyzw
mad r1.xyzw, cb1[6].xyzw, r0.yyyy, r1.xyzw
mad o0.xyzw, cb1[7].xyzw, r0.xxxx, r1.xyzw
ret
// Approximately 27 instruction slots used
#endif
const BYTE AMD_GeometryFX_DepthOnlyMultiIndirectVS[] =
{
68, 88, 66, 67, 53, 238,
48, 220, 26, 40, 69, 92,
248, 136, 104, 103, 139, 82,
63, 152, 1, 0, 0, 0,
16, 8, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
184, 3, 0, 0, 8, 4,
0, 0, 60, 4, 0, 0,
116, 7, 0, 0, 82, 68,
69, 70, 124, 3, 0, 0,
2, 0, 0, 0, 160, 0,
0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 0, 5,
254, 255, 0, 1, 0, 0,
84, 3, 0, 0, 82, 68,
49, 49, 60, 0, 0, 0,
24, 0, 0, 0, 32, 0,
0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0,
124, 0, 0, 0, 5, 0,
0, 0, 6, 0, 0, 0,
1, 0, 0, 0, 144, 0,
0, 0, 3, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 138, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 100, 114,
97, 119, 67, 111, 110, 115,
116, 97, 110, 116, 115, 0,
70, 114, 97, 109, 101, 67,
111, 110, 115, 116, 97, 110,
116, 66, 117, 102, 102, 101,
114, 0, 171, 171, 138, 0,
0, 0, 5, 0, 0, 0,
208, 0, 0, 0, 144, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 124, 0,
0, 0, 1, 0, 0, 0,
40, 2, 0, 0, 144, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 152, 1,
0, 0, 0, 0, 0, 0,
64, 0, 0, 0, 0, 0,
0, 0, 168, 1, 0, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 204, 1, 0, 0,
64, 0, 0, 0, 64, 0,
0, 0, 2, 0, 0, 0,
168, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
215, 1, 0, 0, 128, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 232, 1,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 12, 2,
0, 0, 132, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 232, 1, 0, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 24, 2, 0, 0,
136, 0, 0, 0, 4, 0,
0, 0, 0, 0, 0, 0,
232, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
118, 105, 101, 119, 0, 102,
108, 111, 97, 116, 52, 120,
52, 0, 171, 171, 3, 0,
3, 0, 4, 0, 4, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
157, 1, 0, 0, 112, 114,
111, 106, 101, 99, 116, 105,
111, 110, 0, 99, 117, 108,
108, 70, 108, 97, 103, 115,
0, 100, 119, 111, 114, 100,
0, 171, 0, 0, 19, 0,
1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 225, 1,
0, 0, 119, 105, 110, 100,
111, 119, 87, 105, 100, 116,
104, 0, 119, 105, 110, 100,
111, 119, 72, 101, 105, 103,
104, 116, 0, 171, 171, 171,
80, 2, 0, 0, 0, 0,
0, 0, 144, 0, 0, 0,
2, 0, 0, 0, 48, 3,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 36, 69,
108, 101, 109, 101, 110, 116,
0, 83, 109, 97, 108, 108,
66, 97, 116, 99, 104, 68,
114, 97, 119, 67, 111, 110,
115, 116, 97, 110, 116, 115,
0, 119, 111, 114, 108, 100,
0, 171, 3, 0, 3, 0,
4, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 157, 1,
0, 0, 119, 111, 114, 108,
100, 86, 105, 101, 119, 0,
109, 101, 115, 104, 73, 110,
100, 101, 120, 0, 0, 0,
19, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
225, 1, 0, 0, 112, 97,
100, 100, 105, 110, 103, 0,
0, 0, 19, 0, 1, 0,
1, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 225, 1, 0, 0,
113, 2, 0, 0, 120, 2,
0, 0, 0, 0, 0, 0,
156, 2, 0, 0, 120, 2,
0, 0, 64, 0, 0, 0,
166, 2, 0, 0, 176, 2,
0, 0, 128, 0, 0, 0,
212, 2, 0, 0, 220, 2,
0, 0, 132, 0, 0, 0,
5, 0, 0, 0, 1, 0,
36, 0, 0, 0, 4, 0,
0, 3, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 89, 2, 0, 0,
77, 105, 99, 114, 111, 115,
111, 102, 116, 32, 40, 82,
41, 32, 72, 76, 83, 76,
32, 83, 104, 97, 100, 101,
114, 32, 67, 111, 109, 112,
105, 108, 101, 114, 32, 49,
48, 46, 49, 0, 73, 83,
71, 78, 72, 0, 0, 0,
2, 0, 0, 0, 8, 0,
0, 0, 56, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
0, 0, 0, 0, 15, 15,
0, 0, 65, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 1, 1,
0, 0, 80, 79, 83, 73,
84, 73, 79, 78, 0, 68,
82, 65, 87, 73, 68, 0,
79, 83, 71, 78, 44, 0,
0, 0, 1, 0, 0, 0,
8, 0, 0, 0, 32, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
15, 0, 0, 0, 83, 86,
95, 80, 79, 83, 73, 84,
73, 79, 78, 0, 83, 72,
69, 88, 48, 3, 0, 0,
80, 0, 1, 0, 204, 0,
0, 0, 106, 8, 0, 1,
89, 0, 0, 4, 70, 142,
32, 0, 1, 0, 0, 0,
8, 0, 0, 0, 162, 0,
0, 4, 0, 112, 16, 0,
3, 0, 0, 0, 144, 0,
0, 0, 95, 0, 0, 3,
242, 16, 16, 0, 0, 0,
0, 0, 95, 0, 0, 3,
18, 16, 16, 0, 1, 0,
0, 0, 103, 0, 0, 4,
242, 32, 16, 0, 0, 0,
0, 0, 1, 0, 0, 0,
104, 0, 0, 2, 6, 0,
0, 0, 167, 0, 0, 139,
2, 131, 4, 128, 131, 153,
25, 0, 242, 0, 16, 0,
0, 0, 0, 0, 10, 16,
16, 0, 1, 0, 0, 0,
1, 64, 0, 0, 64, 0,
0, 0, 70, 126, 16, 0,
3, 0, 0, 0, 54, 0,
0, 5, 18, 0, 16, 0,
1, 0, 0, 0, 26, 0,
16, 0, 0, 0, 0, 0,
167, 0, 0, 139, 2, 131,
4, 128, 131, 153, 25, 0,
242, 0, 16, 0, 2, 0,
0, 0, 10, 16, 16, 0,
1, 0, 0, 0, 1, 64,
0, 0, 80, 0, 0, 0,
134, 125, 16, 0, 3, 0,
0, 0, 54, 0, 0, 5,
34, 0, 16, 0, 1, 0,
0, 0, 42, 0, 16, 0,
2, 0, 0, 0, 167, 0,
0, 139, 2, 131, 4, 128,
131, 153, 25, 0, 242, 0,
16, 0, 3, 0, 0, 0,
10, 16, 16, 0, 1, 0,
0, 0, 1, 64, 0, 0,
96, 0, 0, 0, 70, 123,
16, 0, 3, 0, 0, 0,
54, 0, 0, 5, 66, 0,
16, 0, 1, 0, 0, 0,
26, 0, 16, 0, 3, 0,
0, 0, 167, 0, 0, 139,
2, 131, 4, 128, 131, 153,
25, 0, 242, 0, 16, 0,
4, 0, 0, 0, 10, 16,
16, 0, 1, 0, 0, 0,
1, 64, 0, 0, 112, 0,
0, 0, 70, 126, 16, 0,
3, 0, 0, 0, 54, 0,
0, 5, 130, 0, 16, 0,
1, 0, 0, 0, 26, 0,
16, 0, 4, 0, 0, 0,
17, 0, 0, 7, 34, 0,
16, 0, 0, 0, 0, 0,
70, 14, 16, 0, 1, 0,
0, 0, 70, 30, 16, 0,
0, 0, 0, 0, 56, 0,
0, 8, 242, 0, 16, 0,
1, 0, 0, 0, 86, 5,
16, 0, 0, 0, 0, 0,
70, 142, 32, 0, 1, 0,
0, 0, 5, 0, 0, 0,
54, 0, 0, 5, 18, 0,
16, 0, 5, 0, 0, 0,
10, 0, 16, 0, 0, 0,
0, 0, 54, 0, 0, 5,
34, 0, 16, 0, 5, 0,
0, 0, 10, 0, 16, 0,
2, 0, 0, 0, 54, 0,
0, 5, 66, 0, 16, 0,
5, 0, 0, 0, 10, 0,
16, 0, 3, 0, 0, 0,
54, 0, 0, 5, 130, 0,
16, 0, 5, 0, 0, 0,
10, 0, 16, 0, 4, 0,
0, 0, 17, 0, 0, 7,
18, 0, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0,
5, 0, 0, 0, 70, 30,
16, 0, 0, 0, 0, 0,
50, 0, 0, 10, 242, 0,
16, 0, 1, 0, 0, 0,
70, 142, 32, 0, 1, 0,
0, 0, 4, 0, 0, 0,
6, 0, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0,
1, 0, 0, 0, 54, 0,
0, 5, 18, 0, 16, 0,
2, 0, 0, 0, 42, 0,
16, 0, 0, 0, 0, 0,
54, 0, 0, 5, 18, 0,
16, 0, 3, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 54, 0, 0, 5,
34, 0, 16, 0, 3, 0,
0, 0, 58, 0, 16, 0,
2, 0, 0, 0, 54, 0,
0, 5, 66, 0, 16, 0,
2, 0, 0, 0, 58, 0,
16, 0, 3, 0, 0, 0,
54, 0, 0, 5, 130, 0,
16, 0, 2, 0, 0, 0,
42, 0, 16, 0, 4, 0,
0, 0, 54, 0, 0, 5,
130, 0, 16, 0, 3, 0,
0, 0, 58, 0, 16, 0,
4, 0, 0, 0, 17, 0,
0, 7, 18, 0, 16, 0,
0, 0, 0, 0, 70, 14,
16, 0, 3, 0, 0, 0,
70, 30, 16, 0, 0, 0,
0, 0, 17, 0, 0, 7,
34, 0, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0,
2, 0, 0, 0, 70, 30,
16, 0, 0, 0, 0, 0,
50, 0, 0, 10, 242, 0,
16, 0, 1, 0, 0, 0,
70, 142, 32, 0, 1, 0,
0, 0, 6, 0, 0, 0,
86, 5, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0,
1, 0, 0, 0, 50, 0,
0, 10, 242, 32, 16, 0,
0, 0, 0, 0, 70, 142,
32, 0, 1, 0, 0, 0,
7, 0, 0, 0, 6, 0,
16, 0, 0, 0, 0, 0,
70, 14, 16, 0, 1, 0,
0, 0, 62, 0, 0, 1,
83, 84, 65, 84, 148, 0,
0, 0, 27, 0, 0, 0,
6, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
8, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0
};
================================================
FILE: amd_geometryfx/src/Shaders/inc/AMD_GeometryFX_DepthOnlyVS.inc
================================================
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Buffer Definitions:
//
// cbuffer DrawCallConstantBuffer
// {
//
// float4x4 world; // Offset: 0 Size: 64 [unused]
// float4x4 worldView; // Offset: 64 Size: 64
// uint meshIndex; // Offset: 128 Size: 4 [unused]
//
// }
//
// cbuffer FrameConstantBuffer
// {
//
// float4x4 view; // Offset: 0 Size: 64 [unused]
// float4x4 projection; // Offset: 64 Size: 64
// uint cullFlags; // Offset: 128 Size: 4 [unused]
// uint windowWidth; // Offset: 132 Size: 4 [unused]
// uint windowHeight; // Offset: 136 Size: 4 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim HLSL Bind Count
// ------------------------------ ---------- ------- ----------- -------------- ------
// DrawCallConstantBuffer cbuffer NA NA cb0 1
// FrameConstantBuffer cbuffer NA NA cb1 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyzw
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[8], immediateIndexed
dcl_constantbuffer CB1[8], immediateIndexed
dcl_input v0.xyzw
dcl_output_siv o0.xyzw, position
dcl_temps 2
mul r0.xyzw, v0.yyyy, cb0[5].xyzw
mad r0.xyzw, cb0[4].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb0[6].xyzw, v0.zzzz, r0.xyzw
mad r0.xyzw, cb0[7].xyzw, v0.wwww, r0.xyzw
mul r1.xyzw, r0.yyyy, cb1[5].xyzw
mad r1.xyzw, cb1[4].xyzw, r0.xxxx, r1.xyzw
mad r1.xyzw, cb1[6].xyzw, r0.zzzz, r1.xyzw
mad o0.xyzw, cb1[7].xyzw, r0.wwww, r1.xyzw
ret
// Approximately 9 instruction slots used
#endif
const BYTE AMD_GeometryFX_DepthOnlyVS[] =
{
68, 88, 66, 67, 106, 145,
199, 154, 220, 146, 221, 11,
92, 195, 184, 193, 5, 174,
198, 200, 1, 0, 0, 0,
180, 5, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
36, 3, 0, 0, 88, 3,
0, 0, 140, 3, 0, 0,
24, 5, 0, 0, 82, 68,
69, 70, 232, 2, 0, 0,
2, 0, 0, 0, 168, 0,
0, 0, 2, 0, 0, 0,
60, 0, 0, 0, 0, 5,
254, 255, 0, 1, 0, 0,
191, 2, 0, 0, 82, 68,
49, 49, 60, 0, 0, 0,
24, 0, 0, 0, 32, 0,
0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0,
124, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 147, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 68, 114,
97, 119, 67, 97, 108, 108,
67, 111, 110, 115, 116, 97,
110, 116, 66, 117, 102, 102,
101, 114, 0, 70, 114, 97,
109, 101, 67, 111, 110, 115,
116, 97, 110, 116, 66, 117,
102, 102, 101, 114, 0, 171,
124, 0, 0, 0, 3, 0,
0, 0, 216, 0, 0, 0,
144, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
147, 0, 0, 0, 5, 0,
0, 0, 196, 1, 0, 0,
144, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
80, 1, 0, 0, 0, 0,
0, 0, 64, 0, 0, 0,
0, 0, 0, 0, 96, 1,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 132, 1,
0, 0, 64, 0, 0, 0,
64, 0, 0, 0, 2, 0,
0, 0, 96, 1, 0, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 142, 1, 0, 0,
128, 0, 0, 0, 4, 0,
0, 0, 0, 0, 0, 0,
160, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
119, 111, 114, 108, 100, 0,
102, 108, 111, 97, 116, 52,
120, 52, 0, 171, 3, 0,
3, 0, 4, 0, 4, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
86, 1, 0, 0, 119, 111,
114, 108, 100, 86, 105, 101,
119, 0, 109, 101, 115, 104,
73, 110, 100, 101, 120, 0,
100, 119, 111, 114, 100, 0,
171, 171, 0, 0, 19, 0,
1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 152, 1,
0, 0, 140, 2, 0, 0,
0, 0, 0, 0, 64, 0,
0, 0, 0, 0, 0, 0,
96, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
145, 2, 0, 0, 64, 0,
0, 0, 64, 0, 0, 0,
2, 0, 0, 0, 96, 1,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 156, 2,
0, 0, 128, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 160, 1, 0, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 166, 2, 0, 0,
132, 0, 0, 0, 4, 0,
0, 0, 0, 0, 0, 0,
160, 1, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
178, 2, 0, 0, 136, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 160, 1,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 118, 105,
101, 119, 0, 112, 114, 111,
106, 101, 99, 116, 105, 111,
110, 0, 99, 117, 108, 108,
70, 108, 97, 103, 115, 0,
119, 105, 110, 100, 111, 119,
87, 105, 100, 116, 104, 0,
119, 105, 110, 100, 111, 119,
72, 101, 105, 103, 104, 116,
0, 77, 105, 99, 114, 111,
115, 111, 102, 116, 32, 40,
82, 41, 32, 72, 76, 83,
76, 32, 83, 104, 97, 100,
101, 114, 32, 67, 111, 109,
112, 105, 108, 101, 114, 32,
49, 48, 46, 49, 0, 171,
73, 83, 71, 78, 44, 0,
0, 0, 1, 0, 0, 0,
8, 0, 0, 0, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
15, 15, 0, 0, 80, 79,
83, 73, 84, 73, 79, 78,
0, 171, 171, 171, 79, 83,
71, 78, 44, 0, 0, 0,
1, 0, 0, 0, 8, 0,
0, 0, 32, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 3, 0, 0, 0,
0, 0, 0, 0, 15, 0,
0, 0, 83, 86, 95, 80,
79, 83, 73, 84, 73, 79,
78, 0, 83, 72, 69, 88,
132, 1, 0, 0, 80, 0,
1, 0, 97, 0, 0, 0,
106, 8, 0, 1, 89, 0,
0, 4, 70, 142, 32, 0,
0, 0, 0, 0, 8, 0,
0, 0, 89, 0, 0, 4,
70, 142, 32, 0, 1, 0,
0, 0, 8, 0, 0, 0,
95, 0, 0, 3, 242, 16,
16, 0, 0, 0, 0, 0,
103, 0, 0, 4, 242, 32,
16, 0, 0, 0, 0, 0,
1, 0, 0, 0, 104, 0,
0, 2, 2, 0, 0, 0,
56, 0, 0, 8, 242, 0,
16, 0, 0, 0, 0, 0,
86, 21, 16, 0, 0, 0,
0, 0, 70, 142, 32, 0,
0, 0, 0, 0, 5, 0,
0, 0, 50, 0, 0, 10,
242, 0, 16, 0, 0, 0,
0, 0, 70, 142, 32, 0,
0, 0, 0, 0, 4, 0,
0, 0, 6, 16, 16, 0,
0, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0,
50, 0, 0, 10, 242, 0,
16, 0, 0, 0, 0, 0,
70, 142, 32, 0, 0, 0,
0, 0, 6, 0, 0, 0,
166, 26, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0,
0, 0, 0, 0, 50, 0,
0, 10, 242, 0, 16, 0,
0, 0, 0, 0, 70, 142,
32, 0, 0, 0, 0, 0,
7, 0, 0, 0, 246, 31,
16, 0, 0, 0, 0, 0,
70, 14, 16, 0, 0, 0,
0, 0, 56, 0, 0, 8,
242, 0, 16, 0, 1, 0,
0, 0, 86, 5, 16, 0,
0, 0, 0, 0, 70, 142,
32, 0, 1, 0, 0, 0,
5, 0, 0, 0, 50, 0,
0, 10, 242, 0, 16, 0,
1, 0, 0, 0, 70, 142,
32, 0, 1, 0, 0, 0,
4, 0, 0, 0, 6, 0,
16, 0, 0, 0, 0, 0,
70, 14, 16, 0, 1, 0,
0, 0, 50, 0, 0, 10,
242, 0, 16, 0, 1, 0,
0, 0, 70, 142, 32, 0,
1, 0, 0, 0, 6, 0,
0, 0, 166, 10, 16, 0,
0, 0, 0, 0, 70, 14,
16, 0, 1, 0, 0, 0,
50, 0, 0, 10, 242, 32,
16, 0, 0, 0, 0, 0,
70, 142, 32, 0, 1, 0,
0, 0, 7, 0, 0, 0,
246, 15, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0,
1, 0, 0, 0, 62, 0,
0, 1, 83, 84, 65, 84,
148, 0, 0, 0, 9, 0,
0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 2, 0,
0, 0, 8, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0
};
================================================
FILE: amd_geometryfx/src/Shaders/inc/AMD_GeometryFX_FilterCS.inc
================================================
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Buffer Definitions:
//
// cbuffer FrameConstantBuffer
// {
//
// float4x4 view; // Offset: 0 Size: 64 [unused]
// float4x4 projection; // Offset: 64 Size: 64
// uint cullFlags; // Offset: 128 Size: 4
// uint windowWidth; // Offset: 132 Size: 4
// uint windowHeight; // Offset: 136 Size: 4
//
// }
//
// Resource bind info for meshConstants
// {
//
// struct MeshConstants
// {
//
// uint vertexCount; // Offset: 0
// uint faceCount; // Offset: 4
// uint indexOffset; // Offset: 8
// uint vertexOffset; // Offset: 12
//
// } $Element; // Offset: 0 Size: 16
//
// }
//
// Resource bind info for drawConstants
// {
//
// struct SmallBatchDrawConstants
// {
//
// float4x4 world; // Offset: 0
// float4x4 worldView; // Offset: 64
// uint meshIndex; // Offset: 128
// uint padding[3]; // Offset: 132
//
// } $Element; // Offset: 0 Size: 144
//
// }
//
// Resource bind info for smallBatchData
// {
//
// struct SmallBatchData
// {
//
// uint meshIndex; // Offset: 0
// uint indexOffset; // Offset: 4
// uint faceCount; // Offset: 8
// uint outputIndexOffset; // Offset: 12
// uint drawIndex; // Offset: 16
// uint drawBatchStart; // Offset: 20
//
// } $Element; // Offset: 0 Size: 24
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim HLSL Bind Count
// ------------------------------ ---------- ------- ----------- -------------- ------
// vertexData texture byte r/o t0 1
// indexData texture uint buf t1 1
// meshConstants texture struct r/o t2 1
// drawConstants texture struct r/o t3 1
// smallBatchData texture struct r/o t4 1
// filteredIndices UAV uint buf u0 1
// indirectArgs UAV uint buf u1 1
// FrameConstantBuffer cbuffer NA NA cb1 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Input
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
cs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB1[9], immediateIndexed
dcl_resource_raw t0
dcl_resource_buffer (uint,uint,uint,uint) t1
dcl_resource_structured t2, 16
dcl_resource_structured t3, 144
dcl_resource_structured t4, 24
dcl_uav_typed_buffer (uint,uint,uint,uint) u0
dcl_uav_typed_buffer (uint,uint,uint,uint) u1
dcl_input vThreadGroupID.x
dcl_input vThreadIDInGroup.x
dcl_temps 11
dcl_tgsm_raw g0, 4
dcl_tgsm_raw g1, 4
dcl_thread_group 256, 1, 1
ieq r0.x, vThreadIDInGroup.x, l(0)
if_z vThreadIDInGroup.x
store_raw g1.x, l(0), l(0)
endif
sync_g_t
ld_structured_indexable(structured_buffer, stride=24)(mixed,mixed,mixed,mixed) r1.xyzw, vThreadGroupID.x, l(0), t4.xyzw
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r0.yz, r1.x, l(8), t2.xxyx
iadd r0.y, r1.y, r0.y
ushr r0.y, r0.y, l(2)
ld_structured_indexable(structured_buffer, stride=24)(mixed,mixed,mixed,mixed) r1.xy, vThreadGroupID.x, l(16), t4.xyxx
ult r0.w, vThreadIDInGroup.x, r1.z
if_nz r0.w
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r2.xyzw, r1.x, l(64), t3.xyzw
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r3.xyzw, r1.x, l(80), t3.xyzw
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r4.xyzw, r1.x, l(96), t3.xyzw
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r5.xyzw, r1.x, l(112), t3.xyzw
imad r0.w, vThreadIDInGroup.x, l(3), r0.y
ld_indexable(buffer)(uint,uint,uint,uint) r1.z, r0.wwww, t1.yzxw
iadd r6.xy, r0.wwww, l(1, 2, 0, 0)
ld_indexable(buffer)(uint,uint,uint,uint) r0.w, r6.xxxx, t1.yzwx
ld_indexable(buffer)(uint,uint,uint,uint) r6.x, r6.yyyy, t1.xyzw
imad r6.y, r1.z, l(12), r0.z
ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r7.xyz, r6.y, t0.xyzx
mov r8.x, r2.x
mov r8.y, r3.x
mov r8.z, r4.x
mov r8.w, r5.x
mov r7.w, l(1.000000)
dp4 r2.x, r8.xyzw, r7.xyzw
mov r9.x, r2.y
mov r9.y, r3.y
mov r9.z, r4.y
mov r9.w, r5.y
dp4 r2.y, r9.xyzw, r7.xyzw
mov r10.x, r2.z
mov r10.y, r3.z
mov r10.z, r4.z
mov r10.w, r5.z
dp4 r2.z, r10.xyzw, r7.xyzw
mov r5.x, r2.w
mov r5.y, r3.w
mov r5.z, r4.w
dp4 r2.w, r5.xyzw, r7.xyzw
mul r3.xyz, r2.yyyy, cb1[5].xywx
mad r3.xyz, cb1[4].xywx, r2.xxxx, r3.xyzx
mad r2.xyz, cb1[6].xywx, r2.zzzz, r3.xyzx
mad r2.xyz, cb1[7].xywx, r2.wwww, r2.xyzx
imad r2.w, r0.w, l(12), r0.z
ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r3.xyz, r2.w, t0.xyzx
mov r3.w, l(1.000000)
dp4 r2.w, r8.xyzw, r3.xyzw
dp4 r4.x, r9.xyzw, r3.xyzw
dp4 r4.y, r10.xyzw, r3.xyzw
dp4 r3.x, r5.xyzw, r3.xyzw
mul r3.yzw, r4.xxxx, cb1[5].wwxy
mad r3.yzw, cb1[4].wwxy, r2.wwww, r3.yyzw
mad r3.yzw, cb1[6].wwxy, r4.yyyy, r3.yyzw
mad r3.xyz, cb1[7].wxyw, r3.xxxx, r3.yzwy
imad r2.w, r6.x, l(12), r0.z
ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r4.xyz, r2.w, t0.xyzx
mov r4.w, l(1.000000)
dp4 r2.w, r8.xyzw, r4.xyzw
dp4 r3.w, r9.xyzw, r4.xyzw
dp4 r6.y, r10.xyzw, r4.xyzw
dp4 r4.x, r5.xyzw, r4.xyzw
mul r4.yzw, r3.wwww, cb1[5].yywx
mad r4.yzw, cb1[4].yywx, r2.wwww, r4.yyzw
mad r4.yzw, cb1[6].yywx, r6.yyyy, r4.yyzw
mad r4.xyz, cb1[7].ywxy, r4.xxxx, r4.yzwy
and r5.xyzw, l(1, 2, 32, 8), cb1[8].xxxx
ieq r2.w, r0.w, r1.z
ieq r0.w, r0.w, r6.x
or r0.w, r0.w, r2.w
ieq r1.z, r1.z, r6.x
or r0.w, r0.w, r1.z
movc r0.w, r5.x, r0.w, l(0)
mul r6.xyz, r3.xyzx, r4.xyzx
mad r6.xyz, r3.zxyz, r4.yzxy, -r6.xyzx
dp3 r1.z, r6.xyzx, r2.xyzx
lt r1.z, l(0.000000), r1.z
or r1.z, r0.w, r1.z
movc r0.w, r5.y, r1.z, r0.w
div r2.xy, r2.xyxx, r2.zzzz
mad r2.xy, r2.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
lt r1.z, r2.z, l(0.000000)
and r1.z, r1.z, l(1)
div r2.zw, r3.yyyz, r3.xxxx
mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000), l(0.000000, 0.000000, 0.500000, 0.500000)
lt r3.x, r3.x, l(0.000000)
iadd r1.z, r1.z, -r3.x
div r3.xy, r4.zxzz, r4.yyyy
mad r3.xy, r3.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
lt r3.z, r4.y, l(0.000000)
iadd r1.z, r1.z, -r3.z
if_nz r5.z
utof r3.zw, cb1[8].yyyz
mul r4.xy, r2.xyxx, r3.zwzz
lt r4.zw, r4.xxxy, l(0.000000, 0.000000, -8388608.000000, -8388608.000000)
lt r5.xy, l(8388608.000000, 8388608.000000, 0.000000, 0.000000), r4.xyxx
or r4.z, r4.z, r5.x
or r4.z, r4.w, r4.z
or r4.z, r5.y, r4.z
not r4.z, r4.z
mul r4.xy, r4.xyxx, l(256.000000, 256.000000, 0.000000, 0.000000)
ftoi r4.xy, r4.xyxx
imin r6.xyzw, r4.xxyy, l(0x40000000, 0x40000000, 0x40000000, 0x40000000)
imax r4.xy, r4.xyxx, l(0xc0000000, 0xc0000000, 0, 0)
mul r5.xy, r2.zwzz, r3.zwzz
lt r7.xy, r5.xyxx, l(-8388608.000000, -8388608.000000, 0.000000, 0.000000)
lt r7.zw, l(0.000000, 0.000000, 8388608.000000, 8388608.000000), r5.xxxy
or r4.w, r7.z, r7.x
or r4.w, r7.y, r4.w
or r4.w, r7.w, r4.w
mul r5.xy, r5.xyxx, l(256.000000, 256.000000, 0.000000, 0.000000)
ftoi r5.xy, r5.xyxx
imin r6.xyzw, r6.xyzw, r5.xxyy
imax r4.xy, r4.xyxx, r5.xyxx
mul r3.zw, r3.zzzw, r3.xxxy
lt r5.xy, r3.zwzz, l(-8388608.000000, -8388608.000000, 0.000000, 0.000000)
lt r7.xy, l(8388608.000000, 8388608.000000, 0.000000, 0.000000), r3.zwzz
or r5.x, r5.x, r7.x
or r5.x, r5.y, r5.x
or r5.x, r7.y, r5.x
or r4.w, r4.w, r5.x
movc r4.z, r4.w, l(0), r4.z
mul r3.zw, r3.zzzw, l(0.000000, 0.000000, 256.000000, 256.000000)
ftoi r3.zw, r3.zzzw
imin r6.xyzw, r6.xyzw, r3.zzww
imax r3.zw, r4.xxxy, r3.zzzw
ieq r4.x, r1.z, l(0)
and r4.x, r4.z, r4.x
and r6.xyzw, r6.xyzw, l(255, -256, 255, -256)
ult r4.yz, l(0, 128, 128, 0), r6.xxzx
iadd r3.zw, r3.zzzw, -r6.yyyw
iadd r3.zw, r3.zzzw, l(0, 0, -128, -128)
ult r3.zw, r3.zzzw, l(0, 0, 255, 255)
and r3.zw, r3.zzzw, r4.yyyz
or r3.z, r0.w, r3.z
or r3.z, r3.w, r3.z
movc r0.w, r4.x, r3.z, r0.w
endif
ieq r3.z, r1.z, l(3)
or r3.z, r0.w, r3.z
min r4.xy, r2.zwzz, r2.xyxx
min r4.xy, r3.xyxx, r4.xyxx
max r2.xy, r2.zwzz, r2.xyxx
max r2.xy, r3.xyxx, r2.xyxx
lt r2.xy, r2.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
or r2.x, r2.x, r3.z
or r2.x, r2.y, r2.x
lt r2.yz, l(0.000000, 1.000000, 1.000000, 0.000000), r4.xxyx
or r2.x, r2.y, r2.x
or r2.x, r2.z, r2.x
movc r1.z, r1.z, r3.z, r2.x
movc r0.w, r5.w, r1.z, r0.w
if_z r0.w
imm_atomic_iadd r2.x, g1, l(0), l(3)
else
mov r2.x, l(0)
endif
else
mov r0.w, l(-1)
mov r2.x, l(0)
endif
sync_g_t
if_z vThreadIDInGroup.x
imul null, r1.z, r1.x, l(5)
ld_raw r2.y, l(0), g1.xxxx
imm_atomic_iadd r3.x, u1, r1.z, r2.y
store_raw g0.x, l(0), r3.x
endif
sync_uglobal_g_t
if_z r0.w
ld_raw r0.w, l(0), g0.xxxx
ushr r1.z, r1.w, l(2)
iadd r0.w, r0.w, r1.z
iadd r0.w, r2.x, r0.w
imad r0.y, vThreadIDInGroup.x, l(3), r0.y
ld_indexable(buffer)(uint,uint,uint,uint) r1.z, r0.yyyy, t1.yzxw
store_uav_typed u0.xyzw, r0.wwww, r1.zzzz
iadd r1.zw, r0.wwww, l(0, 0, 1, 2)
iadd r2.xy, r0.yyyy, l(1, 2, 0, 0)
ld_indexable(buffer)(uint,uint,uint,uint) r0.y, r2.xxxx, t1.yxzw
store_uav_typed u0.xyzw, r1.zzzz, r0.yyyy
ld_indexable(buffer)(uint,uint,uint,uint) r0.y, r2.yyyy, t1.yxzw
store_uav_typed u0.xyzw, r1.wwww, r0.yyyy
endif
ieq r0.y, r1.y, vThreadGroupID.x
and r0.x, r0.y, r0.x
if_nz r0.x
imul null, r0.x, r1.x, l(5)
imad r1.yzw, r1.xxxx, l(0, 5, 5, 5), l(0, 2, 3, 4)
ld_structured_indexable(structured_buffer, stride=24)(mixed,mixed,mixed,mixed) r0.y, vThreadGroupID.x, l(12), t4.xxxx
ushr r0.y, r0.y, l(2)
store_uav_typed u1.xyzw, r1.yyyy, r0.yyyy
udiv r0.y, null, r0.z, l(12)
store_uav_typed u1.xyzw, r1.zzzz, r0.yyyy
store_uav_typed u1.xyzw, r1.wwww, r1.xxxx
endif
ret
// Approximately 200 instruction slots used
#endif
const BYTE AMD_GeometryFX_FilterCS[] =
{
68, 88, 66, 67, 242, 197,
3, 91, 69, 63, 19, 115,
124, 249, 48, 42, 37, 36,
187, 83, 1, 0, 0, 0,
168, 30, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
132, 6, 0, 0, 148, 6,
0, 0, 164, 6, 0, 0,
12, 30, 0, 0, 82, 68,
69, 70, 72, 6, 0, 0,
4, 0, 0, 0, 176, 1,
0, 0, 8, 0, 0, 0,
60, 0, 0, 0, 0, 5,
83, 67, 0, 1, 0, 0,
32, 6, 0, 0, 82, 68,
49, 49, 60, 0, 0, 0,
24, 0, 0, 0, 32, 0,
0, 0, 40, 0, 0, 0,
36, 0, 0, 0, 12, 0,
0, 0, 0, 0, 0, 0,
60, 1, 0, 0, 7, 0,
0, 0, 6, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 71, 1, 0, 0,
2, 0, 0, 0, 4, 0,
0, 0, 1, 0, 0, 0,
255, 255, 255, 255, 1, 0,
0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 81, 1,
0, 0, 5, 0, 0, 0,
6, 0, 0, 0, 1, 0,
0, 0, 16, 0, 0, 0,
2, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
95, 1, 0, 0, 5, 0,
0, 0, 6, 0, 0, 0,
1, 0, 0, 0, 144, 0,
0, 0, 3, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 109, 1, 0, 0,
5, 0, 0, 0, 6, 0,
0, 0, 1, 0, 0, 0,
24, 0, 0, 0, 4, 0,
0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 124, 1,
0, 0, 4, 0, 0, 0,
4, 0, 0, 0, 1, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
140, 1, 0, 0, 4, 0,
0, 0, 4, 0, 0, 0,
1, 0, 0, 0, 255, 255,
255, 255, 1, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 153, 1, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 118, 101,
114, 116, 101, 120, 68, 97,
116, 97, 0, 105, 110, 100,
101, 120, 68, 97, 116, 97,
0, 109, 101, 115, 104, 67,
111, 110, 115, 116, 97, 110,
116, 115, 0, 100, 114, 97,
119, 67, 111, 110, 115, 116,
97, 110, 116, 115, 0, 115,
109, 97, 108, 108, 66, 97,
116, 99, 104, 68, 97, 116,
97, 0, 102, 105, 108, 116,
101, 114, 101, 100, 73, 110,
100, 105, 99, 101, 115, 0,
105, 110, 100, 105, 114, 101,
99, 116, 65, 114, 103, 115,
0, 70, 114, 97, 109, 101,
67, 111, 110, 115, 116, 97,
110, 116, 66, 117, 102, 102,
101, 114, 0, 171, 171, 171,
153, 1, 0, 0, 5, 0,
0, 0, 16, 2, 0, 0,
144, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
81, 1, 0, 0, 1, 0,
0, 0, 104, 3, 0, 0,
16, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
95, 1, 0, 0, 1, 0,
0, 0, 80, 4, 0, 0,
144, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
109, 1, 0, 0, 1, 0,
0, 0, 80, 5, 0, 0,
24, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
216, 2, 0, 0, 0, 0,
0, 0, 64, 0, 0, 0,
0, 0, 0, 0, 232, 2,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 12, 3,
0, 0, 64, 0, 0, 0,
64, 0, 0, 0, 2, 0,
0, 0, 232, 2, 0, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 23, 3, 0, 0,
128, 0, 0, 0, 4, 0,
0, 0, 2, 0, 0, 0,
40, 3, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
76, 3, 0, 0, 132, 0,
0, 0, 4, 0, 0, 0,
2, 0, 0, 0, 40, 3,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 88, 3,
0, 0, 136, 0, 0, 0,
4, 0, 0, 0, 2, 0,
0, 0, 40, 3, 0, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 118, 105, 101, 119,
0, 102, 108, 111, 97, 116,
52, 120, 52, 0, 171, 171,
3, 0, 3, 0, 4, 0,
4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 221, 2, 0, 0,
112, 114, 111, 106, 101, 99,
116, 105, 111, 110, 0, 99,
117, 108, 108, 70, 108, 97,
103, 115, 0, 100, 119, 111,
114, 100, 0, 171, 0, 0,
19, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
33, 3, 0, 0, 119, 105,
110, 100, 111, 119, 87, 105,
100, 116, 104, 0, 119, 105,
110, 100, 111, 119, 72, 101,
105, 103, 104, 116, 0, 171,
171, 171, 144, 3, 0, 0,
0, 0, 0, 0, 16, 0,
0, 0, 2, 0, 0, 0,
44, 4, 0, 0, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
36, 69, 108, 101, 109, 101,
110, 116, 0, 77, 101, 115,
104, 67, 111, 110, 115, 116,
97, 110, 116, 115, 0, 118,
101, 114, 116, 101, 120, 67,
111, 117, 110, 116, 0, 171,
0, 0, 19, 0, 1, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 33, 3, 0, 0,
102, 97, 99, 101, 67, 111,
117, 110, 116, 0, 105, 110,
100, 101, 120, 79, 102, 102,
115, 101, 116, 0, 118, 101,
114, 116, 101, 120, 79, 102,
102, 115, 101, 116, 0, 171,
167, 3, 0, 0, 180, 3,
0, 0, 0, 0, 0, 0,
216, 3, 0, 0, 180, 3,
0, 0, 4, 0, 0, 0,
226, 3, 0, 0, 180, 3,
0, 0, 8, 0, 0, 0,
238, 3, 0, 0, 180, 3,
0, 0, 12, 0, 0, 0,
5, 0, 0, 0, 1, 0,
4, 0, 0, 0, 4, 0,
252, 3, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 153, 3, 0, 0,
144, 3, 0, 0, 0, 0,
0, 0, 144, 0, 0, 0,
2, 0, 0, 0, 44, 5,
0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 83, 109,
97, 108, 108, 66, 97, 116,
99, 104, 68, 114, 97, 119,
67, 111, 110, 115, 116, 97,
110, 116, 115, 0, 119, 111,
114, 108, 100, 0, 171, 171,
3, 0, 3, 0, 4, 0,
4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 221, 2, 0, 0,
119, 111, 114, 108, 100, 86,
105, 101, 119, 0, 109, 101,
115, 104, 73, 110, 100, 101,
120, 0, 112, 97, 100, 100,
105, 110, 103, 0, 0, 0,
19, 0, 1, 0, 1, 0,
3, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
33, 3, 0, 0, 144, 4,
0, 0, 152, 4, 0, 0,
0, 0, 0, 0, 188, 4,
0, 0, 152, 4, 0, 0,
64, 0, 0, 0, 198, 4,
0, 0, 180, 3, 0, 0,
128, 0, 0, 0, 208, 4,
0, 0, 216, 4, 0, 0,
132, 0, 0, 0, 5, 0,
0, 0, 1, 0, 36, 0,
0, 0, 4, 0, 252, 4,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
120, 4, 0, 0, 144, 3,
0, 0, 0, 0, 0, 0,
24, 0, 0, 0, 2, 0,
0, 0, 252, 5, 0, 0,
0, 0, 0, 0, 255, 255,
255, 255, 0, 0, 0, 0,
255, 255, 255, 255, 0, 0,
0, 0, 83, 109, 97, 108,
108, 66, 97, 116, 99, 104,
68, 97, 116, 97, 0, 111,
117, 116, 112, 117, 116, 73,
110, 100, 101, 120, 79, 102,
102, 115, 101, 116, 0, 100,
114, 97, 119, 73, 110, 100,
101, 120, 0, 100, 114, 97,
119, 66, 97, 116, 99, 104,
83, 116, 97, 114, 116, 0,
171, 171, 198, 4, 0, 0,
180, 3, 0, 0, 0, 0,
0, 0, 226, 3, 0, 0,
180, 3, 0, 0, 4, 0,
0, 0, 216, 3, 0, 0,
180, 3, 0, 0, 8, 0,
0, 0, 135, 5, 0, 0,
180, 3, 0, 0, 12, 0,
0, 0, 153, 5, 0, 0,
180, 3, 0, 0, 16, 0,
0, 0, 163, 5, 0, 0,
180, 3, 0, 0, 20, 0,
0, 0, 5, 0, 0, 0,
1, 0, 6, 0, 0, 0,
6, 0, 180, 5, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 120, 5,
0, 0, 77, 105, 99, 114,
111, 115, 111, 102, 116, 32,
40, 82, 41, 32, 72, 76,
83, 76, 32, 83, 104, 97,
100, 101, 114, 32, 67, 111,
109, 112, 105, 108, 101, 114,
32, 49, 48, 46, 49, 0,
73, 83, 71, 78, 8, 0,
0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 79, 83,
71, 78, 8, 0, 0, 0,
0, 0, 0, 0, 8, 0,
0, 0, 83, 72, 69, 88,
96, 23, 0, 0, 80, 0,
5, 0, 216, 5, 0, 0,
106, 8, 0, 1, 89, 0,
0, 4, 70, 142, 32, 0,
1, 0, 0, 0, 9, 0,
0, 0, 161, 0, 0, 3,
0, 112, 16, 0, 0, 0,
0, 0, 88, 8, 0, 4,
0, 112, 16, 0, 1, 0,
0, 0, 68, 68, 0, 0,
162, 0, 0, 4, 0, 112,
16, 0, 2, 0, 0, 0,
16, 0, 0, 0, 162, 0,
0, 4, 0, 112, 16, 0,
3, 0, 0, 0, 144, 0,
0, 0, 162, 0, 0, 4,
0, 112, 16, 0, 4, 0,
0, 0, 24, 0, 0, 0,
156, 8, 0, 4, 0, 224,
17, 0, 0, 0, 0, 0,
68, 68, 0, 0, 156, 8,
0, 4, 0, 224, 17, 0,
1, 0, 0, 0, 68, 68,
0, 0, 95, 0, 0, 2,
18, 16, 2, 0, 95, 0,
0, 2, 18, 32, 2, 0,
104, 0, 0, 2, 11, 0,
0, 0, 159, 0, 0, 4,
0, 240, 17, 0, 0, 0,
0, 0, 4, 0, 0, 0,
159, 0, 0, 4, 0, 240,
17, 0, 1, 0, 0, 0,
4, 0, 0, 0, 155, 0,
0, 4, 0, 1, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 32, 0, 0, 6,
18, 0, 16, 0, 0, 0,
0, 0, 10, 32, 2, 0,
1, 64, 0, 0, 0, 0,
0, 0, 31, 0, 0, 2,
10, 32, 2, 0, 166, 0,
0, 7, 18, 240, 17, 0,
1, 0, 0, 0, 1, 64,
0, 0, 0, 0, 0, 0,
1, 64, 0, 0, 0, 0,
0, 0, 21, 0, 0, 1,
190, 24, 0, 1, 167, 0,
0, 138, 2, 195, 0, 128,
131, 153, 25, 0, 242, 0,
16, 0, 1, 0, 0, 0,
10, 16, 2, 0, 1, 64,
0, 0, 0, 0, 0, 0,
70, 126, 16, 0, 4, 0,
0, 0, 167, 0, 0, 139,
2, 131, 0, 128, 131, 153,
25, 0, 98, 0, 16, 0,
0, 0, 0, 0, 10, 0,
16, 0, 1, 0, 0, 0,
1, 64, 0, 0, 8, 0,
0, 0, 6, 113, 16, 0,
2, 0, 0, 0, 30, 0,
0, 7, 34, 0, 16, 0,
0, 0, 0, 0, 26, 0,
16, 0, 1, 0, 0, 0,
26, 0, 16, 0, 0, 0,
0, 0, 85, 0, 0, 7,
34, 0, 16, 0, 0, 0,
0, 0, 26, 0, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 2, 0, 0, 0,
167, 0, 0, 138, 2, 195,
0, 128, 131, 153, 25, 0,
50, 0, 16, 0, 1, 0,
0, 0, 10, 16, 2, 0,
1, 64, 0, 0, 16, 0,
0, 0, 70, 112, 16, 0,
4, 0, 0, 0, 79, 0,
0, 6, 130, 0, 16, 0,
0, 0, 0, 0, 10, 32,
2, 0, 42, 0, 16, 0,
1, 0, 0, 0, 31, 0,
4, 3, 58, 0, 16, 0,
0, 0, 0, 0, 167, 0,
0, 139, 2, 131, 4, 128,
131, 153, 25, 0, 242, 0,
16, 0, 2, 0, 0, 0,
10, 0, 16, 0, 1, 0,
0, 0, 1, 64, 0, 0,
64, 0, 0, 0, 70, 126,
16, 0, 3, 0, 0, 0,
167, 0, 0, 139, 2, 131,
4, 128, 131, 153, 25, 0,
242, 0, 16, 0, 3, 0,
0, 0, 10, 0, 16, 0,
1, 0, 0, 0, 1, 64,
0, 0, 80, 0, 0, 0,
70, 126, 16, 0, 3, 0,
0, 0, 167, 0, 0, 139,
2, 131, 4, 128, 131, 153,
25, 0, 242, 0, 16, 0,
4, 0, 0, 0, 10, 0,
16, 0, 1, 0, 0, 0,
1, 64, 0, 0, 96, 0,
0, 0, 70, 126, 16, 0,
3, 0, 0, 0, 167, 0,
0, 139, 2, 131, 4, 128,
131, 153, 25, 0, 242, 0,
16, 0, 5, 0, 0, 0,
10, 0, 16, 0, 1, 0,
0, 0, 1, 64, 0, 0,
112, 0, 0, 0, 70, 126,
16, 0, 3, 0, 0, 0,
35, 0, 0, 8, 130, 0,
16, 0, 0, 0, 0, 0,
10, 32, 2, 0, 1, 64,
0, 0, 3, 0, 0, 0,
26, 0, 16, 0, 0, 0,
0, 0, 45, 0, 0, 137,
66, 0, 0, 128, 3, 17,
17, 0, 66, 0, 16, 0,
1, 0, 0, 0, 246, 15,
16, 0, 0, 0, 0, 0,
150, 124, 16, 0, 1, 0,
0, 0, 30, 0, 0, 10,
50, 0, 16, 0, 6, 0,
0, 0, 246, 15, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 1, 0, 0, 0,
2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
45, 0, 0, 137, 66, 0,
0, 128, 3, 17, 17, 0,
130, 0, 16, 0, 0, 0,
0, 0, 6, 0, 16, 0,
6, 0, 0, 0, 150, 115,
16, 0, 1, 0, 0, 0,
45, 0, 0, 137, 66, 0,
0, 128, 3, 17, 17, 0,
18, 0, 16, 0, 6, 0,
0, 0, 86, 5, 16, 0,
6, 0, 0, 0, 70, 126,
16, 0, 1, 0, 0, 0,
35, 0, 0, 9, 34, 0,
16, 0, 6, 0, 0, 0,
42, 0, 16, 0, 1, 0,
0, 0, 1, 64, 0, 0,
12, 0, 0, 0, 42, 0,
16, 0, 0, 0, 0, 0,
165, 0, 0, 137, 194, 2,
0, 128, 131, 153, 25, 0,
114, 0, 16, 0, 7, 0,
0, 0, 26, 0, 16, 0,
6, 0, 0, 0, 70, 114,
16, 0, 0, 0, 0, 0,
54, 0, 0, 5, 18, 0,
16, 0, 8, 0, 0, 0,
10, 0, 16, 0, 2, 0,
0, 0, 54, 0, 0, 5,
34, 0, 16, 0, 8, 0,
0, 0, 10, 0, 16, 0,
3, 0, 0, 0, 54, 0,
0, 5, 66, 0, 16, 0,
8, 0, 0, 0, 10, 0,
16, 0, 4, 0, 0, 0,
54, 0, 0, 5, 130, 0,
16, 0, 8, 0, 0, 0,
10, 0, 16, 0, 5, 0,
0, 0, 54, 0, 0, 5,
130, 0, 16, 0, 7, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 17, 0,
0, 7, 18, 0, 16, 0,
2, 0, 0, 0, 70, 14,
16, 0, 8, 0, 0, 0,
70, 14, 16, 0, 7, 0,
0, 0, 54, 0, 0, 5,
18, 0, 16, 0, 9, 0,
0, 0, 26, 0, 16, 0,
2, 0, 0, 0, 54, 0,
0, 5, 34, 0, 16, 0,
9, 0, 0, 0, 26, 0,
16, 0, 3, 0, 0, 0,
54, 0, 0, 5, 66, 0,
16, 0, 9, 0, 0, 0,
26, 0, 16, 0, 4, 0,
0, 0, 54, 0, 0, 5,
130, 0, 16, 0, 9, 0,
0, 0, 26, 0, 16, 0,
5, 0, 0, 0, 17, 0,
0, 7, 34, 0, 16, 0,
2, 0, 0, 0, 70, 14,
16, 0, 9, 0, 0, 0,
70, 14, 16, 0, 7, 0,
0, 0, 54, 0, 0, 5,
18, 0, 16, 0, 10, 0,
0, 0, 42, 0, 16, 0,
2, 0, 0, 0, 54, 0,
0, 5, 34, 0, 16, 0,
10, 0, 0, 0, 42, 0,
16, 0, 3, 0, 0, 0,
54, 0, 0, 5, 66, 0,
16, 0, 10, 0, 0, 0,
42, 0, 16, 0, 4, 0,
0, 0, 54, 0, 0, 5,
130, 0, 16, 0, 10, 0,
0, 0, 42, 0, 16, 0,
5, 0, 0, 0, 17, 0,
0, 7, 66, 0, 16, 0,
2, 0, 0, 0, 70, 14,
16, 0, 10, 0, 0, 0,
70, 14, 16, 0, 7, 0,
0, 0, 54, 0, 0, 5,
18, 0, 16, 0, 5, 0,
0, 0, 58, 0, 16, 0,
2, 0, 0, 0, 54, 0,
0, 5, 34, 0, 16, 0,
5, 0, 0, 0, 58, 0,
16, 0, 3, 0, 0, 0,
54, 0, 0, 5, 66, 0,
16, 0, 5, 0, 0, 0,
58, 0, 16, 0, 4, 0,
0, 0, 17, 0, 0, 7,
130, 0, 16, 0, 2, 0,
0, 0, 70, 14, 16, 0,
5, 0, 0, 0, 70, 14,
16, 0, 7, 0, 0, 0,
56, 0, 0, 8, 114, 0,
16, 0, 3, 0, 0, 0,
86, 5, 16, 0, 2, 0,
0, 0, 70, 131, 32, 0,
1, 0, 0, 0, 5, 0,
0, 0, 50, 0, 0, 10,
114, 0, 16, 0, 3, 0,
0, 0, 70, 131, 32, 0,
1, 0, 0, 0, 4, 0,
0, 0, 6, 0, 16, 0,
2, 0, 0, 0, 70, 2,
16, 0, 3, 0, 0, 0,
50, 0, 0, 10, 114, 0,
16, 0, 2, 0, 0, 0,
70, 131, 32, 0, 1, 0,
0, 0, 6, 0, 0, 0,
166, 10, 16, 0, 2, 0,
0, 0, 70, 2, 16, 0,
3, 0, 0, 0, 50, 0,
0, 10, 114, 0, 16, 0,
2, 0, 0, 0, 70, 131,
32, 0, 1, 0, 0, 0,
7, 0, 0, 0, 246, 15,
16, 0, 2, 0, 0, 0,
70, 2, 16, 0, 2, 0,
0, 0, 35, 0, 0, 9,
130, 0, 16, 0, 2, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 12, 0, 0, 0,
42, 0, 16, 0, 0, 0,
0, 0, 165, 0, 0, 137,
194, 2, 0, 128, 131, 153,
25, 0, 114, 0, 16, 0,
3, 0, 0, 0, 58, 0,
16, 0, 2, 0, 0, 0,
70, 114, 16, 0, 0, 0,
0, 0, 54, 0, 0, 5,
130, 0, 16, 0, 3, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 17, 0,
0, 7, 130, 0, 16, 0,
2, 0, 0, 0, 70, 14,
16, 0, 8, 0, 0, 0,
70, 14, 16, 0, 3, 0,
0, 0, 17, 0, 0, 7,
18, 0, 16, 0, 4, 0,
0, 0, 70, 14, 16, 0,
9, 0, 0, 0, 70, 14,
16, 0, 3, 0, 0, 0,
17, 0, 0, 7, 34, 0,
16, 0, 4, 0, 0, 0,
70, 14, 16, 0, 10, 0,
0, 0, 70, 14, 16, 0,
3, 0, 0, 0, 17, 0,
0, 7, 18, 0, 16, 0,
3, 0, 0, 0, 70, 14,
16, 0, 5, 0, 0, 0,
70, 14, 16, 0, 3, 0,
0, 0, 56, 0, 0, 8,
226, 0, 16, 0, 3, 0,
0, 0, 6, 0, 16, 0,
4, 0, 0, 0, 246, 132,
32, 0, 1, 0, 0, 0,
5, 0, 0, 0, 50, 0,
0, 10, 226, 0, 16, 0,
3, 0, 0, 0, 246, 132,
32, 0, 1, 0, 0, 0,
4, 0, 0, 0, 246, 15,
16, 0, 2, 0, 0, 0,
86, 14, 16, 0, 3, 0,
0, 0, 50, 0, 0, 10,
226, 0, 16, 0, 3, 0,
0, 0, 246, 132, 32, 0,
1, 0, 0, 0, 6, 0,
0, 0, 86, 5, 16, 0,
4, 0, 0, 0, 86, 14,
16, 0, 3, 0, 0, 0,
50, 0, 0, 10, 114, 0,
16, 0, 3, 0, 0, 0,
54, 141, 32, 0, 1, 0,
0, 0, 7, 0, 0, 0,
6, 0, 16, 0, 3, 0,
0, 0, 150, 7, 16, 0,
3, 0, 0, 0, 35, 0,
0, 9, 130, 0, 16, 0,
2, 0, 0, 0, 10, 0,
16, 0, 6, 0, 0, 0,
1, 64, 0, 0, 12, 0,
0, 0, 42, 0, 16, 0,
0, 0, 0, 0, 165, 0,
0, 137, 194, 2, 0, 128,
131, 153, 25, 0, 114, 0,
16, 0, 4, 0, 0, 0,
58, 0, 16, 0, 2, 0,
0, 0, 70, 114, 16, 0,
0, 0, 0, 0, 54, 0,
0, 5, 130, 0, 16, 0,
4, 0, 0, 0, 1, 64,
0, 0, 0, 0, 128, 63,
17, 0, 0, 7, 130, 0,
16, 0, 2, 0, 0, 0,
70, 14, 16, 0, 8, 0,
0, 0, 70, 14, 16, 0,
4, 0, 0, 0, 17, 0,
0, 7, 130, 0, 16, 0,
3, 0, 0, 0, 70, 14,
16, 0, 9, 0, 0, 0,
70, 14, 16, 0, 4, 0,
0, 0, 17, 0, 0, 7,
34, 0, 16, 0, 6, 0,
0, 0, 70, 14, 16, 0,
10, 0, 0, 0, 70, 14,
16, 0, 4, 0, 0, 0,
17, 0, 0, 7, 18, 0,
16, 0, 4, 0, 0, 0,
70, 14, 16, 0, 5, 0,
0, 0, 70, 14, 16, 0,
4, 0, 0, 0, 56, 0,
0, 8, 226, 0, 16, 0,
4, 0, 0, 0, 246, 15,
16, 0, 3, 0, 0, 0,
86, 131, 32, 0, 1, 0,
0, 0, 5, 0, 0, 0,
50, 0, 0, 10, 226, 0,
16, 0, 4, 0, 0, 0,
86, 131, 32, 0, 1, 0,
0, 0, 4, 0, 0, 0,
246, 15, 16, 0, 2, 0,
0, 0, 86, 14, 16, 0,
4, 0, 0, 0, 50, 0,
0, 10, 226, 0, 16, 0,
4, 0, 0, 0, 86, 131,
32, 0, 1, 0, 0, 0,
6, 0, 0, 0, 86, 5,
16, 0, 6, 0, 0, 0,
86, 14, 16, 0, 4, 0,
0, 0, 50, 0, 0, 10,
114, 0, 16, 0, 4, 0,
0, 0, 214, 132, 32, 0,
1, 0, 0, 0, 7, 0,
0, 0, 6, 0, 16, 0,
4, 0, 0, 0, 150, 7,
16, 0, 4, 0, 0, 0,
1, 0, 0, 11, 242, 0,
16, 0, 5, 0, 0, 0,
2, 64, 0, 0, 1, 0,
0, 0, 2, 0, 0, 0,
32, 0, 0, 0, 8, 0,
0, 0, 6, 128, 32, 0,
1, 0, 0, 0, 8, 0,
0, 0, 32, 0, 0, 7,
130, 0, 16, 0, 2, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 42, 0,
16, 0, 1, 0, 0, 0,
32, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 10, 0, 16, 0,
6, 0, 0, 0, 60, 0,
0, 7, 130, 0, 16, 0,
0, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 0, 2, 0,
0, 0, 32, 0, 0, 7,
66, 0, 16, 0, 1, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 10, 0,
16, 0, 6, 0, 0, 0,
60, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 55, 0,
0, 9, 130, 0, 16, 0,
0, 0, 0, 0, 10, 0,
16, 0, 5, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 0, 0, 56, 0,
0, 7, 114, 0, 16, 0,
6, 0, 0, 0, 70, 2,
16, 0, 3, 0, 0, 0,
70, 2, 16, 0, 4, 0,
0, 0, 50, 0, 0, 10,
114, 0, 16, 0, 6, 0,
0, 0, 38, 9, 16, 0,
3, 0, 0, 0, 150, 4,
16, 0, 4, 0, 0, 0,
70, 2, 16, 128, 65, 0,
0, 0, 6, 0, 0, 0,
16, 0, 0, 7, 66, 0,
16, 0, 1, 0, 0, 0,
70, 2, 16, 0, 6, 0,
0, 0, 70, 2, 16, 0,
2, 0, 0, 0, 49, 0,
0, 7, 66, 0, 16, 0,
1, 0, 0, 0, 1, 64,
0, 0, 0, 0, 0, 0,
42, 0, 16, 0, 1, 0,
0, 0, 60, 0, 0, 7,
66, 0, 16, 0, 1, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 42, 0,
16, 0, 1, 0, 0, 0,
55, 0, 0, 9, 130, 0,
16, 0, 0, 0, 0, 0,
26, 0, 16, 0, 5, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0,
14, 0, 0, 7, 50, 0,
16, 0, 2, 0, 0, 0,
70, 0, 16, 0, 2, 0,
0, 0, 166, 10, 16, 0,
2, 0, 0, 0, 50, 0,
0, 15, 50, 0, 16, 0,
2, 0, 0, 0, 70, 0,
16, 0, 2, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 63, 0, 0, 0, 63,
0, 0, 0, 0, 0, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 63, 0, 0,
0, 63, 0, 0, 0, 0,
0, 0, 0, 0, 49, 0,
0, 7, 66, 0, 16, 0,
1, 0, 0, 0, 42, 0,
16, 0, 2, 0, 0, 0,
1, 64, 0, 0, 0, 0,
0, 0, 1, 0, 0, 7,
66, 0, 16, 0, 1, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 1, 64,
0, 0, 1, 0, 0, 0,
14, 0, 0, 7, 194, 0,
16, 0, 2, 0, 0, 0,
86, 9, 16, 0, 3, 0,
0, 0, 6, 0, 16, 0,
3, 0, 0, 0, 50, 0,
0, 15, 194, 0, 16, 0,
2, 0, 0, 0, 166, 14,
16, 0, 2, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 63, 0, 0,
0, 63, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 63,
0, 0, 0, 63, 49, 0,
0, 7, 18, 0, 16, 0,
3, 0, 0, 0, 10, 0,
16, 0, 3, 0, 0, 0,
1, 64, 0, 0, 0, 0,
0, 0, 30, 0, 0, 8,
66, 0, 16, 0, 1, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 10, 0,
16, 128, 65, 0, 0, 0,
3, 0, 0, 0, 14, 0,
0, 7, 50, 0, 16, 0,
3, 0, 0, 0, 38, 10,
16, 0, 4, 0, 0, 0,
86, 5, 16, 0, 4, 0,
0, 0, 50, 0, 0, 15,
50, 0, 16, 0, 3, 0,
0, 0, 70, 0, 16, 0,
3, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 63,
0, 0, 0, 63, 0, 0,
0, 0, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 63, 0, 0, 0, 63,
0, 0, 0, 0, 0, 0,
0, 0, 49, 0, 0, 7,
66, 0, 16, 0, 3, 0,
0, 0, 26, 0, 16, 0,
4, 0, 0, 0, 1, 64,
0, 0, 0, 0, 0, 0,
30, 0, 0, 8, 66, 0,
16, 0, 1, 0, 0, 0,
42, 0, 16, 0, 1, 0,
0, 0, 42, 0, 16, 128,
65, 0, 0, 0, 3, 0,
0, 0, 31, 0, 4, 3,
42, 0, 16, 0, 5, 0,
0, 0, 86, 0, 0, 6,
194, 0, 16, 0, 3, 0,
0, 0, 86, 137, 32, 0,
1, 0, 0, 0, 8, 0,
0, 0, 56, 0, 0, 7,
50, 0, 16, 0, 4, 0,
0, 0, 70, 0, 16, 0,
2, 0, 0, 0, 230, 10,
16, 0, 3, 0, 0, 0,
49, 0, 0, 10, 194, 0,
16, 0, 4, 0, 0, 0,
6, 4, 16, 0, 4, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 203,
0, 0, 0, 203, 49, 0,
0, 10, 50, 0, 16, 0,
5, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 75,
0, 0, 0, 75, 0, 0,
0, 0, 0, 0, 0, 0,
70, 0, 16, 0, 4, 0,
0, 0, 60, 0, 0, 7,
66, 0, 16, 0, 4, 0,
0, 0, 42, 0, 16, 0,
4, 0, 0, 0, 10, 0,
16, 0, 5, 0, 0, 0,
60, 0, 0, 7, 66, 0,
16, 0, 4, 0, 0, 0,
58, 0, 16, 0, 4, 0,
0, 0, 42, 0, 16, 0,
4, 0, 0, 0, 60, 0,
0, 7, 66, 0, 16, 0,
4, 0, 0, 0, 26, 0,
16, 0, 5, 0, 0, 0,
42, 0, 16, 0, 4, 0,
0, 0, 59, 0, 0, 5,
66, 0, 16, 0, 4, 0,
0, 0, 42, 0, 16, 0,
4, 0, 0, 0, 56, 0,
0, 10, 50, 0, 16, 0,
4, 0, 0, 0, 70, 0,
16, 0, 4, 0, 0, 0,
2, 64, 0, 0, 0, 0,
128, 67, 0, 0, 128, 67,
0, 0, 0, 0, 0, 0,
0, 0, 27, 0, 0, 5,
50, 0, 16, 0, 4, 0,
0, 0, 70, 0, 16, 0,
4, 0, 0, 0, 37, 0,
0, 10, 242, 0, 16, 0,
6, 0, 0, 0, 6, 5,
16, 0, 4, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 64, 0, 0, 0, 64,
0, 0, 0, 64, 0, 0,
0, 64, 36, 0, 0, 10,
50, 0, 16, 0, 4, 0,
0, 0, 70, 0, 16, 0,
4, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 192,
0, 0, 0, 192, 0, 0,
0, 0, 0, 0, 0, 0,
56, 0, 0, 7, 50, 0,
16, 0, 5, 0, 0, 0,
230, 10, 16, 0, 2, 0,
0, 0, 230, 10, 16, 0,
3, 0, 0, 0, 49, 0,
0, 10, 50, 0, 16, 0,
7, 0, 0, 0, 70, 0,
16, 0, 5, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 203, 0, 0, 0, 203,
0, 0, 0, 0, 0, 0,
0, 0, 49, 0, 0, 10,
194, 0, 16, 0, 7, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 75,
0, 0, 0, 75, 6, 4,
16, 0, 5, 0, 0, 0,
60, 0, 0, 7, 130, 0,
16, 0, 4, 0, 0, 0,
42, 0, 16, 0, 7, 0,
0, 0, 10, 0, 16, 0,
7, 0, 0, 0, 60, 0,
0, 7, 130, 0, 16, 0,
4, 0, 0, 0, 26, 0,
16, 0, 7, 0, 0, 0,
58, 0, 16, 0, 4, 0,
0, 0, 60, 0, 0, 7,
130, 0, 16, 0, 4, 0,
0, 0, 58, 0, 16, 0,
7, 0, 0, 0, 58, 0,
16, 0, 4, 0, 0, 0,
56, 0, 0, 10, 50, 0,
16, 0, 5, 0, 0, 0,
70, 0, 16, 0, 5, 0,
0, 0, 2, 64, 0, 0,
0, 0, 128, 67, 0, 0,
128, 67, 0, 0, 0, 0,
0, 0, 0, 0, 27, 0,
0, 5, 50, 0, 16, 0,
5, 0, 0, 0, 70, 0,
16, 0, 5, 0, 0, 0,
37, 0, 0, 7, 242, 0,
16, 0, 6, 0, 0, 0,
70, 14, 16, 0, 6, 0,
0, 0, 6, 5, 16, 0,
5, 0, 0, 0, 36, 0,
0, 7, 50, 0, 16, 0,
4, 0, 0, 0, 70, 0,
16, 0, 4, 0, 0, 0,
70, 0, 16, 0, 5, 0,
0, 0, 56, 0, 0, 7,
194, 0, 16, 0, 3, 0,
0, 0, 166, 14, 16, 0,
3, 0, 0, 0, 6, 4,
16, 0, 3, 0, 0, 0,
49, 0, 0, 10, 50, 0,
16, 0, 5, 0, 0, 0,
230, 10, 16, 0, 3, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 203, 0, 0,
0, 203, 0, 0, 0, 0,
0, 0, 0, 0, 49, 0,
0, 10, 50, 0, 16, 0,
7, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 75,
0, 0, 0, 75, 0, 0,
0, 0, 0, 0, 0, 0,
230, 10, 16, 0, 3, 0,
0, 0, 60, 0, 0, 7,
18, 0, 16, 0, 5, 0,
0, 0, 10, 0, 16, 0,
5, 0, 0, 0, 10, 0,
16, 0, 7, 0, 0, 0,
60, 0, 0, 7, 18, 0,
16, 0, 5, 0, 0, 0,
26, 0, 16, 0, 5, 0,
0, 0, 10, 0, 16, 0,
5, 0, 0, 0, 60, 0,
0, 7, 18, 0, 16, 0,
5, 0, 0, 0, 26, 0,
16, 0, 7, 0, 0, 0,
10, 0, 16, 0, 5, 0,
0, 0, 60, 0, 0, 7,
130, 0, 16, 0, 4, 0,
0, 0, 58, 0, 16, 0,
4, 0, 0, 0, 10, 0,
16, 0, 5, 0, 0, 0,
55, 0, 0, 9, 66, 0,
16, 0, 4, 0, 0, 0,
58, 0, 16, 0, 4, 0,
0, 0, 1, 64, 0, 0,
0, 0, 0, 0, 42, 0,
16, 0, 4, 0, 0, 0,
56, 0, 0, 10, 194, 0,
16, 0, 3, 0, 0, 0,
166, 14, 16, 0, 3, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 128, 67,
0, 0, 128, 67, 27, 0,
0, 5, 194, 0, 16, 0,
3, 0, 0, 0, 166, 14,
16, 0, 3, 0, 0, 0,
37, 0, 0, 7, 242, 0,
16, 0, 6, 0, 0, 0,
70, 14, 16, 0, 6, 0,
0, 0, 166, 15, 16, 0,
3, 0, 0, 0, 36, 0,
0, 7, 194, 0, 16, 0,
3, 0, 0, 0, 6, 4,
16, 0, 4, 0, 0, 0,
166, 14, 16, 0, 3, 0,
0, 0, 32, 0, 0, 7,
18, 0, 16, 0, 4, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 1, 64,
0, 0, 0, 0, 0, 0,
1, 0, 0, 7, 18, 0,
16, 0, 4, 0, 0, 0,
42, 0, 16, 0, 4, 0,
0, 0, 10, 0, 16, 0,
4, 0, 0, 0, 1, 0,
0, 10, 242, 0, 16, 0,
6, 0, 0, 0, 70, 14,
16, 0, 6, 0, 0, 0,
2, 64, 0, 0, 255, 0,
0, 0, 0, 255, 255, 255,
255, 0, 0, 0, 0, 255,
255, 255, 79, 0, 0, 10,
98, 0, 16, 0, 4, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 128, 0,
0, 0, 128, 0, 0, 0,
0, 0, 0, 0, 6, 2,
16, 0, 6, 0, 0, 0,
30, 0, 0, 8, 194, 0,
16, 0, 3, 0, 0, 0,
166, 14, 16, 0, 3, 0,
0, 0, 86, 13, 16, 128,
65, 0, 0, 0, 6, 0,
0, 0, 30, 0, 0, 10,
194, 0, 16, 0, 3, 0,
0, 0, 166, 14, 16, 0,
3, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 128, 255,
255, 255, 128, 255, 255, 255,
79, 0, 0, 10, 194, 0,
16, 0, 3, 0, 0, 0,
166, 14, 16, 0, 3, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 255, 0, 0, 0,
255, 0, 0, 0, 1, 0,
0, 7, 194, 0, 16, 0,
3, 0, 0, 0, 166, 14,
16, 0, 3, 0, 0, 0,
86, 9, 16, 0, 4, 0,
0, 0, 60, 0, 0, 7,
66, 0, 16, 0, 3, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 42, 0,
16, 0, 3, 0, 0, 0,
60, 0, 0, 7, 66, 0,
16, 0, 3, 0, 0, 0,
58, 0, 16, 0, 3, 0,
0, 0, 42, 0, 16, 0,
3, 0, 0, 0, 55, 0,
0, 9, 130, 0, 16, 0,
0, 0, 0, 0, 10, 0,
16, 0, 4, 0, 0, 0,
42, 0, 16, 0, 3, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 21, 0,
0, 1, 32, 0, 0, 7,
66, 0, 16, 0, 3, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 1, 64,
0, 0, 3, 0, 0, 0,
60, 0, 0, 7, 66, 0,
16, 0, 3, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 42, 0, 16, 0,
3, 0, 0, 0, 51, 0,
0, 7, 50, 0, 16, 0,
4, 0, 0, 0, 230, 10,
16, 0, 2, 0, 0, 0,
70, 0, 16, 0, 2, 0,
0, 0, 51, 0, 0, 7,
50, 0, 16, 0, 4, 0,
0, 0, 70, 0, 16, 0,
3, 0, 0, 0, 70, 0,
16, 0, 4, 0, 0, 0,
52, 0, 0, 7, 50, 0,
16, 0, 2, 0, 0, 0,
230, 10, 16, 0, 2, 0,
0, 0, 70, 0, 16, 0,
2, 0, 0, 0, 52, 0,
0, 7, 50, 0, 16, 0,
2, 0, 0, 0, 70, 0,
16, 0, 3, 0, 0, 0,
70, 0, 16, 0, 2, 0,
0, 0, 49, 0, 0, 10,
50, 0, 16, 0, 2, 0,
0, 0, 70, 0, 16, 0,
2, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
60, 0, 0, 7, 18, 0,
16, 0, 2, 0, 0, 0,
10, 0, 16, 0, 2, 0,
0, 0, 42, 0, 16, 0,
3, 0, 0, 0, 60, 0,
0, 7, 18, 0, 16, 0,
2, 0, 0, 0, 26, 0,
16, 0, 2, 0, 0, 0,
10, 0, 16, 0, 2, 0,
0, 0, 49, 0, 0, 10,
98, 0, 16, 0, 2, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
128, 63, 0, 0, 128, 63,
0, 0, 0, 0, 6, 1,
16, 0, 4, 0, 0, 0,
60, 0, 0, 7, 18, 0,
16, 0, 2, 0, 0, 0,
26, 0, 16, 0, 2, 0,
0, 0, 10, 0, 16, 0,
2, 0, 0, 0, 60, 0,
0, 7, 18, 0, 16, 0,
2, 0, 0, 0, 42, 0,
16, 0, 2, 0, 0, 0,
10, 0, 16, 0, 2, 0,
0, 0, 55, 0, 0, 9,
66, 0, 16, 0, 1, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 42, 0,
16, 0, 3, 0, 0, 0,
10, 0, 16, 0, 2, 0,
0, 0, 55, 0, 0, 9,
130, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
5, 0, 0, 0, 42, 0,
16, 0, 1, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 31, 0, 0, 3,
58, 0, 16, 0, 0, 0,
0, 0, 180, 0, 0, 9,
18, 0, 16, 0, 2, 0,
0, 0, 0, 240, 17, 0,
1, 0, 0, 0, 1, 64,
0, 0, 0, 0, 0, 0,
1, 64, 0, 0, 3, 0,
0, 0, 18, 0, 0, 1,
54, 0, 0, 5, 18, 0,
16, 0, 2, 0, 0, 0,
1, 64, 0, 0, 0, 0,
0, 0, 21, 0, 0, 1,
18, 0, 0, 1, 54, 0,
0, 5, 130, 0, 16, 0,
0, 0, 0, 0, 1, 64,
0, 0, 255, 255, 255, 255,
54, 0, 0, 5, 18, 0,
16, 0, 2, 0, 0, 0,
1, 64, 0, 0, 0, 0,
0, 0, 21, 0, 0, 1,
190, 24, 0, 1, 31, 0,
0, 2, 10, 32, 2, 0,
38, 0, 0, 8, 0, 208,
0, 0, 66, 0, 16, 0,
1, 0, 0, 0, 10, 0,
16, 0, 1, 0, 0, 0,
1, 64, 0, 0, 5, 0,
0, 0, 165, 0, 0, 7,
34, 0, 16, 0, 2, 0,
0, 0, 1, 64, 0, 0,
0, 0, 0, 0, 6, 240,
17, 0, 1, 0, 0, 0,
180, 0, 0, 9, 18, 0,
16, 0, 3, 0, 0, 0,
0, 224, 17, 0, 1, 0,
0, 0, 42, 0, 16, 0,
1, 0, 0, 0, 26, 0,
16, 0, 2, 0, 0, 0,
166, 0, 0, 7, 18, 240,
17, 0, 0, 0, 0, 0,
1, 64, 0, 0, 0, 0,
0, 0, 10, 0, 16, 0,
3, 0, 0, 0, 21, 0,
0, 1, 190, 88, 0, 1,
31, 0, 0, 3, 58, 0,
16, 0, 0, 0, 0, 0,
165, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
1, 64, 0, 0, 0, 0,
0, 0, 6, 240, 17, 0,
0, 0, 0, 0, 85, 0,
0, 7, 66, 0, 16, 0,
1, 0, 0, 0, 58, 0,
16, 0, 1, 0, 0, 0,
1, 64, 0, 0, 2, 0,
0, 0, 30, 0, 0, 7,
130, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 42, 0,
16, 0, 1, 0, 0, 0,
30, 0, 0, 7, 130, 0,
16, 0, 0, 0, 0, 0,
10, 0, 16, 0, 2, 0,
0, 0, 58, 0, 16, 0,
0, 0, 0, 0, 35, 0,
0, 8, 34, 0, 16, 0,
0, 0, 0, 0, 10, 32,
2, 0, 1, 64, 0, 0,
3, 0, 0, 0, 26, 0,
16, 0, 0, 0, 0, 0,
45, 0, 0, 137, 66, 0,
0, 128, 3, 17, 17, 0,
66, 0, 16, 0, 1, 0,
0, 0, 86, 5, 16, 0,
0, 0, 0, 0, 150, 124,
16, 0, 1, 0, 0, 0,
164, 0, 0, 7, 242, 224,
17, 0, 0, 0, 0, 0,
246, 15, 16, 0, 0, 0,
0, 0, 166, 10, 16, 0,
1, 0, 0, 0, 30, 0,
0, 10, 194, 0, 16, 0,
1, 0, 0, 0, 246, 15,
16, 0, 0, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 2, 0,
0, 0, 30, 0, 0, 10,
50, 0, 16, 0, 2, 0,
0, 0, 86, 5, 16, 0,
0, 0, 0, 0, 2, 64,
0, 0, 1, 0, 0, 0,
2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
45, 0, 0, 137, 66, 0,
0, 128, 3, 17, 17, 0,
34, 0, 16, 0, 0, 0,
0, 0, 6, 0, 16, 0,
2, 0, 0, 0, 22, 126,
16, 0, 1, 0, 0, 0,
164, 0, 0, 7, 242, 224,
17, 0, 0, 0, 0, 0,
166, 10, 16, 0, 1, 0,
0, 0, 86, 5, 16, 0,
0, 0, 0, 0, 45, 0,
0, 137, 66, 0, 0, 128,
3, 17, 17, 0, 34, 0,
16, 0, 0, 0, 0, 0,
86, 5, 16, 0, 2, 0,
0, 0, 22, 126, 16, 0,
1, 0, 0, 0, 164, 0,
0, 7, 242, 224, 17, 0,
0, 0, 0, 0, 246, 15,
16, 0, 1, 0, 0, 0,
86, 5, 16, 0, 0, 0,
0, 0, 21, 0, 0, 1,
32, 0, 0, 6, 34, 0,
16, 0, 0, 0, 0, 0,
26, 0, 16, 0, 1, 0,
0, 0, 10, 16, 2, 0,
1, 0, 0, 7, 18, 0,
16, 0, 0, 0, 0, 0,
26, 0, 16, 0, 0, 0,
0, 0, 10, 0, 16, 0,
0, 0, 0, 0, 31, 0,
4, 3, 10, 0, 16, 0,
0, 0, 0, 0, 38, 0,
0, 8, 0, 208, 0, 0,
18, 0, 16, 0, 0, 0,
0, 0, 10, 0, 16, 0,
1, 0, 0, 0, 1, 64,
0, 0, 5, 0, 0, 0,
35, 0, 0, 15, 226, 0,
16, 0, 1, 0, 0, 0,
6, 0, 16, 0, 1, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 5, 0,
0, 0, 5, 0, 0, 0,
5, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 3, 0,
0, 0, 4, 0, 0, 0,
167, 0, 0, 138, 2, 195,
0, 128, 131, 153, 25, 0,
34, 0, 16, 0, 0, 0,
0, 0, 10, 16, 2, 0,
1, 64, 0, 0, 12, 0,
0, 0, 6, 112, 16, 0,
4, 0, 0, 0, 85, 0,
0, 7, 34, 0, 16, 0,
0, 0, 0, 0, 26, 0,
16, 0, 0, 0, 0, 0,
1, 64, 0, 0, 2, 0,
0, 0, 164, 0, 0, 7,
242, 224, 17, 0, 1, 0,
0, 0, 86, 5, 16, 0,
1, 0, 0, 0, 86, 5,
16, 0, 0, 0, 0, 0,
78, 0, 0, 8, 34, 0,
16, 0, 0, 0, 0, 0,
0, 208, 0, 0, 42, 0,
16, 0, 0, 0, 0, 0,
1, 64, 0, 0, 12, 0,
0, 0, 164, 0, 0, 7,
242, 224, 17, 0, 1, 0,
0, 0, 166, 10, 16, 0,
1, 0, 0, 0, 86, 5,
16, 0, 0, 0, 0, 0,
164, 0, 0, 7, 242, 224,
17, 0, 1, 0, 0, 0,
246, 15, 16, 0, 1, 0,
0, 0, 6, 0, 16, 0,
1, 0, 0, 0, 21, 0,
0, 1, 62, 0, 0, 1,
83, 84, 65, 84, 148, 0,
0, 0, 200, 0, 0, 0,
11, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0,
55, 0, 0, 0, 31, 0,
0, 0, 34, 0, 0, 0,
3, 0, 0, 0, 7, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 17, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 6, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 2, 0,
0, 0, 6, 0, 0, 0
};
================================================
FILE: amd_geometryfx_sample/build/GeometryFX_Sample_2015.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GeometryFX_Sample", "GeometryFX_Sample_2015.vcxproj", "{947E81B0-804C-75B6-69E0-E5DC554D511B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AMD_GeometryFX", "..\..\AMD_GeometryFX\build\AMD_GeometryFX_2015.vcxproj", "{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AMD_LIB", "..\..\amd_lib\shared\d3d11\build\AMD_LIB_2015.vcxproj", "{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AMD_SDK", "..\..\framework\d3d11\amd_sdk\build\AMD_SDK_2015.vcxproj", "{EBB939DC-98E4-49DF-B1F1-D2E80A11F60A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DXUT", "..\..\framework\d3d11\dxut\Core\DXUT_2015.vcxproj", "{85344B7F-5AA0-4E12-A065-D1333D11F6CA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DXUTOpt", "..\..\framework\d3d11\dxut\Optional\DXUTOpt_2015.vcxproj", "{61B333C2-C4F7-4CC1-A9BF-83F6D95588EB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{947E81B0-804C-75B6-69E0-E5DC554D511B}.Debug|x64.ActiveCfg = Debug|x64
{947E81B0-804C-75B6-69E0-E5DC554D511B}.Debug|x64.Build.0 = Debug|x64
{947E81B0-804C-75B6-69E0-E5DC554D511B}.Release|x64.ActiveCfg = Release|x64
{947E81B0-804C-75B6-69E0-E5DC554D511B}.Release|x64.Build.0 = Release|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Debug|x64.ActiveCfg = DLL_Debug|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Debug|x64.Build.0 = DLL_Debug|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Release|x64.ActiveCfg = DLL_Release|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Release|x64.Build.0 = DLL_Release|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Debug|x64.ActiveCfg = Debug|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Debug|x64.Build.0 = Debug|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Release|x64.ActiveCfg = Release|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Release|x64.Build.0 = Release|x64
{EBB939DC-98E4-49DF-B1F1-D2E80A11F60A}.Debug|x64.ActiveCfg = Debug|x64
{EBB939DC-98E4-49DF-B1F1-D2E80A11F60A}.Debug|x64.Build.0 = Debug|x64
{EBB939DC-98E4-49DF-B1F1-D2E80A11F60A}.Release|x64.ActiveCfg = Release|x64
{EBB939DC-98E4-49DF-B1F1-D2E80A11F60A}.Release|x64.Build.0 = Release|x64
{85344B7F-5AA0-4E12-A065-D1333D11F6CA}.Debug|x64.ActiveCfg = Debug|x64
{85344B7F-5AA0-4E12-A065-D1333D11F6CA}.Debug|x64.Build.0 = Debug|x64
{85344B7F-5AA0-4E12-A065-D1333D11F6CA}.Release|x64.ActiveCfg = Release|x64
{85344B7F-5AA0-4E12-A065-D1333D11F6CA}.Release|x64.Build.0 = Release|x64
{61B333C2-C4F7-4CC1-A9BF-83F6D95588EB}.Debug|x64.ActiveCfg = Debug|x64
{61B333C2-C4F7-4CC1-A9BF-83F6D95588EB}.Debug|x64.Build.0 = Debug|x64
{61B333C2-C4F7-4CC1-A9BF-83F6D95588EB}.Release|x64.ActiveCfg = Release|x64
{61B333C2-C4F7-4CC1-A9BF-83F6D95588EB}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
================================================
FILE: amd_geometryfx_sample/build/GeometryFX_Sample_2015.vcxproj
================================================
Debugx64Releasex64{947E81B0-804C-75B6-69E0-E5DC554D511B}trueWin32ProjGeometryFX_SampleGeometryFX_Sample8.1ApplicationtrueUnicodev140ApplicationfalseUnicodev140truetrue..\bin\Desktop_2015\x64\Debug\GeometryFX_Sample_Debug_2015.exefalse..\bin\Desktop_2015\x64\Release\GeometryFX_Sample_Release_2015.exeNotUsingLevel4trueASSIMP_DLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)..\src\ResourceFiles;..\..\AMD_GeometryFX\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;..\..\framework\d3d11\amd_sdk\inc;..\..\framework\d3d11\dxut\Core;..\..\framework\d3d11\dxut\Optional;..\..\third_party\assimp\include;%(AdditionalIncludeDirectories)EditAndContinueDisabledFastASSIMP_DLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)..\src\ResourceFiles;..\..\AMD_GeometryFX\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;..\..\framework\d3d11\amd_sdk\inc;..\..\framework\d3d11\dxut\Core;..\..\framework\d3d11\dxut\Optional;..\..\third_party\assimp\include;%(AdditionalIncludeDirectories)Windowstrueassimp_x64_2015.lib;amd_ags_x64.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;Usp10.lib;Shlwapi.lib;%(AdditionalDependencies)..\..\third_party\assimp\lib;..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)true../src/ResourceFiles/dpiaware.manifest %(AdditionalManifestFiles)if not exist "..\bin\d3dcompiler_47.dll" if exist "$(ProgramFiles)\Windows Kits\8.1\Redist\D3D\x64\d3dcompiler_47.dll" xcopy "$(ProgramFiles)\Windows Kits\8.1\Redist\D3D\x64\d3dcompiler_47.dll" "..\bin" /H /R /Y > nul
if exist "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64d.dll" xcopy "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64d.dll" "..\bin" /H /R /Y > nul
if exist "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64.dll" xcopy "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64.dll" "..\bin" /H /R /Y > nul
xcopy "..\..\amd_lib\ags_lib\lib\amd_ags_x64.dll" "..\bin" /H /R /Y > nul
xcopy "..\..\third_party\assimp\lib\assimp_x64_2015.dll" "..\bin" /H /R /Y > nulCopying dependencies...NotUsingLevel4trueASSIMP_DLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;WIN32;NDEBUG;PROFILE;_WINDOWS;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)..\src\ResourceFiles;..\..\AMD_GeometryFX\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;..\..\framework\d3d11\amd_sdk\inc;..\..\framework\d3d11\dxut\Core;..\..\framework\d3d11\dxut\Optional;..\..\third_party\assimp\include;%(AdditionalIncludeDirectories)ProgramDatabaseFulltruetruefalsetrueFastASSIMP_DLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;WIN32;NDEBUG;PROFILE;_WINDOWS;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)..\src\ResourceFiles;..\..\AMD_GeometryFX\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;..\..\framework\d3d11\amd_sdk\inc;..\..\framework\d3d11\dxut\Core;..\..\framework\d3d11\dxut\Optional;..\..\third_party\assimp\include;%(AdditionalIncludeDirectories)Windowstruetruetrueassimp_x64_2015.lib;amd_ags_x64.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;Usp10.lib;Shlwapi.lib;%(AdditionalDependencies)..\..\third_party\assimp\lib;..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)true../src/ResourceFiles/dpiaware.manifest %(AdditionalManifestFiles)if not exist "..\bin\d3dcompiler_47.dll" if exist "$(ProgramFiles)\Windows Kits\8.1\Redist\D3D\x64\d3dcompiler_47.dll" xcopy "$(ProgramFiles)\Windows Kits\8.1\Redist\D3D\x64\d3dcompiler_47.dll" "..\bin" /H /R /Y > nul
if exist "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64d.dll" xcopy "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64d.dll" "..\bin" /H /R /Y > nul
if exist "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64.dll" xcopy "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64.dll" "..\bin" /H /R /Y > nul
xcopy "..\..\amd_lib\ags_lib\lib\amd_ags_x64.dll" "..\bin" /H /R /Y > nul
xcopy "..\..\third_party\assimp\lib\assimp_x64_2015.dll" "..\bin" /H /R /Y > nulCopying dependencies...{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}{EBB939DC-98E4-49DF-B1F1-D2E80A11F60A}{85344B7F-5AA0-4E12-A065-D1333D11F6CA}{61B333C2-C4F7-4CC1-A9BF-83F6D95588EB}
================================================
FILE: amd_geometryfx_sample/build/GeometryFX_Sample_2015.vcxproj.filters
================================================
{00A967FA-6C69-E330-35A4-2CAEA123280D}{EFAC8DF2-5B8C-0C8E-64A4-9764D00273EF}ResourceFilesResourceFilesShadersResourceFiles
================================================
FILE: amd_geometryfx_sample/build/GeometryFX_Sample_2017.filters
================================================
{00A967FA-6C69-E330-35A4-2CAEA123280D}{EFAC8DF2-5B8C-0C8E-64A4-9764D00273EF}ResourceFilesShadersResourceFilesResourceFiles
================================================
FILE: amd_geometryfx_sample/build/GeometryFX_Sample_2017.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GeometryFX_Sample", "GeometryFX_Sample_2017.vcxproj", "{947E81B0-804C-75B6-69E0-E5DC554D511B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AMD_GeometryFX", "..\..\AMD_GeometryFX\build\AMD_GeometryFX_2017.vcxproj", "{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AMD_LIB", "..\..\amd_lib\shared\d3d11\build\AMD_LIB_2017.vcxproj", "{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AMD_SDK", "..\..\framework\d3d11\amd_sdk\build\AMD_SDK_2017.vcxproj", "{EBB939DC-98E4-49DF-B1F1-D2E80A11F60A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DXUT", "..\..\framework\d3d11\dxut\Core\DXUT_2017.vcxproj", "{85344B7F-5AA0-4E12-A065-D1333D11F6CA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DXUTOpt", "..\..\framework\d3d11\dxut\Optional\DXUTOpt_2017.vcxproj", "{61B333C2-C4F7-4CC1-A9BF-83F6D95588EB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{947E81B0-804C-75B6-69E0-E5DC554D511B}.Debug|x64.ActiveCfg = Debug|x64
{947E81B0-804C-75B6-69E0-E5DC554D511B}.Debug|x64.Build.0 = Debug|x64
{947E81B0-804C-75B6-69E0-E5DC554D511B}.Release|x64.ActiveCfg = Release|x64
{947E81B0-804C-75B6-69E0-E5DC554D511B}.Release|x64.Build.0 = Release|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Debug|x64.ActiveCfg = DLL_Debug|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Debug|x64.Build.0 = DLL_Debug|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Release|x64.ActiveCfg = DLL_Release|x64
{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}.Release|x64.Build.0 = DLL_Release|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Debug|x64.ActiveCfg = Debug|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Debug|x64.Build.0 = Debug|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Release|x64.ActiveCfg = Release|x64
{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}.Release|x64.Build.0 = Release|x64
{EBB939DC-98E4-49DF-B1F1-D2E80A11F60A}.Debug|x64.ActiveCfg = Debug|x64
{EBB939DC-98E4-49DF-B1F1-D2E80A11F60A}.Debug|x64.Build.0 = Debug|x64
{EBB939DC-98E4-49DF-B1F1-D2E80A11F60A}.Release|x64.ActiveCfg = Release|x64
{EBB939DC-98E4-49DF-B1F1-D2E80A11F60A}.Release|x64.Build.0 = Release|x64
{85344B7F-5AA0-4E12-A065-D1333D11F6CA}.Debug|x64.ActiveCfg = Debug|x64
{85344B7F-5AA0-4E12-A065-D1333D11F6CA}.Debug|x64.Build.0 = Debug|x64
{85344B7F-5AA0-4E12-A065-D1333D11F6CA}.Release|x64.ActiveCfg = Release|x64
{85344B7F-5AA0-4E12-A065-D1333D11F6CA}.Release|x64.Build.0 = Release|x64
{61B333C2-C4F7-4CC1-A9BF-83F6D95588EB}.Debug|x64.ActiveCfg = Debug|x64
{61B333C2-C4F7-4CC1-A9BF-83F6D95588EB}.Debug|x64.Build.0 = Debug|x64
{61B333C2-C4F7-4CC1-A9BF-83F6D95588EB}.Release|x64.ActiveCfg = Release|x64
{61B333C2-C4F7-4CC1-A9BF-83F6D95588EB}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
================================================
FILE: amd_geometryfx_sample/build/GeometryFX_Sample_2017.vcxproj
================================================
Debugx64Releasex64{947E81B0-804C-75B6-69E0-E5DC554D511B}trueWin32ProjGeometryFX_SampleGeometryFX_Sample8.1ApplicationtrueUnicodev141ApplicationfalseUnicodev141truetrue..\bin\Desktop_2017\x64\Debug\GeometryFX_Sample_Debug_2017.exefalse..\bin\Desktop_2017\x64\Release\GeometryFX_Sample_Release_2017.exeNotUsingLevel4trueASSIMP_DLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)..\src\ResourceFiles;..\..\AMD_GeometryFX\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;..\..\framework\d3d11\amd_sdk\inc;..\..\framework\d3d11\dxut\Core;..\..\framework\d3d11\dxut\Optional;..\..\third_party\assimp\include;%(AdditionalIncludeDirectories)EditAndContinueDisabledFastASSIMP_DLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)..\src\ResourceFiles;..\..\AMD_GeometryFX\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;..\..\framework\d3d11\amd_sdk\inc;..\..\framework\d3d11\dxut\Core;..\..\framework\d3d11\dxut\Optional;..\..\third_party\assimp\include;%(AdditionalIncludeDirectories)Windowstrueassimp_x64_2015.lib;amd_ags_x64.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;Usp10.lib;Shlwapi.lib;%(AdditionalDependencies)..\..\third_party\assimp\lib;..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)true../src/ResourceFiles/dpiaware.manifest %(AdditionalManifestFiles)if not exist "..\bin\d3dcompiler_47.dll" if exist "$(ProgramFiles)\Windows Kits\8.1\Redist\D3D\x64\d3dcompiler_47.dll" xcopy "$(ProgramFiles)\Windows Kits\8.1\Redist\D3D\x64\d3dcompiler_47.dll" "..\bin" /H /R /Y > nul
if exist "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64d.dll" xcopy "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64d.dll" "..\bin" /H /R /Y > nul
if exist "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64.dll" xcopy "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64.dll" "..\bin" /H /R /Y > nul
xcopy "..\..\amd_lib\ags_lib\lib\amd_ags_x64.dll" "..\bin" /H /R /Y > nul
xcopy "..\..\third_party\assimp\lib\assimp_x64_2015.dll" "..\bin" /H /R /Y > nulCopying dependencies...NotUsingLevel4trueASSIMP_DLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;WIN32;NDEBUG;PROFILE;_WINDOWS;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)..\src\ResourceFiles;..\..\AMD_GeometryFX\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;..\..\framework\d3d11\amd_sdk\inc;..\..\framework\d3d11\dxut\Core;..\..\framework\d3d11\dxut\Optional;..\..\third_party\assimp\include;%(AdditionalIncludeDirectories)ProgramDatabaseFulltruetruefalsetrueFastASSIMP_DLL;AMD_GEOMETRYFX_COMPILE_DYNAMIC_LIB=1;WIN32;NDEBUG;PROFILE;_WINDOWS;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)..\src\ResourceFiles;..\..\AMD_GeometryFX\inc;..\..\amd_lib\shared\common\inc;..\..\amd_lib\shared\d3d11\inc;..\..\amd_lib\ags_lib\inc;..\..\framework\d3d11\amd_sdk\inc;..\..\framework\d3d11\dxut\Core;..\..\framework\d3d11\dxut\Optional;..\..\third_party\assimp\include;%(AdditionalIncludeDirectories)Windowstruetruetrueassimp_x64_2015.lib;amd_ags_x64.lib;d3dcompiler.lib;dxguid.lib;winmm.lib;comctl32.lib;Usp10.lib;Shlwapi.lib;%(AdditionalDependencies)..\..\third_party\assimp\lib;..\..\amd_lib\ags_lib\lib;%(AdditionalLibraryDirectories)true../src/ResourceFiles/dpiaware.manifest %(AdditionalManifestFiles)if not exist "..\bin\d3dcompiler_47.dll" if exist "$(ProgramFiles)\Windows Kits\8.1\Redist\D3D\x64\d3dcompiler_47.dll" xcopy "$(ProgramFiles)\Windows Kits\8.1\Redist\D3D\x64\d3dcompiler_47.dll" "..\bin" /H /R /Y > nul
if exist "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64d.dll" xcopy "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64d.dll" "..\bin" /H /R /Y > nul
if exist "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64.dll" xcopy "..\..\AMD_GeometryFX\lib\GPUOpen_GeometryFX_x64.dll" "..\bin" /H /R /Y > nul
xcopy "..\..\amd_lib\ags_lib\lib\amd_ags_x64.dll" "..\bin" /H /R /Y > nul
xcopy "..\..\third_party\assimp\lib\assimp_x64_2015.dll" "..\bin" /H /R /Y > nulCopying dependencies...{E05C77A9-1EE7-4F02-AF03-575FB4829AC5}{0D2AEA47-7909-69E3-8221-F4B9EE7FCF44}{EBB939DC-98E4-49DF-B1F1-D2E80A11F60A}{85344B7F-5AA0-4E12-A065-D1333D11F6CA}{61B333C2-C4F7-4CC1-A9BF-83F6D95588EB}
================================================
FILE: amd_geometryfx_sample/build/GeometryFX_Sample_2017.vcxproj.filters
================================================
{00A967FA-6C69-E330-35A4-2CAEA123280D}{EFAC8DF2-5B8C-0C8E-64A4-9764D00273EF}ResourceFilesResourceFilesShadersResourceFiles
================================================
FILE: amd_geometryfx_sample/media/house.mtl
================================================
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 20.01.2016 10:45:58
newmtl wire_177088026
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.6941 0.3451 0.1020
Kd 0.6941 0.3451 0.1020
Ks 0.3500 0.3500 0.3500
newmtl wire_138138138
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.5412 0.5412 0.5412
Kd 0.5412 0.5412 0.5412
Ks 0.3500 0.3500 0.3500
newmtl wire_143224087
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.5608 0.8784 0.3412
Kd 0.5608 0.8784 0.3412
Ks 0.3500 0.3500 0.3500
newmtl wire_154185229
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.6039 0.7255 0.8980
Kd 0.6039 0.7255 0.8980
Ks 0.3500 0.3500 0.3500
newmtl wire_086086086
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.3373 0.3373 0.3373
Kd 0.3373 0.3373 0.3373
Ks 0.3500 0.3500 0.3500
newmtl wire_134110008
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.5255 0.4314 0.0314
Kd 0.5255 0.4314 0.0314
Ks 0.3500 0.3500 0.3500
newmtl wire_177148026
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.6941 0.5804 0.1020
Kd 0.6941 0.5804 0.1020
Ks 0.3500 0.3500 0.3500
================================================
FILE: amd_geometryfx_sample/media/house.obj
================================================
[File too large to display: 69.2 MB]
================================================
FILE: amd_geometryfx_sample/media/readme.txt
================================================
The media files in the ui subfolder are from the Microsoft DirectX SDK Samples:
https://github.com/walbourn/directx-sdk-samples
They are distributed under the terms of the MIT License.
================================================
FILE: amd_geometryfx_sample/media/ui/MIT.txt
================================================
The MIT License (MIT)
Copyright (c) 2015 Microsoft Corp
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: amd_geometryfx_sample/premake/premake5.lua
================================================
_AMD_LIBRARY_NAME = "GeometryFX"
_AMD_LIBRARY_NAME_ALL_CAPS = string.upper(_AMD_LIBRARY_NAME)
-- Set _AMD_LIBRARY_NAME before including amd_premake_util.lua
dofile ("../../premake/amd_premake_util.lua")
workspace (_AMD_LIBRARY_NAME .. "_Sample")
configurations { "Debug", "Release" }
platforms { "x64" }
location "../build"
filename (_AMD_LIBRARY_NAME .. "_Sample" .. _AMD_VS_SUFFIX)
startproject (_AMD_LIBRARY_NAME .. "_Sample")
filter "platforms:x64"
system "Windows"
architecture "x64"
externalproject ("AMD_" .. _AMD_LIBRARY_NAME)
kind "SharedLib"
language "C++"
location "../../AMD_%{_AMD_LIBRARY_NAME}/build"
filename ("AMD_" .. _AMD_LIBRARY_NAME .. _AMD_VS_SUFFIX)
uuid "E05C77A9-1EE7-4F02-AF03-575FB4829AC5"
configmap {
["Debug"] = "DLL_Debug",
["Release"] = "DLL_Release" }
externalproject "AMD_LIB"
kind "StaticLib"
language "C++"
location "../../amd_lib/shared/d3d11/build"
filename ("AMD_LIB" .. _AMD_VS_SUFFIX)
uuid "0D2AEA47-7909-69E3-8221-F4B9EE7FCF44"
externalproject "AMD_SDK"
kind "StaticLib"
language "C++"
location "../../framework/d3d11/amd_sdk/build"
filename ("AMD_SDK" .. _AMD_VS_SUFFIX)
uuid "EBB939DC-98E4-49DF-B1F1-D2E80A11F60A"
externalproject "DXUT"
kind "StaticLib"
language "C++"
location "../../framework/d3d11/dxut/Core"
filename ("DXUT" .. _AMD_VS_SUFFIX)
uuid "85344B7F-5AA0-4E12-A065-D1333D11F6CA"
externalproject "DXUTOpt"
kind "StaticLib"
language "C++"
location "../../framework/d3d11/dxut/Optional"
filename ("DXUTOpt" .. _AMD_VS_SUFFIX)
uuid "61B333C2-C4F7-4CC1-A9BF-83F6D95588EB"
project (_AMD_LIBRARY_NAME .. "_Sample")
kind "WindowedApp"
language "C++"
location "../build"
filename (_AMD_LIBRARY_NAME .. "_Sample" .. _AMD_VS_SUFFIX)
uuid "947E81B0-804C-75B6-69E0-E5DC554D511B"
targetdir "../bin"
objdir "../build/%{_AMD_SAMPLE_DIR_LAYOUT}"
warnings "Extra"
floatingpoint "Fast"
-- Specify WindowsTargetPlatformVersion here for VS2015
systemversion (_AMD_WIN_SDK_VERSION)
-- Copy DLLs to the local bin directory
postbuildcommands { amdSamplePostbuildCommands(true, true) }
postbuildmessage "Copying dependencies..."
-- Use old assimp libraries for 2017
assimpLibraryName = "assimp_%{cfg.platform}%{_AMD_VS_SUFFIX}"
if _AMD_VS_SUFFIX == "_2017" then
assimpLibraryName = "assimp_%{cfg.platform}_2015"
end
files { "../src/**.h", "../src/**.cpp", "../src/**.rc", "../src/**.manifest", "../src/**.hlsl" }
includedirs { "../src/ResourceFiles", "../../AMD_%{_AMD_LIBRARY_NAME}/inc", "../../amd_lib/shared/common/inc", "../../amd_lib/shared/d3d11/inc", "../../amd_lib/ags_lib/inc", "../../framework/d3d11/amd_sdk/inc", "../../framework/d3d11/dxut/Core", "../../framework/d3d11/dxut/Optional", "../../third_party/assimp/include" }
libdirs { "../../third_party/assimp/lib", "../../amd_lib/ags_lib/lib" }
links { "AMD_%{_AMD_LIBRARY_NAME}", "AMD_LIB", "AMD_SDK", "DXUT", "DXUTOpt", assimpLibraryName, "amd_ags_%{cfg.platform}", "d3dcompiler", "dxguid", "winmm", "comctl32", "Usp10", "Shlwapi" }
defines { "ASSIMP_DLL", "AMD_%{_AMD_LIBRARY_NAME_ALL_CAPS}_COMPILE_DYNAMIC_LIB=1" }
filter "configurations:Debug"
defines { "WIN32", "_DEBUG", "DEBUG", "PROFILE", "_WINDOWS", "_WIN32_WINNT=0x0601" }
flags { "FatalWarnings" }
symbols "On"
characterset "Unicode"
targetsuffix ("_Debug" .. _AMD_VS_SUFFIX)
filter "configurations:Release"
defines { "WIN32", "NDEBUG", "PROFILE", "_WINDOWS", "_WIN32_WINNT=0x0601" }
flags { "LinkTimeOptimization", "FatalWarnings" }
symbols "On"
characterset "Unicode"
targetsuffix ("_Release" .. _AMD_VS_SUFFIX)
optimize "On"
================================================
FILE: amd_geometryfx_sample/src/GeometryFX_Sample.cpp
================================================
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
//--------------------------------------------------------------------------------------
// File: GeometryFX_Sample.cpp
//
//--------------------------------------------------------------------------------------
// DXUT includes
#include "DXUT.h"
#include "DXUTcamera.h"
#include "DXUTgui.h"
#include "DXUTsettingsdlg.h"
#include "SDKmisc.h"
// AMD includes
#include "AMD_LIB.h"
#include "AMD_SDK.h"
// ComPtr
#include
// unique_ptr
#include
#include
#include // Plain-C interface
#include // Output data structure
#include // Post processing flags
#include
#include