summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_shader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_shader.h')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_shader.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_shader.h b/src/gallium/drivers/etnaviv/etnaviv_shader.h
index 9f26befc00c..e56f1fa9f53 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_shader.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_shader.h
@@ -32,6 +32,23 @@
struct etna_context;
struct etna_shader_variant;
+struct etna_shader_key
+{
+ union {
+ struct {
+ };
+ uint32_t global;
+ };
+};
+
+static inline bool
+etna_shader_key_equal(struct etna_shader_key *a, struct etna_shader_key *b)
+{
+ STATIC_ASSERT(sizeof(struct etna_shader_key) <= sizeof(a->global));
+
+ return a->global == b->global;
+}
+
struct etna_shader {
/* shader id (for debug): */
uint32_t id;
@@ -49,6 +66,10 @@ etna_shader_link(struct etna_context *ctx);
bool
etna_shader_update_vertex(struct etna_context *ctx);
+struct etna_shader_variant *
+etna_shader_variant(struct etna_shader *shader, struct etna_shader_key key,
+ struct pipe_debug_callback *debug);
+
void
etna_shader_init(struct pipe_context *pctx);