From 3111792cd58d915c13cbfcd1b0c6e94c4bc4ad8d Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Mon, 2 Jan 2023 07:34:30 +0200 Subject: [PATCH] adding the pipeline part of the API --- src/vk.h | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/vk.h b/src/vk.h index 218e810..d48634f 100644 --- a/src/vk.h +++ b/src/vk.h @@ -18,6 +18,22 @@ enum { VKQ_XFER = 8 }; +/* shader types */ +enum { + VKSDR_VERTEX, + VKSDR_PIXEL, + VKSDR_TESS_CTL, + VKSDR_TESS_EVAL, + VKSDR_GEOM +}; + +/* primitives */ +enum { + VKPRIM_POINTS, + VKPRIM_LINES, + VKPRIM_TRIANGLES +}; + void vk_init_xwin(Display *dpy, Window win); void vk_init_queue(unsigned int qflags, int count); @@ -47,6 +63,26 @@ void vk_fb_rpass(int fb, int rpass); void vk_fb_images(int fb, int n, ...); VkFramebuffer vk_fb(int fb); - +int vk_create_pipeln(void); +void vk_free_pipeln(int pp); +void vk_viewport(int pp, int x, int y, int width, int height); +void vk_scissor(int pp, int x, int y, int width, int height); +void vk_pipeln_shader(int pp, int type, VkShaderModule sdr); +/* TODO: vertex input */ +void vk_pipeln_prim(int pp, int prim); +void vk_pipeln_polymode(int pp, int mode); +void vk_pipeln_cull(int pp, int cull); +void vk_pipeln_frontface(int pp, int ff); +void vk_pipeln_linewidth(int pp, float w); +void vk_pipeln_multisample(int pp, int nsamples); +void vk_pipeln_colormask(int pp, int r, int g, int b); +void vk_pipeln_depthmask(int pp, int z); +void vk_pipeln_stencilmask(int pp, int s); +void vk_pipeln_zbuffer(int pp, int enable); +void vk_pipeln_stencil(int pp, int enable); +void vk_pipeln_stencil_op(int pp, int sfail, int zfail, int zpass); +void vk_pipeln_stencil_func(int pp, int op, unsigned int ref, unsigned int mask); +void vk_pipeln_blend(int pp, int enable); +void vk_pipeln_blendfunc(int pp, int src, int dst); #endif /* VK_H_ */ -- 1.7.10.4