diff options
author | Marek Olšák <[email protected]> | 2011-11-22 15:05:29 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-12-12 08:04:51 +0100 |
commit | 1ded658ce074a85bc08c989ff17840b840ff3051 (patch) | |
tree | 8a188f5c771f11d5bffd054957d26706c56171ae | |
parent | 592323de1ea5b9e5eab8b66690c8aecc6901c5de (diff) |
st/mesa: add color varyings to MaxVarying
The linker now adds color varyings to the number of used varyings and checks
against that limit.
NOTE: This is a candidate for the 7.11 branch.
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 37fb3e7fd7a..9e39729e9d4 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -210,12 +210,10 @@ void st_init_limits(struct st_context *st) options->MaxUnrollIterations = MIN2(screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS), 65536); } - /* PIPE_CAP_MAX_FS_INPUTS specifies the number of COLORn + GENERICn inputs - * and is set in MaxNativeAttribs. It's always 2 colors + N generic - * attributes. The GLSL compiler never uses COLORn for varyings, so we - * subtract the 2 colors to get the maximum number of varyings (generic - * attributes) supported by a driver. */ - c->MaxVarying = screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_INPUTS) - 2; + /* PIPE_SHADER_CAP_MAX_INPUTS for the FS specifies the maximum number + * of inputs. It's always 2 colors + N generic inputs. */ + c->MaxVarying = screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, + PIPE_SHADER_CAP_MAX_INPUTS); c->MaxVarying = MIN2(c->MaxVarying, MAX_VARYING); c->MinProgramTexelOffset = screen->get_param(screen, PIPE_CAP_MIN_TEXEL_OFFSET); |