From 7d2a80626633b08a347aa11f85f4d96585958e6a Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Sun, 19 Mar 2017 17:19:10 +0100 Subject: etnaviv: add etna_shader_key and generate variants if needed Signed-off-by: Christian Gmeiner --- src/gallium/drivers/etnaviv/etnaviv_shader.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/gallium/drivers/etnaviv/etnaviv_shader.h') 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); -- cgit v1.2.3