|
33 | 33 | #include <regex.h> |
34 | 34 |
|
35 | 35 | // TODO: REMOVE |
36 | | -// Code compiles without these but my IDE is complaining without them |
37 | | -#include "../../../include/SDL3/SDL_atomic.h" |
38 | | -#include "../../../include/SDL3/SDL_gpu.h" |
| 36 | +// Code compiles without these but my LSP freaks out without them |
| 37 | +#include <SDL3/SDL_gpu.h> |
| 38 | +#include <SDL3/SDL_atomic.h> |
39 | 39 |
|
40 | | -// I currently have a copy of the webgpu.h file in the include directory: |
| 40 | +// I currently have a copy of the webgpu.h file in the local include directory: |
41 | 41 | // - usr/local/include/webgpu/webgpu.h |
42 | 42 | // it can be downloaded from here: https://github.com/webgpu-native/webgpu-headers/blob/main/webgpu.h |
43 | 43 | // |
44 | | -// THIS IS A TEMPORARY SOLUTION |
| 44 | +// The code compiles without it as long as Emscripten is used and the -sUSE_WEBGPU flag is set |
45 | 45 | #include <webgpu/webgpu.h> |
46 | 46 |
|
47 | 47 | #define MAX_UBO_SECTION_SIZE 4096 // 4 KiB |
@@ -2202,6 +2202,7 @@ void WebGPU_BeginRenderPass(SDL_GPUCommandBuffer *commandBuffer, |
2202 | 2202 |
|
2203 | 2203 | WebGPUCommandBuffer *wgpu_cmd_buf = (WebGPUCommandBuffer *)commandBuffer; |
2204 | 2204 | if (!wgpu_cmd_buf || colorAttachmentCount == 0) { |
| 2205 | + SDL_LogError(SDL_LOG_CATEGORY_GPU, "Invalid parameters for render pass"); |
2205 | 2206 | return; |
2206 | 2207 | } |
2207 | 2208 |
|
@@ -2286,6 +2287,7 @@ void WebGPU_BeginRenderPass(SDL_GPUCommandBuffer *commandBuffer, |
2286 | 2287 | .depthStencilAttachment = depthStencilAttachmentInfo ? &depthStencilAttachment : NULL |
2287 | 2288 | }; |
2288 | 2289 |
|
| 2290 | + // Create the render pass encoder |
2289 | 2291 | wgpu_cmd_buf->renderPassEncoder = |
2290 | 2292 | wgpuCommandEncoderBeginRenderPass(wgpu_cmd_buf->commandEncoder, &renderPassDesc); |
2291 | 2293 |
|
|
0 commit comments