summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/tgsi/tgsi_ureg.h
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-09-12 14:18:50 -0700
committerKeith Whitwell <keithw@vmware.com>2009-09-12 14:18:50 -0700
commit11f41f54cf4ce1cdc19c4b5c45ed8d2083d96831 (patch)
treeeb5552ff6cb95eb15e4f2f8159fb3958be4b750f /src/gallium/auxiliary/tgsi/tgsi_ureg.h
parentc23894295b593b9a8561e9775199e1c78ea4435d (diff)
ureg: add a mechanism to get the built tokens rather than a full shader
Previously ureg would always call the driver's create-shader function. This allows the caller the opportunity to hold onto the tokens if it needs to reuse them, eg. to create an internal draw shader.
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_ureg.h')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ureg.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
index 48aeaaf459..f04f443b9e 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
@@ -82,10 +82,21 @@ ureg_create( unsigned processor );
const struct tgsi_token *
ureg_finalize( struct ureg_program * );
+/* Create and return a shader:
+ */
void *
ureg_create_shader( struct ureg_program *,
struct pipe_context *pipe );
+
+/* Alternately, return the built token stream and hand ownership of
+ * that memory to the caller:
+ */
+const struct tgsi_token *
+ureg_get_tokens( struct ureg_program *ureg,
+ unsigned *nr_tokens );
+
+
void
ureg_destroy( struct ureg_program * );