1#include <simd/simd.h>
2
3typedef struct {
4 vector_float2 viewport_size;
5} GPUIUniforms;
6
7typedef enum {
8 GPUIQuadInputIndexVertices = 0,
9 GPUIQuadInputIndexQuads = 1,
10 GPUIQuadInputIndexUniforms = 2,
11} GPUIQuadInputIndex;
12
13typedef struct {
14 vector_float2 origin;
15 vector_float2 size;
16 vector_uchar4 background_color;
17 float border_top;
18 float border_right;
19 float border_bottom;
20 float border_left;
21 vector_uchar4 border_color;
22 float corner_radius;
23} GPUIQuad;
24
25typedef enum {
26 GPUIShadowInputIndexVertices = 0,
27 GPUIShadowInputIndexShadows = 1,
28 GPUIShadowInputIndexUniforms = 2,
29} GPUIShadowInputIndex;
30
31typedef struct {
32 vector_float2 origin;
33 vector_float2 size;
34 float corner_radius;
35 float sigma;
36 vector_uchar4 color;
37} GPUIShadow;
38
39typedef enum {
40 GPUISpriteVertexInputIndexVertices = 0,
41 GPUISpriteVertexInputIndexSprites = 1,
42 GPUISpriteVertexInputIndexViewportSize = 2,
43 GPUISpriteVertexInputIndexAtlasSize = 3,
44} GPUISpriteVertexInputIndex;
45
46typedef enum {
47 GPUISpriteFragmentInputIndexAtlas = 0,
48} GPUISpriteFragmentInputIndex;
49
50typedef struct {
51 vector_float2 origin;
52 vector_float2 target_size;
53 vector_float2 source_size;
54 vector_float2 atlas_origin;
55 vector_uchar4 color;
56 uint8_t compute_winding;
57} GPUISprite;
58
59typedef enum {
60 GPUIPathAtlasVertexInputIndexVertices = 0,
61 GPUIPathAtlasVertexInputIndexAtlasSize = 1,
62} GPUIPathAtlasVertexInputIndex;
63
64typedef struct {
65 vector_float2 xy_position;
66 vector_float2 st_position;
67 vector_float2 clip_rect_origin;
68 vector_float2 clip_rect_size;
69} GPUIPathVertex;