summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvfx
diff options
context:
space:
mode:
authorPatrice Mandin <patmandin@gmail.com>2010-05-14 18:53:05 +0200
committerPatrice Mandin <patmandin@gmail.com>2010-05-14 18:53:05 +0200
commit33c08202a1ad60367522f34c78ab35dca4dc9d40 (patch)
tree5829e31f3362cfd193dab609879b06536fa7d83c /src/gallium/drivers/nvfx
parent12297f1f98c5daf177938b2598e6fb8ed97a9a66 (diff)
nouveau/nvfx: Define some capabilities for shaders
Signed-off-by: Patrice Mandin <patmandin@gmail.com>
Diffstat (limited to 'src/gallium/drivers/nvfx')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_screen.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c b/src/gallium/drivers/nvfx/nvfx_screen.c
index 0ff25e54f7..6b01d868e2 100644
--- a/src/gallium/drivers/nvfx/nvfx_screen.c
+++ b/src/gallium/drivers/nvfx/nvfx_screen.c
@@ -84,6 +84,44 @@ nvfx_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
return 0;
+ case PIPE_CAP_MAX_FS_INSTRUCTIONS:
+ case PIPE_CAP_MAX_FS_ALU_INSTRUCTIONS:
+ case PIPE_CAP_MAX_FS_TEX_INSTRUCTIONS:
+ case PIPE_CAP_MAX_FS_TEX_INDIRECTIONS:
+ return 4096;
+ case PIPE_CAP_MAX_FS_CONTROL_FLOW_DEPTH:
+ /* FIXME: is it the dynamic (nv30:0/nv40:24) or the static
+ value (written there) ? */
+ return screen->is_nv4x ? 4 : 0;
+ /*case PIPE_CAP_MAX_FS_INPUTS:*/ /* FIXME */
+ /*case PIPE_CAP_MAX_FS_CONSTS:*/ /* FIXME */
+ /* return 0;*/
+ case PIPE_CAP_MAX_FS_TEMPS:
+ return 32;
+ case PIPE_CAP_MAX_FS_ADDRS:
+ return screen->is_nv4x ? 1 : 0;
+ /*case PIPE_CAP_MAX_FS_PREDS:*/ /* FIXME */
+ /* return 0;*/
+ case PIPE_CAP_MAX_VS_INSTRUCTIONS:
+ case PIPE_CAP_MAX_VS_ALU_INSTRUCTIONS:
+ return screen->is_nv4x ? 512 : 256;
+ case PIPE_CAP_MAX_VS_TEX_INSTRUCTIONS:
+ case PIPE_CAP_MAX_VS_TEX_INDIRECTIONS:
+ return screen->is_nv4x ? 512 : 0;
+ case PIPE_CAP_MAX_VS_CONTROL_FLOW_DEPTH:
+ /* FIXME: is it the dynamic (nv30/nv40:24) or the static
+ value (written there) ? */
+ return screen->is_nv4x ? 4 : 1;
+ /*case PIPE_CAP_MAX_VS_INPUTS:*/ /* FIXME */
+ /* return 0;*/
+ case PIPE_CAP_MAX_VS_CONSTS:
+ return 256;
+ case PIPE_CAP_MAX_VS_TEMPS:
+ return screen->is_nv4x ? 48 : 16;
+ case PIPE_CAP_MAX_VS_ADDRS:
+ return 2;
+ /*case PIPE_CAP_MAX_VS_PREDS:*/ /* FIXME */
+ /* return 0;*/
default:
NOUVEAU_ERR("Unknown PIPE_CAP %d\n", param);
return 0;