summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_screen.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c50
1 files changed, 16 insertions, 34 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 363940d3a73..364a299871a 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -33,6 +33,7 @@
#include "util/u_format_s3tc.h"
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
+#include "draw/draw_context.h"
#include "gallivm/lp_bld_limits.h"
#include "lp_texture.h"
@@ -132,8 +133,6 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
return LP_MAX_TEXTURE_3D_LEVELS;
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
return LP_MAX_TEXTURE_2D_LEVELS;
- case PIPE_CAP_TGSI_CONT_SUPPORTED:
- return 1;
case PIPE_CAP_BLEND_EQUATION_SEPARATE:
return 1;
case PIPE_CAP_INDEP_BLEND_ENABLE:
@@ -146,47 +145,29 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
return 0;
- case PIPE_CAP_MAX_VS_INSTRUCTIONS:
- case PIPE_CAP_MAX_FS_INSTRUCTIONS:
- case PIPE_CAP_MAX_VS_ALU_INSTRUCTIONS:
- case PIPE_CAP_MAX_FS_ALU_INSTRUCTIONS:
- case PIPE_CAP_MAX_VS_TEX_INSTRUCTIONS:
- case PIPE_CAP_MAX_FS_TEX_INSTRUCTIONS:
- case PIPE_CAP_MAX_VS_TEX_INDIRECTIONS:
- case PIPE_CAP_MAX_FS_TEX_INDIRECTIONS:
- /* There is no limit in number of instructions beyond available memory */
- return 32768;
- case PIPE_CAP_MAX_VS_CONTROL_FLOW_DEPTH:
- case PIPE_CAP_MAX_FS_CONTROL_FLOW_DEPTH:
- return LP_MAX_TGSI_NESTING;
- case PIPE_CAP_MAX_VS_INPUTS:
- case PIPE_CAP_MAX_FS_INPUTS:
- return PIPE_MAX_ATTRIBS;
- case PIPE_CAP_MAX_FS_CONSTS:
- case PIPE_CAP_MAX_VS_CONSTS:
- /* There is no limit in number of constants beyond available memory */
- return 32768;
- case PIPE_CAP_MAX_VS_TEMPS:
- case PIPE_CAP_MAX_FS_TEMPS:
- return LP_MAX_TGSI_TEMPS;
- case PIPE_CAP_MAX_VS_ADDRS:
- case PIPE_CAP_MAX_FS_ADDRS:
- return LP_MAX_TGSI_ADDRS;
- case PIPE_CAP_MAX_VS_PREDS:
- case PIPE_CAP_MAX_FS_PREDS:
- return LP_MAX_TGSI_PREDS;
case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
return 1;
- case PIPE_CAP_GEOMETRY_SHADER4:
- return 1;
case PIPE_CAP_DEPTH_CLAMP:
return 0;
default:
- assert(0);
return 0;
}
}
+static int
+llvmpipe_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_shader_cap param)
+{
+ switch(shader)
+ {
+ case PIPE_SHADER_FRAGMENT:
+ return tgsi_exec_get_shader_param(param);
+ case PIPE_SHADER_VERTEX:
+ case PIPE_SHADER_GEOMETRY:
+ return draw_get_shader_param(shader, param);
+ default:
+ return 0;
+ }
+}
static float
llvmpipe_get_paramf(struct pipe_screen *screen, enum pipe_cap param)
@@ -402,6 +383,7 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
screen->base.get_name = llvmpipe_get_name;
screen->base.get_vendor = llvmpipe_get_vendor;
screen->base.get_param = llvmpipe_get_param;
+ screen->base.get_shader_param = llvmpipe_get_shader_param;
screen->base.get_paramf = llvmpipe_get_paramf;
screen->base.is_format_supported = llvmpipe_is_format_supported;