Skip to content
Merged
33 changes: 32 additions & 1 deletion .github/workflows/gen-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,40 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=$GITHUB_WORKSPACE/build" >> "$GITHUB_OUTPUT"
echo "install-dir=$GITHUB_WORKSPACE/install/ubuntu-latest-clang-Debug" >> "$GITHUB_OUTPUT"

- name: Install SDL windowing deps (Linux)
run: |
sudo apt update
sudo apt install -y \
build-essential cmake ninja-build pkg-config gcc clang git python3 \
libasound2-dev libjack-jackd2-dev libpulse-dev \
xorg-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev \
libxkbcommon-dev wayland-protocols libwayland-dev \
libdrm-dev mesa-utils mesa-common-dev

- name: Configure CMake
# 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 ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_C_COMPILER=clang
-S $GITHUB_WORKSPACE
-G "Ninja Multi-Config"

- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Debug

- name: Generate PR from issue using OpenRouter
uses: WillBooster/gen-pr@v4.1.4
with:
issue-number: ${{ inputs.issue-number }}
aider-extra-args: "--model openrouter/openrouter/polaris-alpha"
aider-extra-args: "--model openrouter/kwaipilot/kat-coder-pro:free"
verbose: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
8 changes: 4 additions & 4 deletions gen-pr.config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# gen-pr.config.yml
planning-model: openrouter/openrouter/polaris-alpha
planning-model: openrouter/kwaipilot/kat-coder-pro:free
reasoning-effort: high

repomix-extra-args: "--compress --remove-empty-lines --include '**/*.cpp' --include '**/*.ixx'"
repomix-extra-args: "--compress --remove-empty-lines --include '**/*.cpp' --include '**/*.ixx' --include '**/CMakeLists.txt'"

coding-tool: aider
aider-extra-args: "--model openrouter/openrouter/polaris-alpha"
aider-extra-args: "--model openrouter/kwaipilot/kat-coder-pro:free"
verbose: true

# Run build tests after code generation
test-command: "cmake -S . -B build"
test-command: "cmake --build ./build --config Debug"
2 changes: 1 addition & 1 deletion sdl_wrapper/sdl_wrapper.buffer.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export namespace sopho
SDL_GPUTransferBuffer* m_transfer_buffer{};
uint32_t m_transfer_buffer_size{};

BufferWrapper(std::shared_ptr<GpuWrapper> p_gpu, SDL_GPUBuffer* p_buffer) :
BufferWrapper(std::shared_ptr<::sopho::GpuWrapper> p_gpu, SDL_GPUBuffer* p_buffer) :
m_gpu(p_gpu), m_vertex_buffer(p_buffer)
{
}
Expand Down
10 changes: 9 additions & 1 deletion sdl_wrapper/sdl_wrapper.gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@
// Created by wsqsy on 11/14/2025.
//
module;
#include <SDL3/SDL_gpu.h>
module sdl_wrapper;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: included header SDL_gpu.h is not used directly [misc-include-cleaner]

Suggested change
module sdl_wrapper;
;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: module 'sdl_wrapper' not found [clang-diagnostic-error]

>
         ^

import :gpu;
import :pipeline;
namespace sopho
{
BufferWrapper GpuWrapper::create_buffer(SDL_GPUBufferUsageFlags flag, uint32_t size)
{
SDL_GPUBufferCreateInfo create_info{flag, size};
auto buffer = SDL_CreateGPUBuffer(m_device, &create_info);
BufferWrapper result(shared_from_this(), buffer);
return result;
}
PipelineWrapper GpuWrapper::create_pipeline() { return PipelineWrapper{shared_from_this()}; }
}
} // namespace sopho
12 changes: 3 additions & 9 deletions sdl_wrapper/sdl_wrapper.gpu.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ module;
export module sdl_wrapper:gpu;
import :buffer;
import :pipeline;
namespace sopho
export namespace sopho
{
export class GpuWrapper : public std::enable_shared_from_this<GpuWrapper>
class GpuWrapper : public std::enable_shared_from_this<GpuWrapper>
{
SDL_GPUDevice* m_device{};

Expand All @@ -37,13 +37,7 @@ namespace sopho

auto data() { return m_device; }

auto create_buffer(SDL_GPUBufferUsageFlags flag, uint32_t size)
{
SDL_GPUBufferCreateInfo create_info{flag, size};
auto buffer = SDL_CreateGPUBuffer(m_device, &create_info);
BufferWrapper result(shared_from_this(), buffer);
return result;
}
BufferWrapper create_buffer(SDL_GPUBufferUsageFlags flag, uint32_t size);

PipelineWrapper create_pipeline();

Expand Down