summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2010-06-07 19:37:44 +0100
committerKeith Whitwell <[email protected]>2010-06-07 19:38:30 +0100
commit9d343f4ba18e506942a9c1f70f0ccae1309d7ece (patch)
tree83e831d7746421b1955ecff5bf24c68e31008a49 /src/gallium/targets
parenteb430046de33db2e2e182e9fa2462e2fef163ca0 (diff)
graw: add parse_geometry_shader helper
Diffstat (limited to 'src/gallium/targets')
-rw-r--r--src/gallium/targets/graw-xlib/graw_util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/targets/graw-xlib/graw_util.c b/src/gallium/targets/graw-xlib/graw_util.c
index 147532cdee1..47aca4464db 100644
--- a/src/gallium/targets/graw-xlib/graw_util.c
+++ b/src/gallium/targets/graw-xlib/graw_util.c
@@ -8,6 +8,19 @@
/* Helper functions. These are the same for all graw implementations.
*/
+void *graw_parse_geometry_shader(struct pipe_context *pipe,
+ const char *text)
+{
+ struct tgsi_token tokens[1024];
+ struct pipe_shader_state state;
+
+ if (!tgsi_text_translate(text, tokens, Elements(tokens)))
+ return NULL;
+
+ state.tokens = tokens;
+ return pipe->create_gs_state(pipe, &state);
+}
+
void *graw_parse_vertex_shader(struct pipe_context *pipe,
const char *text)
{