summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_context.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-14 23:09:24 +0200
committerMarek Olšák <[email protected]>2017-06-22 01:51:02 +0200
commit743ad599a97d09b119d26b99f6b79e41b567e421 (patch)
tree3ccdbd3d7ea47037329bc97d8d87e247f7d77c6a /src/mesa/state_tracker/st_context.h
parent2ec1e32d11ed788dfed229a569a238743b9b1f9f (diff)
st/mesa: don't set 16 scissors and 16 viewports if they're unused
Only do so if there is a shader writing gl_ViewportIndex. This removes a lot of CPU overhead for the most common case. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.h')
-rw-r--r--src/mesa/state_tracker/st_context.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 2fe9d92e8bc..5c7c58d73f7 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -149,6 +149,7 @@ struct st_context
unsigned fb_height;
unsigned fb_num_samples;
unsigned fb_num_layers;
+ unsigned num_viewports;
struct pipe_scissor_state scissor[PIPE_MAX_VIEWPORTS];
struct pipe_viewport_state viewport[PIPE_MAX_VIEWPORTS];
struct {