Skip to content

Commit

Permalink
Fix erroneous VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
thatcosmonaut committed Aug 5, 2024
1 parent 4afb53d commit 7281efc
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/gpu/vulkan/SDL_gpu_vulkan.c
Original file line number Diff line number Diff line change
Expand Up @@ -5184,7 +5184,7 @@ static void VULKAN_INTERNAL_BindGraphicsDescriptorSets(
currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
currentWriteDescriptorSet->pNext = NULL;
currentWriteDescriptorSet->descriptorCount = 1;
currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
currentWriteDescriptorSet->dstArrayElement = 0;
currentWriteDescriptorSet->dstBinding = resourceLayout->fragmentSamplerCount + resourceLayout->fragmentStorageTextureCount + i;
currentWriteDescriptorSet->dstSet = commandBuffer->fragmentResourceDescriptorSet;
Expand Down Expand Up @@ -8571,8 +8571,7 @@ static void VULKAN_DispatchComputeIndirect(
renderer->vkCmdDispatchIndirect(
vulkanCommandBuffer->commandBuffer,
vulkanBuffer->buffer,
offsetInBytes
);
offsetInBytes);

VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, vulkanBuffer);
}
Expand Down Expand Up @@ -9597,11 +9596,11 @@ static WindowData *VULKAN_INTERNAL_FetchWindowData(
return (WindowData *)SDL_GetPointerProperty(properties, WINDOW_PROPERTY_DATA, NULL);
}

static int VULKAN_INTERNAL_OnWindowResize(void* userdata, SDL_Event *e) {
SDL_Window *w = (SDL_Window*) userdata;
static int VULKAN_INTERNAL_OnWindowResize(void *userdata, SDL_Event *e)
{
SDL_Window *w = (SDL_Window *)userdata;
WindowData *data;
if (e->type == SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED)
{
if (e->type == SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED) {
data = VULKAN_INTERNAL_FetchWindowData(w);
data->needsSwapchainRecreate = SDL_TRUE;
}
Expand Down Expand Up @@ -9900,8 +9899,7 @@ static SDL_GpuTexture *VULKAN_AcquireSwapchainTexture(
}

/* If window data marked as needing swapchain recreate, try to recreate */
if (windowData->needsSwapchainRecreate)
{
if (windowData->needsSwapchainRecreate) {
VULKAN_INTERNAL_RecreateSwapchain(renderer, windowData);
swapchainData = windowData->swapchainData;

Expand Down

0 comments on commit 7281efc

Please sign in to comment.