Skip to content

Commit

Permalink
Working on getting WebGPU_Blit() ready for implementation by solving …
Browse files Browse the repository at this point in the history
…a bunch of existing bugs with the backend. Still encountering a layerCount issue that I cannot verify. My debugger says the texture and texture view both have 4 layers, but the error says that the texture's array layer count is 1.
  • Loading branch information
klukaszek committed Dec 28, 2024
1 parent cc4a374 commit c1fa6b7
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 63 deletions.
6 changes: 3 additions & 3 deletions src/gpu/SDL_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2505,6 +2505,7 @@ void SDL_BlitGPUTexture(
failed = true;
}
if (info->source.w == 0 || info->source.h == 0 || info->destination.w == 0 || info->destination.h == 0) {
SDL_Log("%d %d %d %d", info->source.w, info->source.h, info->destination.w, info->destination.h);
SDL_assert_release(!"Blit source/destination regions must have non-zero width, height, and depth");
failed = true;
}
Expand Down Expand Up @@ -2624,8 +2625,7 @@ bool SDL_SetGPUAllowedFramesInFlight(
CHECK_DEVICE_MAGIC(device, false);

if (device->debug_mode) {
if (allowed_frames_in_flight < 1 || allowed_frames_in_flight > 3)
{
if (allowed_frames_in_flight < 1 || allowed_frames_in_flight > 3) {
SDL_assert_release(!"allowed_frames_in_flight value must be between 1 and 3!");
}
}
Expand Down Expand Up @@ -2727,7 +2727,7 @@ bool SDL_WaitAndAcquireGPUSwapchainTexture(
swapchain_texture_width,
swapchain_texture_height);

if (*swapchain_texture != NULL){
if (*swapchain_texture != NULL) {
commandBufferHeader->swapchain_texture_acquired = true;
}

Expand Down
Loading

0 comments on commit c1fa6b7

Please sign in to comment.