diff options
author | José Fonseca <[email protected]> | 2010-05-12 14:10:10 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-05-12 14:11:28 +0100 |
commit | 7b5931b313b8a38fd564435e69e644320fb3de5e (patch) | |
tree | 16549ecdbef9aab34daaaf93f66353188037bde3 /src/gallium | |
parent | 6ac93e469a7ffa2ddc23de029221d536f45b7143 (diff) |
softpipe: Adverstise (tgsi_exec's) shader limits.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_exec.h | 9 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_screen.c | 31 |
2 files changed, 36 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h index 83fc88eaf09..3caf820af67 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.h +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h @@ -174,10 +174,11 @@ struct tgsi_sampler -#define TGSI_EXEC_MAX_COND_NESTING 32 -#define TGSI_EXEC_MAX_LOOP_NESTING 32 -#define TGSI_EXEC_MAX_SWITCH_NESTING 32 -#define TGSI_EXEC_MAX_CALL_NESTING 32 +#define TGSI_EXEC_MAX_NESTING 32 +#define TGSI_EXEC_MAX_COND_NESTING TGSI_EXEC_MAX_NESTING +#define TGSI_EXEC_MAX_LOOP_NESTING TGSI_EXEC_MAX_NESTING +#define TGSI_EXEC_MAX_SWITCH_NESTING TGSI_EXEC_MAX_NESTING +#define TGSI_EXEC_MAX_CALL_NESTING TGSI_EXEC_MAX_NESTING /* The maximum number of input attributes per vertex. For 2D * input register files, this is the stride between two 1D diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 88e5c11801f..f874c3e60c0 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -33,6 +33,7 @@ #include "pipe/p_screen.h" #include "state_tracker/sw_winsys.h" +#include "tgsi/tgsi_exec.h" #include "sp_texture.h" #include "sp_screen.h" @@ -110,6 +111,36 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER: case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: return 1; + + 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 TGSI_EXEC_MAX_NESTING; + case PIPE_CAP_MAX_VS_INPUTS: + case PIPE_CAP_MAX_FS_INPUTS: + return TGSI_EXEC_MAX_INPUT_ATTRIBS; + case PIPE_CAP_MAX_FS_CONSTS: + case PIPE_CAP_MAX_VS_CONSTS: + return TGSI_EXEC_MAX_CONST_BUFFER; + case PIPE_CAP_MAX_VS_TEMPS: + case PIPE_CAP_MAX_FS_TEMPS: + return TGSI_EXEC_NUM_TEMPS; + case PIPE_CAP_MAX_VS_ADDRS: + case PIPE_CAP_MAX_FS_ADDRS: + return TGSI_EXEC_NUM_ADDRS; + case PIPE_CAP_MAX_VS_PREDS: + case PIPE_CAP_MAX_FS_PREDS: + return TGSI_EXEC_NUM_PREDS; + default: return 0; } |