aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_extensions.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-11-01 09:54:27 +1000
committerDave Airlie <[email protected]>2017-11-01 10:07:07 +1000
commit57892a23be9058b535072ce03dc155f42db02be4 (patch)
treec296848fda4f99a4a3d0da981e469a6461293dc6 /src/mesa/state_tracker/st_extensions.c
parentd3fdd66401b3c3853162d13b452cd19c03354ede (diff)
mesa/st: implement max combined output resources limiting.
if the driver sets the cap, then use the value it gives us. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r--src/mesa/state_tracker/st_extensions.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 3dec5a87d73..fa2d0029e58 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -78,6 +78,7 @@ void st_init_limits(struct pipe_screen *screen,
int supported_irs;
unsigned sh;
boolean can_ubo = TRUE;
+ int temp;
c->MaxTextureLevels
= _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS),
@@ -469,6 +470,11 @@ void st_init_limits(struct pipe_screen *screen,
c->UseSTD430AsDefaultPacking =
screen->get_param(screen, PIPE_CAP_LOAD_CONSTBUF);
+
+ /* limit the max combined shader output resources to a driver limit */
+ temp = screen->get_param(screen, PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES);
+ if (temp > 0 && c->MaxCombinedShaderOutputResources > temp)
+ c->MaxCombinedShaderOutputResources = temp;
}