1 #ifndef XORG_EXA_TGSI_H 2 #define XORG_EXA_TGSI_H 3 4 #include "xorg_renderer.h" 5 6 enum xorg_vs_traits { 7 VS_COMPOSITE = 1 << 0, 8 VS_MASK = 1 << 1, 9 VS_SOLID_FILL = 1 << 2, 10 VS_LINGRAD_FILL = 1 << 3, 11 VS_RADGRAD_FILL = 1 << 4, 12 VS_YUV = 1 << 5, 13 14 15 VS_FILL = (VS_SOLID_FILL | 16 VS_LINGRAD_FILL | 17 VS_RADGRAD_FILL) 18 }; 19 20 enum xorg_fs_traits { 21 FS_COMPOSITE = 1 << 0, 22 FS_MASK = 1 << 1, 23 FS_SOLID_FILL = 1 << 2, 24 FS_LINGRAD_FILL = 1 << 3, 25 FS_RADGRAD_FILL = 1 << 4, 26 FS_CA_FULL = 1 << 5, /* src.rgba * mask.rgba */ 27 FS_CA_SRCALPHA = 1 << 6, /* src.aaaa * mask.rgba */ 28 FS_YUV = 1 << 7, 29 FS_SRC_REPEAT_NONE = 1 << 8, 30 FS_MASK_REPEAT_NONE = 1 << 9, 31 FS_SRC_SWIZZLE_RGB = 1 << 10, 32 FS_MASK_SWIZZLE_RGB = 1 << 11, 33 FS_SRC_SET_ALPHA = 1 << 12, 34 FS_MASK_SET_ALPHA = 1 << 13, 35 FS_SRC_LUMINANCE = 1 << 14, 36 FS_MASK_LUMINANCE = 1 << 15, 37 38 FS_FILL = (FS_SOLID_FILL | 39 FS_LINGRAD_FILL | 40 FS_RADGRAD_FILL), 41 FS_COMPONENT_ALPHA = (FS_CA_FULL | 42 FS_CA_SRCALPHA) 43 }; 44 45 struct xorg_shader { 46 void *fs; 47 void *vs; 48 }; 49 50 struct xorg_shaders; 51 52 struct xorg_shaders *xorg_shaders_create(struct xorg_renderer *renderer); 53 void xorg_shaders_destroy(struct xorg_shaders *shaders); 54 55 struct xorg_shader xorg_shaders_get(struct xorg_shaders *shaders, 56 unsigned vs_traits, 57 unsigned fs_traits); 58 59 #endif 60