diff options
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r-- | src/gallium/include/pipe/p_compiler.h | 1 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_defines.h | 46 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_screen.h | 6 |
3 files changed, 23 insertions, 30 deletions
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h index 0a5be43f6b..5020599591 100644 --- a/src/gallium/include/pipe/p_compiler.h +++ b/src/gallium/include/pipe/p_compiler.h @@ -35,6 +35,7 @@ #include <string.h> #include <stddef.h> #include <stdarg.h> +#include <limits.h> #if defined(_WIN32) && !defined(__WIN32__) diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 627b5ae538..8b4663742f 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -449,16 +449,12 @@ enum pipe_cap { PIPE_CAP_TEXTURE_MIRROR_CLAMP, PIPE_CAP_TEXTURE_MIRROR_REPEAT, PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS, - PIPE_CAP_TGSI_CONT_SUPPORTED, PIPE_CAP_BLEND_EQUATION_SEPARATE, PIPE_CAP_SM3, /*< Shader Model, supported */ PIPE_CAP_STREAM_OUTPUT, - PIPE_CAP_MAX_PREDICATE_REGISTERS, /** Maximum texture image units accessible from vertex and fragment shaders * combined */ PIPE_CAP_MAX_COMBINED_SAMPLERS, - PIPE_CAP_MAX_CONST_BUFFERS, - PIPE_CAP_MAX_CONST_BUFFER_SIZE, /*< In bytes */ /** blend enables and write masks per rendertarget */ PIPE_CAP_INDEP_BLEND_ENABLE, /** different blend funcs per rendertarget */ @@ -468,35 +464,25 @@ enum pipe_cap { PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT, PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER, PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER, - - /* - * Shader limits. - */ - PIPE_CAP_MAX_FS_INSTRUCTIONS, - PIPE_CAP_MAX_FS_ALU_INSTRUCTIONS, - PIPE_CAP_MAX_FS_TEX_INSTRUCTIONS, - PIPE_CAP_MAX_FS_TEX_INDIRECTIONS, - PIPE_CAP_MAX_FS_CONTROL_FLOW_DEPTH, - PIPE_CAP_MAX_FS_INPUTS, - PIPE_CAP_MAX_FS_CONSTS, - PIPE_CAP_MAX_FS_TEMPS, - PIPE_CAP_MAX_FS_ADDRS, - PIPE_CAP_MAX_FS_PREDS, - PIPE_CAP_MAX_VS_INSTRUCTIONS, - PIPE_CAP_MAX_VS_ALU_INSTRUCTIONS, - PIPE_CAP_MAX_VS_TEX_INSTRUCTIONS, - PIPE_CAP_MAX_VS_TEX_INDIRECTIONS, - PIPE_CAP_MAX_VS_CONTROL_FLOW_DEPTH, - PIPE_CAP_MAX_VS_INPUTS, - PIPE_CAP_MAX_VS_CONSTS, - PIPE_CAP_MAX_VS_TEMPS, - PIPE_CAP_MAX_VS_ADDRS, - PIPE_CAP_MAX_VS_PREDS, - - PIPE_CAP_GEOMETRY_SHADER4, PIPE_CAP_DEPTH_CLAMP }; +/* Shader caps not specific to any single stage */ +enum pipe_shader_cap +{ + PIPE_SHADER_CAP_MAX_INSTRUCTIONS, /* if 0, it means the stage is unsupported */ + PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS, + PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS, + PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS, + PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH, + PIPE_SHADER_CAP_MAX_INPUTS, + PIPE_SHADER_CAP_MAX_CONSTS, + PIPE_SHADER_CAP_MAX_CONST_BUFFERS, + PIPE_SHADER_CAP_MAX_TEMPS, + PIPE_SHADER_CAP_MAX_ADDRS, + PIPE_SHADER_CAP_MAX_PREDS, + PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED, +}; /** * Referenced query flags. diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index 21f428ed4a..912631242f 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -86,6 +86,12 @@ struct pipe_screen { */ float (*get_paramf)( struct pipe_screen *, enum pipe_cap param ); + /** + * Query a per-shader-stage integer-valued capability/parameter/limit + * \param param one of PIPE_CAP_x + */ + int (*get_shader_param)( struct pipe_screen *, unsigned shader, enum pipe_shader_cap param ); + struct pipe_context * (*context_create)( struct pipe_screen *, void *priv ); |