Add initial base implementation for WebGPU rendering backend
This commit is contained in:
26
Source/Engine/GraphicsDevice/WebGPU/IncludeWebGPU.h
Normal file
26
Source/Engine/GraphicsDevice/WebGPU/IncludeWebGPU.h
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright (c) Wojciech Figat. All rights reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#if GRAPHICS_API_WEBGPU
|
||||
|
||||
// Fix Intellisense errors when Emsicpten SDK is not visible
|
||||
#ifndef UINT32_C
|
||||
#define UINT32_C(x) (x ## U)
|
||||
#endif
|
||||
#ifndef __SIZE_MAX__
|
||||
#define __SIZE_MAX__ (static_cast<intptr>(-1))
|
||||
#endif
|
||||
#ifndef SIZE_MAX
|
||||
#define SIZE_MAX __SIZE_MAX__
|
||||
#endif
|
||||
|
||||
#include <webgpu/webgpu.h>
|
||||
|
||||
// Utiltiy macro to convert WGPUStringView into UTF-16 string (on stack)
|
||||
#define WEBGPU_TO_STR(strView) StringAsUTF16<>(strView.data, strView.data ? strView.length : 0).Get()
|
||||
|
||||
// Utiltiy macro to get WGPUStringView for a text constant
|
||||
#define WEBGPU_STR(str) { str, ARRAY_COUNT(str) - 1 }
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user