From 23b59d3b4029ea89b5a8e85ea3cc10bea1ab01d0 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Tue, 25 Aug 2009 14:01:58 -0400 Subject: exa: add basic code to cache vertex and fragment shaders --- src/gallium/state_trackers/xorg/xorg_exa_tgsi.h | 27 ++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'src/gallium/state_trackers/xorg/xorg_exa_tgsi.h') diff --git a/src/gallium/state_trackers/xorg/xorg_exa_tgsi.h b/src/gallium/state_trackers/xorg/xorg_exa_tgsi.h index b7245c8e89..f87f035267 100644 --- a/src/gallium/state_trackers/xorg/xorg_exa_tgsi.h +++ b/src/gallium/state_trackers/xorg/xorg_exa_tgsi.h @@ -3,15 +3,32 @@ #include "xorg_exa.h" +enum xorg_vs_traits { + VS_COMPOSITE = 1 << 0, + VS_FILL = 1 << 1 + /*VS_TRANSFORM = 1 << 2*/ +}; + +enum xorg_fs_traits { + FS_COMPOSITE = 1 << 0, + FS_MASK = 1 << 1, + FS_FILL = 1 << 2, + FS_LINEAR_GRADIENT = 1 << 3, + FS_RADIAL_GRADIENT = 1 << 4 +}; + struct xorg_shader { void *fs; void *vs; }; -struct xorg_shader xorg_shader_construct(struct exa_context *exa, - int op, - PicturePtr src_picture, - PicturePtr mask_picture, - PicturePtr dst_picture); +struct xorg_shaders; + +struct xorg_shaders *xorg_shaders_create(struct exa_context *exa); +void xorg_shaders_destroy(struct xorg_shaders *shaders); + +struct xorg_shader xorg_shaders_get(struct xorg_shaders *shaders, + unsigned vs_traits, + unsigned fs_traits); #endif -- cgit v1.2.3