Coder Social home page Coder Social logo

kingofthebongo2008 / renderpipelineshaders Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gpuopen-librariesandsdks/renderpipelineshaders

0.0 0.0 0.0 563 KB

Render Pipeline Shaders SDK

License: Other

C++ 83.06% C 15.77% CMake 1.16% Batchfile 0.01%

renderpipelineshaders's Introduction

AMD Render Pipeline Shaders (RPS) SDK

Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.

The AMD Render Pipeline Shaders (RPS) SDK is released under the AMD INTERNAL EVALUATION LICENSE. Please see file LICENSE.txt for full license details.

Introduction

The AMD Render Pipeline Shaders (RPS) SDK is a comprehensive and extensible Render Graph framework.

Since the debut of explicit graphics APIs (Direct3D 12 and Vulkan®), Render Graphs (or Frame Graphs) have been proposed as an elegant and efficient solution to various problems such as generating resource barriers, managing transient memory and scheduling GPU workload. In practice, it is non-trivial to implement a render graph system from scratch, and it requires effort to keep it optimal according to hardware, API and content changes. Porting effects and techniques between different render graph systems may also consume extra engineering time.

image

The RPS SDK intends to make Render Graphs more easily accessible and to provide a generally optimal barrier generator and (aliasing) memory scheduler. RPS also tries to simplify Render Graph construction by extending HLSL with attributes and intrinsics to create a domain specific language for render graph programming. This enables opt-in applications to program Render Graphs implicitly via a high-level, declarative programming model, allowing users to focus on the render pipeline logic rather than node configuration details. We call the extended language "Render Pipeline Shader Language", or RPSL.

The SDK has a compiler-like architecture. It includes a frontend used to specify resources and a node sequence, a runtime compiler which compiles the linear node sequence into a graph and schedules it, and a runtime backend that converts the scheduled render graph into graphics API commands.

image

The RPS SDK is built with controllability and extensibility in mind. The HLSL language extension and API provide a rich set of controls for customizing its behavior. Both the frontend, the runtime render graph compiler, and the backend can be extended and customized.

Content Structure

Notable directories and files of the SDK:

Build

Prerequisites

  • OS: Windows 10 21H2 or later.
  • Compiler: A C++11 compliant compiler. Tested compilers include Visual C++ toolset v141 or later (VS2017+) and Clang 15.0.1.
  • CMake: CMake 3.12.1 or later.
  • Vulkan SDK 1.2.162.1 or later (If the Vulkan backend and its dependents are desired).

Submodule dependencies

The SDK has catch2 and imgui as external git submodule dependencies. If you didn't initially clone with --recursive or another method that fetches the submodule dependencies automatically, please git submodule init and git submodule update inside the SDK clone directory to fetch them before attempting to build.

Build

The SDK uses CMake. There are a few ways to start:

  • Using default build batch file ./build.bat.
  • Manually config using CMake:
    cmake -S ./ -B ./build -A x64
    cmake --build ./build --config RelWithDebInfo

Running Tests & RPSL Explorer

After a successful build:

  • By default (or when CMake option RpsBuildTests is ON), all tests can be executed by running ctest from the build folder:
    cd build
    ctest -C RelWithDebInfo
  • By default, the RPSL Explorer binaries can be located at ./build/tools/rpsl_explorer/<config_name>/. Run rpsl_explorer.exe and open an RPSL file to start hacking!

Documentation

The main sources of documentation for the RPS public APIs are inlined Doxygen-style comments, which can be built into HTML documents if Doxygen is installed (tested with Doxygen version 1.9.2):

doxygen

Integration

If the parent project uses CMake, RPS can be added as a subdirectory, e.g.:

set(RpsRootSolutionFolder "rps")
add_subdirectory(libs/AMD/rps)

RPS can also be integrated as pre-built static libraries, or you may include the RPS sources directly.

The main header to include is ./include/rps/rps.h. A few macros (RPS_D3D12_RUNTIME, RPS_VK_RUNTIME, RPS_D3D11_RUNTIME) can be used to selectively enable default runtime backends.

RPSL files can be compiled into C source code with the provided RPS-HLSLC tool chain at development time. The generated .C file can be integrated into the engine or application sources. Typical usage:

rps-hlslc.exe <rpsl_file_name> [-od <outout_directory>] [-m <override_module_name>] ...

Please see ./tools/rps_hlslc/README.md for usage details.

Currently, the RPS SDK is released under the AMD Internal Evaluation License. We intend to transition to a much more permissive license after the open beta period. We welcome everyone to try it out and appreciate any feedback!

If you are interested in using it in a future engine or title product, please contact an AMD Alliance Manager or Developer Technology engineer.

Third-Party Software

Attribution

  • AMD, the AMD Arrow logo, Radeon, Crossfire, 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.

renderpipelineshaders's People

Contributors

rys avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.