summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/r600_pipe_common.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-03-04 19:46:55 +0100
committerMarek Olšák <[email protected]>2014-03-11 18:51:20 +0100
commit946d1cfe3948ca18225313b69a6d3f30b949a84b (patch)
tree8e9d59300a3df9b95a8eb9674d7ece3758bdce07 /src/gallium/drivers/radeon/r600_pipe_common.h
parent6a5499b9d972ee6ef0ffc7e2a867113259985c7b (diff)
r600g: move cayman MSAA setup to a common place
I will use this in radeonsi. Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_pipe_common.h')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index 17867d3d53c..672097ddb90 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -440,6 +440,15 @@ unsigned r600_translate_colorswap(enum pipe_format format);
void r600_init_screen_texture_functions(struct r600_common_screen *rscreen);
void r600_init_context_texture_functions(struct r600_common_context *rctx);
+/* cayman_msaa.c */
+extern const uint32_t eg_sample_locs_2x[4];
+extern const unsigned eg_max_dist_2x;
+extern const uint32_t eg_sample_locs_4x[4];
+extern const unsigned eg_max_dist_4x;
+void cayman_get_sample_position(struct pipe_context *ctx, unsigned sample_count,
+ unsigned sample_index, float *out_value);
+void cayman_emit_msaa_state(struct radeon_winsys_cs *cs, int nr_samples);
+
/* Inline helpers. */
@@ -458,4 +467,11 @@ r600_resource_reference(struct r600_resource **ptr, struct r600_resource *res)
#define R600_ERR(fmt, args...) \
fprintf(stderr, "EE %s:%d %s - "fmt, __FILE__, __LINE__, __func__, ##args)
+/* For MSAA sample positions. */
+#define FILL_SREG(s0x, s0y, s1x, s1y, s2x, s2y, s3x, s3y) \
+ (((s0x) & 0xf) | (((s0y) & 0xf) << 4) | \
+ (((s1x) & 0xf) << 8) | (((s1y) & 0xf) << 12) | \
+ (((s2x) & 0xf) << 16) | (((s2y) & 0xf) << 20) | \
+ (((s3x) & 0xf) << 24) | (((s3y) & 0xf) << 28))
+
#endif