From cff290df4c09547cd2cb3b129ec59bdebdadba90 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 8 Aug 2018 15:21:05 -0400 Subject: [PATCH] st/mesa: don't include compute resources in "Combined" limits MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The combined limits should only include shader stages that can be active at the same time. Tested-by: Dieter Nützel --- src/mesa/state_tracker/st_extensions.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index d1c18e4e2a0..9c912b2df75 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -322,8 +322,7 @@ void st_init_limits(struct pipe_screen *screen, c->Program[MESA_SHADER_TESS_CTRL].MaxTextureImageUnits + c->Program[MESA_SHADER_TESS_EVAL].MaxTextureImageUnits + c->Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits + - c->Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits + - c->Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits, + c->Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits, MAX_COMBINED_TEXTURE_IMAGE_UNITS); /* This depends on program constants. */ @@ -396,8 +395,7 @@ void st_init_limits(struct pipe_screen *screen, c->Program[MESA_SHADER_TESS_CTRL].MaxUniformBlocks + c->Program[MESA_SHADER_TESS_EVAL].MaxUniformBlocks + c->Program[MESA_SHADER_GEOMETRY].MaxUniformBlocks + - c->Program[MESA_SHADER_FRAGMENT].MaxUniformBlocks + - c->Program[MESA_SHADER_COMPUTE].MaxUniformBlocks; + c->Program[MESA_SHADER_FRAGMENT].MaxUniformBlocks, assert(c->MaxCombinedUniformBlocks <= MAX_COMBINED_UNIFORM_BUFFERS); } @@ -462,8 +460,7 @@ void st_init_limits(struct pipe_screen *screen, c->Program[MESA_SHADER_TESS_CTRL].MaxImageUniforms + c->Program[MESA_SHADER_TESS_EVAL].MaxImageUniforms + c->Program[MESA_SHADER_GEOMETRY].MaxImageUniforms + - c->Program[MESA_SHADER_FRAGMENT].MaxImageUniforms + - c->Program[MESA_SHADER_COMPUTE].MaxImageUniforms; + c->Program[MESA_SHADER_FRAGMENT].MaxImageUniforms; c->MaxCombinedShaderOutputResources += c->MaxCombinedImageUniforms; c->MaxImageUnits = MAX_IMAGE_UNITS; if (c->MaxCombinedImageUniforms) { -- 2.30.2