Skip to content

Commit

Permalink
fix: shader cleanup in vulkan backend
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan hoffstadt committed May 29, 2024
1 parent 1e79184 commit 7be8a64
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
if not exist ../out/example_2.dll exit 1
if not exist ../out/example_3.dll exit 1
if not exist ../out/example_4.dll exit 1
if not exist ../out/example_5.dll exit 1
if not exist ../out/example_8.dll exit 1
if not exist ../out/pilot_light.exe exit 1
if not exist ../out/pl_graphics_ext.dll exit 1
if not exist ../out/pl_image_ext.dll exit 1
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
test -f ./out/example_2.dylib || exit 1
test -f ./out/example_3.dylib || exit 1
test -f ./out/example_4.dylib || exit 1
test -f ./out/example_5.dylib || exit 1
test -f ./out/example_8.dylib || exit 1
test -f ./out/pl_stats_ext.dylib || exit 1
test -f ./out/pl_image_ext.dylib || exit 1
test -f ./out/pl_debug_ext.dylib || exit 1
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
test -f ./out/example_2.so || exit 1
test -f ./out/example_3.so || exit 1
test -f ./out/example_4.so || exit 1
test -f ./out/example_5.so || exit 1
test -f ./out/example_8.so || exit 1
test -f ./out/pl_graphics_ext.so || exit 1
test -f ./out/pl_image_ext.so || exit 1
test -f ./out/pl_stats_ext.so || exit 1
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Demonstrates:
* loading extensions
* basic graphics extension use

## Example 5 - Drawing Extension 3D (example_5.c)
## Example 8 - Drawing Extension 3D (example_8.c)
Demonstrates:
* loading APIs
* hot reloading
Expand Down
4 changes: 2 additions & 2 deletions examples/example_5.c → examples/example_8.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
example_5.c
example_8.c
- demonstrates loading APIs
- demonstrates loading extensions
- demonstrates hot reloading
Expand Down Expand Up @@ -194,7 +194,7 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)

// use window API to create a window
const plWindowDesc tWindowDesc = {
.pcName = "Example 5",
.pcName = "Example 8",
.iXPos = 200,
.iYPos = 200,
.uWidth = 600,
Expand Down
2 changes: 1 addition & 1 deletion extensions/pl_graphics_vulkan.c
Original file line number Diff line number Diff line change
Expand Up @@ -5278,7 +5278,7 @@ pl_destroy_shader(plDevice* ptDevice, plShaderHandle tHandle)
ptVariantVulkanResource->tPipelineLayout = VK_NULL_HANDLE;
ptVariantVulkanResource->tPipeline = VK_NULL_HANDLE;
pl_sb_push(ptGraphics->sbtShaderFreeIndices, tHandle.uIndex);
for(uint32_t k = 0; k < ptResource->tDescription.uBindGroupLayoutCount + 1; k++)
for(uint32_t k = 0; k < ptResource->tDescription.uBindGroupLayoutCount; k++)
{
plVulkanBindGroupLayout* ptVulkanBindGroupLayout = &ptVulkanGfx->sbtBindGroupLayouts[ptResource->tDescription.atBindGroupLayouts[k].uHandle];
vkDestroyDescriptorSetLayout(ptVulkanDevice->tLogicalDevice, ptVulkanBindGroupLayout->tDescriptorSetLayout, NULL);
Expand Down
2 changes: 1 addition & 1 deletion scripts/gen_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def add_example_app(name):
add_example_app("example_2")
add_example_app("example_3")
add_example_app("example_4")
add_example_app("example_5")
add_example_app("example_8")

vulkan_shaders = [
"example_4.frag",
Expand Down

0 comments on commit 7be8a64

Please sign in to comment.