diff options
author | Roland Scheidegger <[email protected]> | 2013-11-26 02:30:41 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-11-28 04:02:18 +0100 |
commit | 2983c039df630bb9bcb70c52219c631e27b0eae6 (patch) | |
tree | b863fdab0fda57c03c1c5c3f00ff235c58cd6c99 /src/gallium/drivers/nouveau | |
parent | e4d8084cbdeaaa392969d077e2a9d8e9df3b2cdc (diff) |
gallium: new shader cap bit for the amount of sampler views
Ever since introducing separate sampler and sampler view max this was really
missing.
Every driver but llvmpipe reports the same number as number of samplers for
now, so nothing should break.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_screen.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_screen.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c index 807100ee0d0..26ff6812e50 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c @@ -190,6 +190,7 @@ nv30_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, case PIPE_SHADER_CAP_MAX_TEMPS: return (eng3d->oclass >= NV40_3D_CLASS) ? 32 : 13; case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: + case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: return 0; case PIPE_SHADER_CAP_MAX_ADDRS: return 2; @@ -228,6 +229,7 @@ nv30_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, case PIPE_SHADER_CAP_MAX_ADDRS: return (eng3d->oclass >= NV40_3D_CLASS) ? 1 : 0; case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: + case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: return 16; case PIPE_SHADER_CAP_MAX_PREDS: case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED: diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 0ce9e34f5e5..f7dfc98b70b 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -250,6 +250,8 @@ nv50_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, case PIPE_SHADER_CAP_INTEGERS: return 1; case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: + /* The chip could handle more sampler views than samplers */ + case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: return MIN2(32, PIPE_MAX_SAMPLERS); default: NOUVEAU_ERR("unknown PIPE_SHADER_CAP %d\n", param); diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index b203089ec08..cc5814e1f3e 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -253,10 +253,8 @@ nvc0_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, return 1; case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: return 16; /* would be 32 in linked (OpenGL-style) mode */ - /* - case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLER_VIEWS: - return 32; - */ + case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: + return 16; /* XXX not sure if more are really safe */ default: NOUVEAU_ERR("unknown PIPE_SHADER_CAP %d\n", param); return 0; |