summaryrefslogtreecommitdiff
path: root/src/gpu/gpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gpu.h')
-rw-r--r--src/gpu/gpu.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gpu/gpu.h b/src/gpu/gpu.h
index 41eeb29..5e928b2 100644
--- a/src/gpu/gpu.h
+++ b/src/gpu/gpu.h
@@ -75,6 +75,15 @@ struct TextureWithView {
WGPUTextureView view;
};
+// Platform-abstracted texture copy types
+#if defined(DEMO_CROSS_COMPILE_WIN32)
+using GpuTextureCopyInfo = WGPUImageCopyTexture;
+using GpuTextureDataLayout = WGPUTextureDataLayout;
+#else
+using GpuTextureCopyInfo = WGPUTexelCopyTextureInfo;
+using GpuTextureDataLayout = WGPUTexelCopyBufferLayout;
+#endif
+
GpuBuffer gpu_create_buffer(WGPUDevice device, size_t size, uint32_t usage,
const void* data = nullptr);
TextureWithView gpu_create_texture_2d(WGPUDevice device, uint32_t width,