diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/webgpu/dawn_enum_conversions.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/modules/webgpu/dawn_enum_conversions.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/chromium/third_party/blink/renderer/modules/webgpu/dawn_enum_conversions.cc b/chromium/third_party/blink/renderer/modules/webgpu/dawn_enum_conversions.cc index 9b4b3bbf2d2..e37382f33ce 100644 --- a/chromium/third_party/blink/renderer/modules/webgpu/dawn_enum_conversions.cc +++ b/chromium/third_party/blink/renderer/modules/webgpu/dawn_enum_conversions.cc @@ -5,6 +5,7 @@ #include "third_party/blink/renderer/modules/webgpu/dawn_enum_conversions.h" #include "base/check.h" +#include "base/notreached.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_gpu_index_format.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" @@ -429,8 +430,11 @@ WGPUStoreOp AsDawnEnum<WGPUStoreOp>(const WTF::String& webgpu_enum) { if (webgpu_enum == "store") { return WGPUStoreOp_Store; } + if (webgpu_enum == "discard") { + return WGPUStoreOp_Discard; + } if (webgpu_enum == "clear") { - return WGPUStoreOp_Clear; + return WGPUStoreOp_Discard; } NOTREACHED(); return WGPUStoreOp_Force32; @@ -579,16 +583,16 @@ WGPUBlendOperation AsDawnEnum<WGPUBlendOperation>( } template <> -WGPUInputStepMode AsDawnEnum<WGPUInputStepMode>( +WGPUVertexStepMode AsDawnEnum<WGPUVertexStepMode>( const WTF::String& webgpu_enum) { if (webgpu_enum == "vertex") { - return WGPUInputStepMode_Vertex; + return WGPUVertexStepMode_Vertex; } if (webgpu_enum == "instance") { - return WGPUInputStepMode_Instance; + return WGPUVertexStepMode_Instance; } NOTREACHED(); - return WGPUInputStepMode_Force32; + return WGPUVertexStepMode_Force32; } template <> |