- Adding in compatibility paths to support minimum per-vertex strides for vertex formats. OpenGL supports a minimum stride of 1 byte, in Metal, this minimum stride is 4 bytes. Meaing a vertex format must be atleast 4-bytes in size. - Replacing transform feedback compile-time check to conditional look-up, given TF is supported on macOS with Metal. - 3D texture size safety check added as a general capability, rather than being in the gl backend only. Also required for Metal. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14510
26 lines
508 B
C++
26 lines
508 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
* Copyright 2016 by Mike Erwin. All rights reserved. */
|
|
|
|
/** \file
|
|
* \ingroup gpu
|
|
*
|
|
* GPU vertex format
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct GPUVertFormat;
|
|
|
|
void VertexFormat_pack(struct GPUVertFormat *format);
|
|
void VertexFormat_texture_buffer_pack(struct GPUVertFormat *format);
|
|
uint padding(uint offset, uint alignment);
|
|
uint vertex_buffer_size(const struct GPUVertFormat *format, uint vertex_len);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|