diff options
author | Christian König <[email protected]> | 2013-03-22 15:59:22 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2013-04-02 13:01:43 +0200 |
commit | a0dca4409a25b7810c28bcd64b48b3f0f159a455 (patch) | |
tree | 2435c9fc39bcdd19f770ea6c91f031678b85f0a9 /src/gallium/drivers/radeonsi/radeonsi_shader.h | |
parent | cf9b31f78a545ede480c2dc25937a07a96cf6656 (diff) |
radeonsi: add instance divisor support v3
v2: reduce key size, don't copy key around to much.
v3: remove key size reduction
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/radeonsi_shader.h')
-rw-r--r-- | src/gallium/drivers/radeonsi/radeonsi_shader.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.h b/src/gallium/drivers/radeonsi/radeonsi_shader.h index 9dae742115f..9d3c14b3dbb 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_shader.h +++ b/src/gallium/drivers/radeonsi/radeonsi_shader.h @@ -111,13 +111,18 @@ struct si_shader { unsigned nr_cbufs; }; -struct si_shader_key { - unsigned export_16bpc:8; - unsigned nr_cbufs:4; - unsigned color_two_side:1; - unsigned alpha_func:3; - unsigned flatshade:1; - float alpha_ref; +union si_shader_key { + struct { + unsigned export_16bpc:8; + unsigned nr_cbufs:4; + unsigned color_two_side:1; + unsigned alpha_func:3; + unsigned flatshade:1; + float alpha_ref; + } ps; + struct { + unsigned instance_divisors[PIPE_MAX_ATTRIBS]; + } vs; }; struct si_pipe_shader { @@ -132,12 +137,11 @@ struct si_pipe_shader { unsigned spi_shader_col_format; unsigned sprite_coord_enable; unsigned so_strides[4]; - struct si_shader_key key; + union si_shader_key key; }; /* radeonsi_shader.c */ -int si_pipe_shader_create(struct pipe_context *ctx, struct si_pipe_shader *shader, - struct si_shader_key key); +int si_pipe_shader_create(struct pipe_context *ctx, struct si_pipe_shader *shader); void si_pipe_shader_destroy(struct pipe_context *ctx, struct si_pipe_shader *shader); #endif |