summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pipe.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-08-28 21:08:49 +0200
committerMarek Olšák <[email protected]>2015-09-01 21:51:13 +0200
commitf6a10f60b75821c20ce7cf338b519b92ed0330fc (patch)
treed4cfd2d602bb3482fb4d481ff15bdf5a0690ff80 /src/gallium/drivers/radeonsi/si_pipe.h
parent02c8e06497c14bed37dc1780585348bb2675cab6 (diff)
radeonsi: optimize scissor states
- convert 16 states to 1 atom - only emit 1 scissor if VIEWPORT_INDEX isn't written - use only one packet when emitting consecutive scissors Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.h')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index 52167f24a95..9060f948971 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -85,6 +85,8 @@
#define SI_IS_TRACE_POINT(x) (((x) & 0xcafe0000) == 0xcafe0000)
#define SI_GET_TRACE_POINT_ID(x) ((x) & 0xffff)
+#define SI_MAX_VIEWPORTS 16
+
struct si_compute;
struct si_screen {
@@ -127,6 +129,12 @@ struct si_framebuffer {
unsigned export_16bpc;
};
+struct si_scissors {
+ struct r600_atom atom;
+ unsigned dirty_mask;
+ struct pipe_scissor_state states[SI_MAX_VIEWPORTS];
+};
+
#define SI_NUM_ATOMS(sctx) (sizeof((sctx)->atoms)/sizeof((sctx)->atoms.array[0]))
struct si_context {
@@ -154,6 +162,7 @@ struct si_context {
struct r600_atom *msaa_config;
struct r600_atom *clip_regs;
struct r600_atom *shader_userdata;
+ struct r600_atom *scissors;
} s;
struct r600_atom *array[0];
} atoms;
@@ -181,6 +190,7 @@ struct si_context {
struct r600_resource *border_color_table;
unsigned border_color_offset;
+ struct si_scissors scissors;
struct r600_atom clip_regs;
struct r600_atom msaa_sample_locs;
struct r600_atom msaa_config;