summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-02-05 11:46:32 -0800
committerEric Anholt <eric@anholt.net>2015-07-02 10:05:59 -0700
commitbfb6a290afabe492d93ec8024fac6b28f672d7d0 (patch)
tree1b35598ee91473bac88c7b5cf568bfea33f22f30
parentfe3fedf280596c2c2e69dddd30bb9ff17dbe611e (diff)
glamor: Drop a dead flag to glamor_create_fbo_array().
v2: Don't forget to set priv->block_w/block_h like the wrapper used to. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
-rw-r--r--glamor/glamor_fbo.c39
1 files changed, 13 insertions, 26 deletions
diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c
index e4aa4c696..9da4f45a1 100644
--- a/glamor/glamor_fbo.c
+++ b/glamor/glamor_fbo.c
@@ -358,20 +358,24 @@ glamor_create_fbo(glamor_screen_private *glamor_priv,
return fbo;
}
-static glamor_pixmap_fbo *
-_glamor_create_fbo_array(glamor_screen_private *glamor_priv,
+/**
+ * Create storage for the w * h region, using FBOs of the GL's maximum
+ * supported size.
+ */
+glamor_pixmap_fbo *
+glamor_create_fbo_array(glamor_screen_private *glamor_priv,
int w, int h, GLenum format, int flag,
int block_w, int block_h,
- glamor_pixmap_private *pixmap_priv, int has_fbo)
+ glamor_pixmap_private *priv)
{
int block_wcnt;
int block_hcnt;
glamor_pixmap_fbo **fbo_array;
BoxPtr box_array;
int i, j;
- glamor_pixmap_private *priv;
- priv = pixmap_priv;
+ priv->block_w = block_w;
+ priv->block_h = block_h;
block_wcnt = (w + block_w - 1) / block_w;
block_hcnt = (h + block_h - 1) / block_h;
@@ -402,13 +406,10 @@ _glamor_create_fbo_array(glamor_screen_private *glamor_priv,
fbo_w =
box_array[i * block_wcnt + j].x2 - box_array[i * block_wcnt +
j].x1;
- if (!has_fbo)
- fbo_array[i * block_wcnt + j] = glamor_create_fbo(glamor_priv,
- fbo_w, fbo_h,
- format,
- GLAMOR_CREATE_PIXMAP_FIXUP);
- else
- fbo_array[i * block_wcnt + j] = priv->fbo;
+ fbo_array[i * block_wcnt + j] = glamor_create_fbo(glamor_priv,
+ fbo_w, fbo_h,
+ format,
+ GLAMOR_CREATE_PIXMAP_FIXUP);
if (fbo_array[i * block_wcnt + j] == NULL)
goto cleanup;
}
@@ -430,20 +431,6 @@ _glamor_create_fbo_array(glamor_screen_private *glamor_priv,
return NULL;
}
-/* Create a fbo array to cover the w*h region, by using block_w*block_h
- * block.*/
-glamor_pixmap_fbo *
-glamor_create_fbo_array(glamor_screen_private *glamor_priv,
- int w, int h, GLenum format, int flag,
- int block_w, int block_h,
- glamor_pixmap_private *pixmap_priv)
-{
- pixmap_priv->block_w = block_w;
- pixmap_priv->block_h = block_h;
- return _glamor_create_fbo_array(glamor_priv, w, h, format, flag,
- block_w, block_h, pixmap_priv, 0);
-}
-
glamor_pixmap_fbo *
glamor_pixmap_detach_fbo(glamor_pixmap_private *pixmap_priv)
{