-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
188 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: CMake | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build: | ||
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | ||
# You can convert this to a matrix build if you need cross-platform coverage. | ||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | ||
runs-on: ${{matrix.os}} | ||
|
||
strategy: | ||
matrix: | ||
os: [windows-latest, windows-2019] | ||
cxx_standard: [17, 20] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Vulkan SDK | ||
uses: humbletim/[email protected] | ||
with: | ||
version: latest | ||
cache: true | ||
|
||
- name: Install Ninja | ||
uses: ashutoshvarma/setup-ninja@master | ||
with: | ||
version: 1.11.0 | ||
|
||
- if: runner.os == 'Windows' | ||
uses: TheMrMilchmann/setup-msvc-dev@v1 | ||
with: | ||
arch: x64 | ||
|
||
- name: Configure CMake | ||
if: ${{matrix.os}} | ||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | ||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}} -G "Ninja" | ||
|
||
- name: Build | ||
# Build your program with the given configuration | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | ||
|
||
- name: Test | ||
working-directory: ${{github.workspace}}/build | ||
# Execute tests defined by the CMake configuration. | ||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
run: ctest -C ${{env.BUILD_TYPE}} | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: stupid-vulkan | ||
path: | | ||
${{github.workspace}}\binaries\* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,4 +78,5 @@ | |
out | ||
gen | ||
|
||
cmake-build-debug | ||
cmake-build-* | ||
binaries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
#version 450 | ||
|
||
layout (location = 0) in vec4 color; | ||
layout(location = 0) out vec4 outColor; | ||
layout (location = 0) out vec4 outColor; | ||
|
||
void main(){ | ||
outColor = color; | ||
layout(push_constant) uniform colorBlock { | ||
int constColor; | ||
float mixerValue; | ||
} pushConstantsColorBlock; | ||
|
||
vec4 red = vec4(1.0, 0.0, 0.0, 1.0); | ||
vec4 green = vec4(0.0, 1.0, 0.0, 1.0); | ||
vec4 blue = vec4(0.0, 0.0, 1.0, 1.0); | ||
|
||
void main() | ||
{ | ||
if (pushConstantsColorBlock.constColor == 1) | ||
outColor = red; | ||
else if (pushConstantsColorBlock.constColor == 2) | ||
outColor = green; | ||
else if (pushConstantsColorBlock.constColor == 3) | ||
outColor = blue; | ||
else | ||
outColor = color*pushConstantsColorBlock.mixerValue; | ||
} |
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters