diff options
author | Christoph Bumiller <[email protected]> | 2013-03-15 23:39:01 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2013-03-20 12:25:21 +0100 |
commit | 529dbbfcf7a674f2d82eed5e88ce92615721d5f2 (patch) | |
tree | c1d6b2f2255392e9cd1909bee38d2d4d579bf689 /src/gallium/drivers/nvc0/nvc0_screen.c | |
parent | 8acaf862dfeac62550514b0e46f5aa6212b08992 (diff) |
nvc0: fix max varying count, move CLIPVERTEX,FOG out of the way
The card spews an error if I use all 128 generic slots.
Apparently the real limit isn't just dictated by the address space
layout.
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_screen.c')
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_screen.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c index e77b819b651..73cf0af4d1d 100644 --- a/src/gallium/drivers/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nvc0/nvc0_screen.c @@ -221,9 +221,17 @@ nvc0_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, case PIPE_SHADER_CAP_MAX_INPUTS: if (shader == PIPE_SHADER_VERTEX) return 32; + /* NOTE: These only count our slots for GENERIC varyings. + * The address space may be larger, but the actual hard limit seems to be + * less than what the address space layout permits, so don't add TEXCOORD, + * COLOR, etc. here. + */ if (shader == PIPE_SHADER_FRAGMENT) - return (0x200 + 0x20 + 0x80) / 16; /* generic + colors + TexCoords */ - return (0x200 + 0x40 + 0x80) / 16; /* without 0x60 for per-patch inputs */ + return 0x1f0 / 16; + /* Actually this counts CLIPVERTEX, which occupies the last generic slot, + * and excludes 0x60 per-patch inputs. + */ + return 0x200 / 16; case PIPE_SHADER_CAP_MAX_CONSTS: return 65536 / 16; case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: |