diff options
author | Rob Clark <[email protected]> | 2015-07-31 09:36:31 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-08-04 16:03:45 -0400 |
commit | a221f8d9ebb4ef43a83ef638458d1338dfe1e517 (patch) | |
tree | d2e39e9421454b603c4f6bf1f355611eee71ffe1 /src/gallium/drivers/freedreno/a3xx/fd3_program.c | |
parent | 5f247a9656cb8a0eccdc98ef5911ed15c1248dfb (diff) |
freedreno: small bit of cleanup about max rendertargets
We hard-coded 4 or 8 as the max in various places. Switch it all to a
define since the limit will go up with a4xx (and maybe even again in the
future?)
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx/fd3_program.c')
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_program.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_program.c b/src/gallium/drivers/freedreno/a3xx/fd3_program.c index 7cd4885ab4f..e98c6b5cff4 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_program.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_program.c @@ -136,6 +136,8 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit, int constmode; int i, j, k; + debug_assert(nr <= ARRAY_SIZE(color_regid)); + vp = fd3_emit_get_vp(emit); if (emit->key.binning_pass) { @@ -207,7 +209,7 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit, unsigned idx = sem2idx(sem); if (sem2name(sem) != TGSI_SEMANTIC_COLOR) continue; - assert(idx < 4); + debug_assert(idx < ARRAY_SIZE(color_regid)); color_regid[idx] = fp->outputs[i].regid; } } |