|
24 | 24 | // File: /webgpu/SDL_gpu_webgpu.c
|
25 | 25 | // Author: Kyle Lukaszek
|
26 | 26 | // Email: kylelukaszek [at] gmail [dot] com
|
27 |
| -// License: Zlib |
28 | 27 | // Description: WebGPU driver for SDL_gpu using the emscripten WebGPU implementation
|
29 | 28 | // Note: Compiling SDL GPU programs using emscripten will require -sUSE_WEBGPU=1 -sASYNCIFY=1
|
30 | 29 |
|
@@ -437,6 +436,37 @@ typedef struct CommandPoolHashTableKey
|
437 | 436 | SDL_ThreadID threadID;
|
438 | 437 | } CommandPoolHashTableKey;
|
439 | 438 |
|
| 439 | +typedef struct RenderPassColorTargetDescription |
| 440 | +{ |
| 441 | + WGPUTextureFormat format; |
| 442 | + SDL_GPULoadOp loadOp; |
| 443 | + SDL_GPUStoreOp storeOp; |
| 444 | +} RenderPassColorTargetDescription; |
| 445 | + |
| 446 | +typedef struct RenderPassDepthStencilTargetDescription |
| 447 | +{ |
| 448 | + WGPUTextureFormat format; |
| 449 | + SDL_GPULoadOp loadOp; |
| 450 | + SDL_GPUStoreOp storeOp; |
| 451 | + SDL_GPULoadOp stencilLoadOp; |
| 452 | + SDL_GPUStoreOp stencilStoreOp; |
| 453 | +} RenderPassDepthStencilTargetDescription; |
| 454 | + |
| 455 | +typedef struct RenderPassHashTableKey |
| 456 | +{ |
| 457 | + RenderPassColorTargetDescription colorTargetDescriptions[MAX_COLOR_TARGET_BINDINGS]; |
| 458 | + Uint32 numColorTargets; |
| 459 | + WGPUTextureFormat resolveTargetFormats[MAX_COLOR_TARGET_BINDINGS]; |
| 460 | + Uint32 numResolveTargets; |
| 461 | + RenderPassDepthStencilTargetDescription depthStencilTargetDescription; |
| 462 | + Uint32 sampleCount; |
| 463 | +} RenderPassHashTableKey; |
| 464 | + |
| 465 | +typedef struct WebGPURenderPassHashTableValue |
| 466 | +{ |
| 467 | + WebGPUCommandBuffer handle; |
| 468 | +} WebGPURenderPassHashTableValue; |
| 469 | + |
440 | 470 | typedef struct WebGPURenderer
|
441 | 471 | {
|
442 | 472 | bool debug;
|
@@ -5159,7 +5189,7 @@ static SDL_GPUDevice *WebGPU_CreateDevice(bool debug, bool preferLowPower, SDL_P
|
5159 | 5189 | }
|
5160 | 5190 |
|
5161 | 5191 | SDL_Log("SDL_GPU Driver: WebGPU");
|
5162 |
| - SDL_Log("WebGPU Device: %s", |
| 5192 | + SDL_Log("WebGPU Device: %s (Only for debugging purposes, not feature detection)", |
5163 | 5193 | renderer->adapterInfo.description);
|
5164 | 5194 |
|
5165 | 5195 | // Keep track of the minimum uniform buffer alignment
|
|
0 commit comments