Skip to content

Commit

Permalink
Pushing for web test
Browse files Browse the repository at this point in the history
  • Loading branch information
klukaszek committed Dec 29, 2024
1 parent 4a57d3a commit e157017
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gpu/webgpu/SDL_gpu_webgpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2201,6 +2201,7 @@ static void WebGPU_CreateSwapchain(WebGPURenderer *renderer, WindowData *windowD
.format = swapchainData->format,
.mipLevelCount = 1,
.sampleCount = swapchainData->sampleCount,
.label = "CanvasMSAA",
};
swapchainData->msaaTexture = wgpuDeviceCreateTexture(renderer->device, &msaaDesc);
swapchainData->msaaView = wgpuTextureCreateView(swapchainData->msaaTexture, NULL);
Expand Down Expand Up @@ -3220,8 +3221,6 @@ static SDL_GPUTexture *WebGPU_CreateTexture(

/*INTERNAL_PRINT_32BITS(texture->common.info.usage);*/

SDL_Log("layer count or depth: %u", textureCreateInfo->layer_count_or_depth);

// Create Texture View for the texture
WGPUTextureViewDescriptor viewDesc = {
.label = "SDL_GPU WebGPU Texture View",
Expand Down Expand Up @@ -3250,6 +3249,8 @@ static SDL_GPUTexture *WebGPU_CreateTexture(

SDL_Log("Created texture %p", texture->texture);
SDL_Log("Created texture view %p, for texture %p", texture->fullView, texture->texture);
SDL_Log("Created Texture's Depth or Array Layers: %u", wgpuTextureGetDepthOrArrayLayers(texture->texture));

return (SDL_GPUTexture *)texture;
}

Expand Down Expand Up @@ -3317,6 +3318,8 @@ static void WebGPU_UploadToTexture(SDL_GPUCommandBuffer *commandBuffer,
.depthOrArrayLayers = destination->d,
};

SDL_Log("Copy Texture depthOrArrayLayers: %u", extent.depthOrArrayLayers);

wgpuQueueWriteTexture(
wgpuCmdBuf->renderer->queue,
&copyTexture,
Expand Down

0 comments on commit e157017

Please sign in to comment.