summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/radeonsi_shader.h
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2012-10-05 16:59:10 +0200
committerMichel Dänzer <[email protected]>2012-10-26 15:51:17 +0200
commit44ef033c25ee0dde97a2339d4439560885d52cad (patch)
treebd4147b322bd0ad4b02aa146639c95aebbcc1542 /src/gallium/drivers/radeonsi/radeonsi_shader.h
parentf3257d80b0e3885607afda642d326e47db48ed62 (diff)
radeonsi: Don't snoop context state while building shaders.
Let's use the shader key describing the state. Ported from r600g commit b6521801070d52bdd5908824e82c1ce2dde16e8e. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/radeonsi_shader.h')
-rw-r--r--src/gallium/drivers/radeonsi/radeonsi_shader.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.h b/src/gallium/drivers/radeonsi/radeonsi_shader.h
index 4583e62b9c4..9d382d56286 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.h
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.h
@@ -77,6 +77,11 @@ struct si_shader {
unsigned nr_cbufs;
};
+struct si_shader_key {
+ unsigned export_16bpc:8;
+ unsigned nr_cbufs:4;
+};
+
struct si_pipe_shader {
struct si_pipe_shader_selector *selector;
struct si_pipe_shader *next_variant;
@@ -88,11 +93,12 @@ struct si_pipe_shader {
unsigned spi_ps_input_ena;
unsigned sprite_coord_enable;
unsigned so_strides[4];
- unsigned key;
+ struct si_shader_key key;
};
/* radeonsi_shader.c */
-int si_pipe_shader_create(struct pipe_context *ctx, struct si_pipe_shader *shader);
+int si_pipe_shader_create(struct pipe_context *ctx, struct si_pipe_shader *shader,
+ struct si_shader_key key);
void si_pipe_shader_destroy(struct pipe_context *ctx, struct si_pipe_shader *shader);
#endif