From 215486ac34511ff1c318f2cca54d9d58b9b4cf37 Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Sun, 10 May 2026 22:09:51 +0200 Subject: [PATCH] fixing soft command buffer --- .gitea/workflows/CTS.yml | 77 ++++++++++++++++++++++++++++++++++ .gitea/workflows/Test.yml | 65 ---------------------------- build.zig.zon | 4 +- src/soft/SoftCommandBuffer.zig | 5 +-- 4 files changed, 81 insertions(+), 70 deletions(-) create mode 100644 .gitea/workflows/CTS.yml diff --git a/.gitea/workflows/CTS.yml b/.gitea/workflows/CTS.yml new file mode 100644 index 0000000..f2f4d42 --- /dev/null +++ b/.gitea/workflows/CTS.yml @@ -0,0 +1,77 @@ +name: CTS + +on: + workflow_dispatch: + +jobs: + build_and_test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: https://codeberg.org/mlugg/setup-zig@v2 + - uses: actions/setup-node@v6 + with: + node-version: 24 + - name: Install system dependencies + run: | + apt update + apt install -y libgl1 libwayland-egl1 libwayland-cursor0 clang libwayland-server0 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown + + - uses: Swatinem/rust-cache@v2 + with: + cache-all-crates: "true" + cache-on-failure: "false" + + - name: Install cargo tools + uses: cargo-bins/cargo-binstall@main + + - name: Install Dioxus + shell: bash + run: | + source $HOME/.cargo/env + cargo binstall dioxus-cli --no-confirm --force --version 0.7.9 + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Install deqp-runner + run: cargo install deqp-runner + + - name: Verify installations + shell: bash + run: | + source $HOME/.cargo/env + echo "Verifying tool installations..." + which dx && dx --version || echo "dioxus-cli not found" + which deqp-runner && deqp-runner --version || echo "deqp-runner not found" + + - name: Run Vulkan CTS + run: zig build cts-soft --release=fast -- -j4 + continue-on-error: true + + - name: Verify tests + run: ls cts | grep "results.csv"; + + - name: Cloning CTS viewer + run: git clone https://git.kbz8.me/kbz_8/VulkanCTSViewer.git + + - name: Build CTS viewer + env: + URL: https://vulkan-driver-cts-report.kbz8.me/ + run: | + cd VulkanCTSViewer + zip ./assets/results.zip ../cts/results.csv + dx build --verbose --platform web --release + + - name: Publish to Cloudflare Pages + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + command: pages deploy VulkanCTSViewer/target/dx/vulkan-cts-analyzer/release/web/public --project-name=vulkan-driver-cts-report + gitHubToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitea/workflows/Test.yml b/.gitea/workflows/Test.yml index ffef072..01c4ede 100644 --- a/.gitea/workflows/Test.yml +++ b/.gitea/workflows/Test.yml @@ -14,71 +14,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: https://codeberg.org/mlugg/setup-zig@v2 - - uses: actions/setup-node@v6 - with: - node-version: 24 - - name: Install system dependencies - run: | - apt update - apt install -y libgl1 libwayland-egl1 libwayland-cursor0 clang libwayland-server0 - name: Zig Tests run: zig build test-soft - - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown - - - uses: Swatinem/rust-cache@v2 - with: - cache-all-crates: "true" - cache-on-failure: "false" - - - name: Install cargo tools - uses: cargo-bins/cargo-binstall@main - - - name: Install Dioxus - shell: bash - run: | - source $HOME/.cargo/env - cargo binstall dioxus-cli --no-confirm --force --version 0.7.6 - echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - - name: Install deqp-runner - run: cargo install deqp-runner - - - name: Verify installations - shell: bash - run: | - source $HOME/.cargo/env - echo "Verifying tool installations..." - which dx && dx --version || echo "dioxus-cli not found" - which deqp-runner && deqp-runner --version || echo "deqp-runner not found" - - - name: Run Vulkan CTS - run: zig build cts-soft --release=fast -- -j3 - continue-on-error: true - - - name: Verify tests - run: ls cts | grep "results.csv"; - - - name: Cloning CTS viewer - run: git clone https://git.kbz8.me/kbz_8/VulkanCTSViewer.git - - - name: Build CTS viewer - env: - URL: https://vulkan-driver-cts-report.kbz8.me/ - run: | - cd VulkanCTSViewer - zip ./assets/results.zip ../cts/results.csv - dx build --verbose --platform web --release - - - name: Publish to Cloudflare Pages - uses: cloudflare/wrangler-action@v3 - with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy VulkanCTSViewer/target/dx/vulkan-cts-analyzer/release/web/public --project-name=vulkan-driver-cts-report - gitHubToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.zig.zon b/build.zig.zon index 281c612..d5bba44 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -31,8 +31,8 @@ .lazy = true, }, .SPIRV_Interpreter = .{ - .url = "git+https://git.kbz8.me/kbz_8/SPIRV-Interpreter#4e852b5c07b7a3f70f9c361c873514eb70f73152", - .hash = "SPIRV_Interpreter-0.0.1-ajmpn_krBQAuTc6YvvzArCbZ8kl-58RIIjcHosa3OsZ-", + .url = "git+https://git.kbz8.me/kbz_8/SPIRV-Interpreter#9d20363ae852e1b400cb62508cb672bcfd5b3716", + .hash = "SPIRV_Interpreter-0.0.1-ajmpn6QuBQDDfo3uv6HauRc4DLNp2b0pZkfwyuzF-w9d", .lazy = true, }, //.SPIRV_Interpreter = .{ diff --git a/src/soft/SoftCommandBuffer.zig b/src/soft/SoftCommandBuffer.zig index 62c3e13..2a114da 100644 --- a/src/soft/SoftCommandBuffer.zig +++ b/src/soft/SoftCommandBuffer.zig @@ -106,9 +106,8 @@ pub fn execute(self: *Self, device: *ExecutionDevice) void { } pub fn begin(interface: *Interface, _: *const vk.CommandBufferBeginInfo) VkError!void { - const self: *Self = @alignCast(@fieldParentPtr("interface", interface)); - self.commands.clearAndFree(self.command_allocator.allocator()); - _ = self.command_allocator.reset(.free_all); + // No-op + _ = interface; } pub fn end(interface: *Interface) VkError!void {