From: Brian Paul Date: Wed, 23 Oct 2013 19:16:34 +0000 (-0600) Subject: nv50: clamp PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS to PIPE_MAX_SAMPLERS X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c1345720c86639bb570f3495b834916849d50e37;p=mesa.git nv50: clamp PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS to PIPE_MAX_SAMPLERS Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70212 Tested-by: Aaron Watry --- diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index f454ec77656..a6bce342ccd 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -249,7 +249,7 @@ nv50_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, case PIPE_SHADER_CAP_INTEGERS: return 1; case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: - return 32; + return MIN2(32, PIPE_MAX_SAMPLERS); default: NOUVEAU_ERR("unknown PIPE_SHADER_CAP %d\n", param); return 0;