fixing warning, adding CIs
Some checks failed
Linux / build (x86_64, macOS-latest) (push) Has been cancelled
Linux / build (x86_64, ubuntu-latest) (push) Has been cancelled

This commit is contained in:
2026-01-11 12:32:58 +01:00
parent 98b845f876
commit 87620b6e0c
4 changed files with 68 additions and 2 deletions

34
.gitea/workflows/linux.yml git.filemode.normal_file
View File

@@ -0,0 +1,34 @@
name: Linux
on:
repository_dispatch:
types: [create-pull-request]
pull_request:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: [x86_64]
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get -y install mesa-common-dev clang libsdl2-2.0-0 libsdl2-dev build-essential libvulkan-dev
- name: Build
run: cd sandbox && make

32
.gitea/workflows/macos.yml git.filemode.normal_file
View File

@@ -0,0 +1,32 @@
name: Linux
on:
repository_dispatch:
types: [create-pull-request]
pull_request:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macOS-latest]
arch: [x86_64]
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install system dependencies
run: brew install SDL2 vulkan-headers
- name: Build
run: cd sandbox && make

View File

@@ -1,4 +1,4 @@
# KVF # KVF <a href="https://git.kbz8.me/kbz_8/KVF/actions?workflows=linux.yml"><img src="https://git.kbz8.me/kbz_8/KVF/actions/workflows/linux.yml/badge.svg"></a> <a href="https://git.kbz8.me/kbz_8/KVF/actions?workflows=macos.yml"><img src="https://git.kbz8.me/kbz_8/KVF/actions/workflows/macos.yml/badge.svg"></a>
KVF (kbz_8 vulkan framework) is a lightweight single-header Vulkan framework written in C99 to simplify the creation of Vulkan applications. KVF (kbz_8 vulkan framework) is a lightweight single-header Vulkan framework written in C99 to simplify the creation of Vulkan applications.
It is designed to be a drop in framework inside any existing Vulkan renderer as it does not use any custom types of structs (except for the graphics pipeline builder). It is designed to be a drop in framework inside any existing Vulkan renderer as it does not use any custom types of structs (except for the graphics pipeline builder).

2
kvf.h
View File

@@ -526,7 +526,7 @@ int32_t kvfFindMemoryType(VkPhysicalDevice physical_device, uint32_t type_filter
VkPhysicalDeviceMemoryProperties mem_properties; VkPhysicalDeviceMemoryProperties mem_properties;
KVF_GET_INSTANCE_FUNCTION(vkGetPhysicalDeviceMemoryProperties)(physical_device, &mem_properties); KVF_GET_INSTANCE_FUNCTION(vkGetPhysicalDeviceMemoryProperties)(physical_device, &mem_properties);
for(int32_t i = 0; i < mem_properties.memoryTypeCount; i++) for(int32_t i = 0; i < (int32_t)mem_properties.memoryTypeCount; i++)
{ {
if((type_filter & (1 << i)) && (mem_properties.memoryTypes[i].propertyFlags & properties) == properties) if((type_filter & (1 << i)) && (mem_properties.memoryTypes[i].propertyFlags & properties) == properties)
return i; return i;