summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_program.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2015-07-31 09:36:31 -0400
committerRob Clark <[email protected]>2015-08-04 16:03:45 -0400
commita221f8d9ebb4ef43a83ef638458d1338dfe1e517 (patch)
treed2e39e9421454b603c4f6bf1f355611eee71ffe1 /src/gallium/drivers/freedreno/freedreno_program.c
parent5f247a9656cb8a0eccdc98ef5911ed15c1248dfb (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/freedreno_program.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_program.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_program.c b/src/gallium/drivers/freedreno/freedreno_program.c
index 5e344e69146..e6a647852a3 100644
--- a/src/gallium/drivers/freedreno/freedreno_program.c
+++ b/src/gallium/drivers/freedreno/freedreno_program.c
@@ -96,7 +96,11 @@ fd_prog_blit(struct pipe_context *pctx, int rts, bool depth)
{
int i;
struct ureg_src tc;
- struct ureg_program *ureg = ureg_create(TGSI_PROCESSOR_FRAGMENT);
+ struct ureg_program *ureg;
+
+ debug_assert(rts <= MAX_RENDER_TARGETS);
+
+ ureg = ureg_create(TGSI_PROCESSOR_FRAGMENT);
if (!ureg)
return NULL;