summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_shader.h
diff options
context:
space:
mode:
authorChristian Gmeiner <[email protected]>2017-03-19 17:19:10 +0100
committerChristian Gmeiner <[email protected]>2017-04-05 19:58:10 +0200
commit7d2a80626633b08a347aa11f85f4d96585958e6a (patch)
treef7222634ecb2e30c13c915da3d5a00779d4c41c3 /src/gallium/drivers/etnaviv/etnaviv_shader.h
parent9da54fdcb5b591a7d6c96871e92f8b183c0a5130 (diff)
etnaviv: add etna_shader_key and generate variants if needed
Signed-off-by: Christian Gmeiner <[email protected]>
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);