From d44cd382e6100f1989d9706d446f8b813b20e0d9 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Fri, 8 Nov 2024 18:26:09 -0800 Subject: [PATCH] [proposal] Change SetBlendConstant to take 4 floats Fixes 378 --- schema.json | 2 +- webgpu.h | 4 ++-- webgpu.yml | 17 ++++++++++++----- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/schema.json b/schema.json index 9c9d8db..a2010f5 100644 --- a/schema.json +++ b/schema.json @@ -172,7 +172,7 @@ "doc": { "type": "string", "$comment": "Doxygen doesn't support multi-paragraph param docs (containing \\n\\n)", - "pattern": "^\n?.+(\n.+)*\n?$" + "pattern": "^$|^\n?.+(\n.+)*\n?$" } } } diff --git a/webgpu.h b/webgpu.h index d533daf..3f62130 100644 --- a/webgpu.h +++ b/webgpu.h @@ -2885,7 +2885,7 @@ typedef void (*WGPUProcRenderPassEncoderSetBindGroup)(WGPURenderPassEncoder rend * Proc pointer type for @ref wgpuRenderPassEncoderSetBlendConstant: * > @copydoc wgpuRenderPassEncoderSetBlendConstant */ -typedef void (*WGPUProcRenderPassEncoderSetBlendConstant)(WGPURenderPassEncoder renderPassEncoder, WGPUColor const * color) WGPU_FUNCTION_ATTRIBUTE; +typedef void (*WGPUProcRenderPassEncoderSetBlendConstant)(WGPURenderPassEncoder renderPassEncoder, float r, float g, float b, float a) WGPU_FUNCTION_ATTRIBUTE; /** * Proc pointer type for @ref wgpuRenderPassEncoderSetIndexBuffer: * > @copydoc wgpuRenderPassEncoderSetIndexBuffer @@ -3563,7 +3563,7 @@ WGPU_EXPORT void wgpuRenderPassEncoderInsertDebugMarker(WGPURenderPassEncoder re WGPU_EXPORT void wgpuRenderPassEncoderPopDebugGroup(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE; WGPU_EXPORT void wgpuRenderPassEncoderPushDebugGroup(WGPURenderPassEncoder renderPassEncoder, WGPUStringView groupLabel) WGPU_FUNCTION_ATTRIBUTE; WGPU_EXPORT void wgpuRenderPassEncoderSetBindGroup(WGPURenderPassEncoder renderPassEncoder, uint32_t groupIndex, WGPU_NULLABLE WGPUBindGroup group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) WGPU_FUNCTION_ATTRIBUTE; -WGPU_EXPORT void wgpuRenderPassEncoderSetBlendConstant(WGPURenderPassEncoder renderPassEncoder, WGPUColor const * color) WGPU_FUNCTION_ATTRIBUTE; +WGPU_EXPORT void wgpuRenderPassEncoderSetBlendConstant(WGPURenderPassEncoder renderPassEncoder, float r, float g, float b, float a) WGPU_FUNCTION_ATTRIBUTE; WGPU_EXPORT void wgpuRenderPassEncoderSetIndexBuffer(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE; WGPU_EXPORT void wgpuRenderPassEncoderSetLabel(WGPURenderPassEncoder renderPassEncoder, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE; WGPU_EXPORT void wgpuRenderPassEncoderSetPipeline(WGPURenderPassEncoder renderPassEncoder, WGPURenderPipeline pipeline) WGPU_FUNCTION_ATTRIBUTE; diff --git a/webgpu.yml b/webgpu.yml index 34241a1..64dea37 100644 --- a/webgpu.yml +++ b/webgpu.yml @@ -4516,11 +4516,18 @@ objects: doc: | TODO args: - - name: color - doc: | - TODO - type: struct.color - pointer: immutable + - name: r + doc: '' + type: float32 + - name: g + doc: '' + type: float32 + - name: b + doc: '' + type: float32 + - name: a + doc: '' + type: float32 - name: set_viewport doc: | TODO