Updated array example

This commit is contained in:
Alejandro Saucedo 2020-11-03 18:04:54 +00:00
parent 88df1b312d
commit 53e1a3aa54
2 changed files with 24 additions and 19 deletions

View file

@ -7,6 +7,10 @@ option(KOMPUTE_ARR_OPT_INSTALLED_KOMPUTE "Enable if you prefer to use your insta
option(KOMPUTE_OPT_ENABLE_SPDLOG "Extra compile flags for Kompute, see docs for full list" 0)
set(KOMPUTE_EXTRA_CXX_FLAGS "" CACHE STRING "Extra compile flags for Kompute, see docs for full list")
if(KOMPUTE_OPT_ENABLE_SPDLOG)
set(KOMPUTE_EXTRA_CXX_FLAGS "${KOMPUTE_EXTRA_CXX_FLAGS} -DKOMPUTE_ENABLE_SPDLOG=1")
endif()
# It is necessary to pass the DEBUG or RELEASE flag accordingly to Kompute
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG=1 ${KOMPUTE_EXTRA_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DRELEASE=1 ${KOMPUTE_EXTRA_CXX_FLAGS}")

View file

@ -6,25 +6,6 @@ This example is structured such that you will be able to extend it for your proj
It contains a cmake build configuration that can be used in your production applications.
## Pre-requisites
In order to run this example, you will need the following dependencies:
* REQUIRED
+ Vulkan Kompute library must be accessible
+ The Vulkan SDK must be installed
* OPTIONAL
+ SPDLOG - for logging
+ FMT - for text formatting
We will cover how you can install Vulkan Kompute in the next section.
For the Vulkan SDK, the simplest way to install it is through [their website](https://vulkan.lunarg.com/sdk/home). You just have to follow the instructions for the relevant platform.
For the other libraries, because they are optional you can just make sure you build and install Kompute with these disabled (this will be covered in more detail below).
Alternatively you can use package managers such as vcpkg to help you install them, although to simplify things you can start without the dependencies first.
## Building the example
You will notice that it's a standalone project, so you can re-use it for your application.
@ -43,4 +24,24 @@ You can pass the following optional parameters based on your desired configurati
* If you are using a package manager such as `vcpkg` make sure you pass the `-DCMAKE_TOOLCHAIN_FILE=` parameter
* If you wish to load shader from raw glsl string instead of spirv bytes you can use `-DKOMPUTE_ANDROID_SHADER_FROM_STRING`
## Pre-requisites
In order to run this example, you will need the following dependencies:
* REQUIRED
+ The Vulkan SDK must be installed
* OPTIONAL
+ Vulkan Kompute library must be accessible (by default it uses the source directory)
+ SPDLOG - for logging
+ FMT - for text formatting
We will cover how you can install Vulkan Kompute in the next section.
For the Vulkan SDK, the simplest way to install it is through [their website](https://vulkan.lunarg.com/sdk/home). You just have to follow the instructions for the relevant platform.
For the other libraries, because they are optional you can just make sure you build and install Kompute with these disabled (this will be covered in more detail below).
Alternatively you can use package managers such as vcpkg to help you install them, although to simplify things you can start without the dependencies first.