diff options
author | Marek Olšák <[email protected]> | 2014-10-01 20:28:17 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-10-21 21:59:02 +0200 |
commit | 5f5b83cbba95a7bb8955b09e24df1e9487c10734 (patch) | |
tree | 8c7d60661400833a268e2c87857a6152910f6218 /src/mesa/state_tracker/st_extensions.c | |
parent | ef280c95f2623357452f5ca8e65367b7ac30699f (diff) |
gallium: add PIPE_SHADER_CAP_MAX_OUTPUTS and use it in st/mesa
With 5 shader stages and various combinations of enabled and disabled shaders,
the maximum number of outputs in one shader doesn't have to be equal to
the maximum number of inputs in the following shader.
v2: return 32 for softpipe and llvmpipe
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 5dd8278007e..78bfe30735f 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -192,6 +192,10 @@ void st_init_limits(struct pipe_screen *screen, pc->MaxParameters = pc->MaxNativeParameters = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE) / sizeof(float[4]); + pc->MaxInputComponents = + screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INPUTS) * 4; + pc->MaxOutputComponents = + screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_OUTPUTS) * 4; pc->MaxUniformComponents = 4 * MIN2(pc->MaxNativeParameters, MAX_UNIFORMS); @@ -261,10 +265,6 @@ void st_init_limits(struct pipe_screen *screen, c->MaxVarying = screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_INPUTS); c->MaxVarying = MIN2(c->MaxVarying, MAX_VARYING); - c->Program[MESA_SHADER_FRAGMENT].MaxInputComponents = c->MaxVarying * 4; - c->Program[MESA_SHADER_VERTEX].MaxOutputComponents = c->MaxVarying * 4; - c->Program[MESA_SHADER_GEOMETRY].MaxInputComponents = c->MaxVarying * 4; - c->Program[MESA_SHADER_GEOMETRY].MaxOutputComponents = c->MaxVarying * 4; c->MaxGeometryOutputVertices = screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES); c->MaxGeometryTotalOutputComponents = screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS); |